Module Name: src Committed By: msaitoh Date: Tue Jun 24 23:25:33 UTC 2014
Modified Files: src/sys/dev/pci: if_bnx.c if_bnxreg.h if_bnxvar.h Log Message: No functional change: - Tabify. - Remove trailing white spaces. - Fix typo in comment. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/dev/pci/if_bnx.c cvs rdiff -u -r1.15 -r1.16 src/sys/dev/pci/if_bnxreg.h cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/if_bnxvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/if_bnx.c diff -u src/sys/dev/pci/if_bnx.c:1.53 src/sys/dev/pci/if_bnx.c:1.54 --- src/sys/dev/pci/if_bnx.c:1.53 Tue Jun 17 21:37:20 2014 +++ src/sys/dev/pci/if_bnx.c Tue Jun 24 23:25:33 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bnx.c,v 1.53 2014/06/17 21:37:20 msaitoh Exp $ */ +/* $NetBSD: if_bnx.c,v 1.54 2014/06/24 23:25:33 msaitoh Exp $ */ /* $OpenBSD: if_bnx.c,v 1.85 2009/11/09 14:32:41 dlg Exp $ */ /*- @@ -35,7 +35,7 @@ #if 0 __FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.3 2006/04/13 14:12:26 ru Exp $"); #endif -__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.53 2014/06/17 21:37:20 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.54 2014/06/24 23:25:33 msaitoh Exp $"); /* * The following controllers are supported by this driver: @@ -48,7 +48,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1 * BCM5716 C0 * * The following controllers are not supported by this driver: - * * BCM5706C A0, A1 * BCM5706S A0, A1 * BCM5708C A0, B0 @@ -1754,7 +1753,7 @@ bnx_nvram_write(struct bnx_softc *sc, u_ } if (len32 & 3) { - if ((len32 > 4) || !align_start) { + if ((len32 > 4) || !align_start) { align_end = 4 - (len32 & 3); len32 += align_end; if ((rc = bnx_nvram_read(sc, offset32 + len32 - 4, @@ -3142,13 +3141,11 @@ bnx_init_context(struct bnx_softc *sc) DELAY(2); } - /* ToDo: Consider returning an error here. */ for (i = 0; i < sc->ctx_pages; i++) { int j; - /* Set the physaddr of the context memory cache. */ val = (u_int32_t)(sc->ctx_segs[i].ds_addr); REG_WR(sc, BNX_CTX_HOST_PAGE_TBL_DATA0, val | @@ -3159,7 +3156,6 @@ bnx_init_context(struct bnx_softc *sc) REG_WR(sc, BNX_CTX_HOST_PAGE_TBL_CTRL, i | BNX_CTX_HOST_PAGE_TBL_CTRL_WRITE_REQ); - /* Verify that the context memory write was successful. */ for (j = 0; j < retry_cnt; j++) { val = REG_RD(sc, BNX_CTX_HOST_PAGE_TBL_CTRL); @@ -3725,7 +3721,7 @@ bnx_add_buf(struct bnx_softc *sc, struct sizeof(struct rx_bd), BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); /* - * Save the mbuf, ajust the map pointer (swap map for first and + * Save the mbuf, adjust the map pointer (swap map for first and * last rx_bd entry to that rx_mbuf_ptr and rx_mbuf_map matches) * and update counter. */ @@ -4031,7 +4027,7 @@ bnx_free_tx_chain(struct bnx_softc *sc) mutex_enter(&sc->tx_pkt_mtx); TAILQ_INSERT_TAIL(&sc->tx_free_pkts, pkt, pkt_entry); - } + } /* Destroy all the dmamaps we allocated for TX */ while ((pkt = TAILQ_FIRST(&sc->tx_free_pkts)) != NULL) { @@ -5258,7 +5254,8 @@ bnx_intr(void *xsc) sc->hw_tx_cons) bnx_tx_intr(sc); - /* Save the status block index value for use during the + /* + * Save the status block index value for use during the * next interrupt. */ sc->last_status_idx = sblk->status_idx; Index: src/sys/dev/pci/if_bnxreg.h diff -u src/sys/dev/pci/if_bnxreg.h:1.15 src/sys/dev/pci/if_bnxreg.h:1.16 --- src/sys/dev/pci/if_bnxreg.h:1.15 Tue Jun 17 21:37:20 2014 +++ src/sys/dev/pci/if_bnxreg.h Tue Jun 24 23:25:33 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bnxreg.h,v 1.15 2014/06/17 21:37:20 msaitoh Exp $ */ +/* $NetBSD: if_bnxreg.h,v 1.16 2014/06/24 23:25:33 msaitoh Exp $ */ /* $OpenBSD: if_bnxreg.h,v 1.33 2009/09/05 16:02:28 claudio Exp $ */ /*- @@ -326,7 +326,7 @@ struct flash_spec { #define BNX_NV_BUFFERED 0x00000001 #define BNX_NV_TRANSLATE 0x00000002 #define BNX_NV_WREN 0x00000004 - u_int32_t flags; + u_int32_t flags; u_int32_t page_bits; u_int32_t page_size; u_int32_t addr_mask; @@ -341,19 +341,19 @@ struct flash_spec { /* information which can be accessed by the driver. */ /****************************************************************************/ -/* +/* * This value (in milliseconds) determines the frequency of the driver * issuing the PULSE message code. The firmware monitors this periodic - * pulse to determine when to switch to an OS-absent mode. + * pulse to determine when to switch to an OS-absent mode. */ #define DRV_PULSE_PERIOD_MS 250 -/* +/* * This value (in milliseconds) determines how long the driver should * wait for an acknowledgement from the firmware before timing out. Once * the firmware has timed out, the driver will assume there is no firmware * running and there won't be any firmware-driver synchronization during a - * driver reset. + * driver reset. */ #define FW_ACK_TIME_OUT_MS 1000 @@ -423,8 +423,8 @@ struct flash_spec { #define BNX_DRV_PULSE_MB 0x00000010 #define BNX_DRV_PULSE_SEQ_MASK 0x00007fff -#define BNX_MB_ARGS_0 0x00000014 -#define BNX_MB_ARGS_1 0x00000018 +#define BNX_MB_ARGS_0 0x00000014 +#define BNX_MB_ARGS_1 0x00000018 /* Indicate to the firmware not to go into the * OS absent when it is not getting driver pulse. @@ -2154,10 +2154,10 @@ struct l2_fhdr { #define BNX_CTX_ACCESS_STATUS_ACCESSMEMORYSM (0x3L<<10) #define BNX_CTX_ACCESS_STATUS_PAGETABLEINITSM (0x3L<<12) #define BNX_CTX_ACCESS_STATUS_ACCESSMEMORYINITSM (0x3L<<14) -#define BNX_CTX_ACCESS_STATUS_QUALIFIED_REQUEST (0x7ffL<<17) -#define BNX_CTX_ACCESS_STATUS_CAMMASTERENCODED_XI (0x1fL<<0) -#define BNX_CTX_ACCESS_STATUS_CACHEMASTERENCODED_XI (0x1fL<<5) -#define BNX_CTX_ACCESS_STATUS_REQUEST_XI (0x3fffffL<<10) +#define BNX_CTX_ACCESS_STATUS_QUALIFIED_REQUEST (0x7ffL<<17) +#define BNX_CTX_ACCESS_STATUS_CAMMASTERENCODED_XI (0x1fL<<0) +#define BNX_CTX_ACCESS_STATUS_CACHEMASTERENCODED_XI (0x1fL<<5) +#define BNX_CTX_ACCESS_STATUS_REQUEST_XI (0x3fffffL<<10) #define BNX_CTX_DBG_LOCK_STATUS 0x00001044 #define BNX_CTX_DBG_LOCK_STATUS_SM (0x3ffL<<0) @@ -4551,7 +4551,7 @@ struct l2_fhdr { #define DMA_WRITE_CHANS 3 /* Use the natural page size of the host CPU. */ -#define BCM_PAGE_BITS PAGE_SHIFT +#define BCM_PAGE_BITS PAGE_SHIFT #define BCM_PAGE_SIZE PAGE_SIZE #define TX_PAGES 2 Index: src/sys/dev/pci/if_bnxvar.h diff -u src/sys/dev/pci/if_bnxvar.h:1.3 src/sys/dev/pci/if_bnxvar.h:1.4 --- src/sys/dev/pci/if_bnxvar.h:1.3 Thu Apr 26 17:43:02 2012 +++ src/sys/dev/pci/if_bnxvar.h Tue Jun 24 23:25:33 2014 @@ -392,7 +392,7 @@ struct bnx_firmware_header { int bnx_RXP_FwBssLen; u_int32_t bnx_RXP_FwSbssAddr; int bnx_RXP_FwSbssLen; - + int bnx_TPAT_FwReleaseMajor; int bnx_TPAT_FwReleaseMinor; int bnx_TPAT_FwReleaseFix; @@ -428,13 +428,13 @@ struct bnx_firmware_header { * * bnx_COM_FwText, bnx_COM_FwData, bnx_COM_FwRodata, * bnx_COM_FwBss, bnx_COM_FwSbss, - * + * * bnx_RXP_FwText, bnx_RXP_FwData, bnx_RXP_FwRodata, * bnx_RXP_FwBss, bnx_RXP_FwSbss, - * + * * bnx_TPAT_FwText, bnx_TPAT_FwData, bnx_TPAT_FwRodata, * bnx_TPAT_FwBss, bnx_TPAT_FwSbss, - * + * * bnx_TXP_FwText, bnx_TXP_FwData, bnx_TXP_FwRodata, * bnx_TXP_FwBss, bnx_TXP_FwSbss, */