Module Name: src Committed By: martin Date: Fri Sep 13 20:54:14 UTC 2013
Modified Files: src/sys/dev/pci: if_bnx.c Log Message: #ifdef variable declarations/initializations like their use To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/dev/pci/if_bnx.c 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.48 src/sys/dev/pci/if_bnx.c:1.49 --- src/sys/dev/pci/if_bnx.c:1.48 Sat Mar 30 03:21:03 2013 +++ src/sys/dev/pci/if_bnx.c Fri Sep 13 20:54:14 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bnx.c,v 1.48 2013/03/30 03:21:03 christos Exp $ */ +/* $NetBSD: if_bnx.c,v 1.49 2013/09/13 20:54:14 martin 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.48 2013/03/30 03:21:03 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.49 2013/09/13 20:54:14 martin Exp $"); /* * The following controllers are supported by this driver: @@ -5006,7 +5006,9 @@ bnx_start(struct ifnet *ifp) struct bnx_softc *sc = ifp->if_softc; struct mbuf *m_head = NULL; int count = 0; - u_int16_t tx_prod, tx_chain_prod; +#ifdef BNX_DEBUG + u_int16_t tx_chain_prod; +#endif /* If there's no link or the transmit queue is empty then just exit. */ if ((ifp->if_flags & (IFF_OACTIVE|IFF_RUNNING)) != IFF_RUNNING) { @@ -5016,13 +5018,14 @@ bnx_start(struct ifnet *ifp) } /* prod points to the next free tx_bd. */ - tx_prod = sc->tx_prod; - tx_chain_prod = TX_CHAIN_IDX(tx_prod); +#ifdef BNX_DEBUG + tx_chain_prod = TX_CHAIN_IDX(sc->tx_prod); +#endif DBPRINT(sc, BNX_INFO_SEND, "%s(): Start: tx_prod = 0x%04X, " "tx_chain_prod = %04X, tx_prod_bseq = 0x%08X, " "used_tx %d max_tx %d\n", - __func__, tx_prod, tx_chain_prod, sc->tx_prod_bseq, + __func__, sc->tx_prod, tx_chain_prod, sc->tx_prod_bseq, sc->used_tx_bd, sc->max_tx_bd); /* @@ -5062,10 +5065,12 @@ bnx_start(struct ifnet *ifp) } /* Update the driver's counters. */ +#ifdef BNX_DEBUG tx_chain_prod = TX_CHAIN_IDX(sc->tx_prod); +#endif DBPRINT(sc, BNX_INFO_SEND, "%s(): End: tx_prod = 0x%04X, tx_chain_prod " - "= 0x%04X, tx_prod_bseq = 0x%08X\n", __func__, tx_prod, + "= 0x%04X, tx_prod_bseq = 0x%08X\n", __func__, sc->tx_prod, tx_chain_prod, sc->tx_prod_bseq); /* Start the transmit. */