summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2006-12-13 21:03:55 +0000
committerscottl <scottl@FreeBSD.org>2006-12-13 21:03:55 +0000
commit5c3976f43b1710732489b117b6dbba9cf97519db (patch)
treea0b4145b0fce4225fb7f0c2c9e9f83cc4e144d8b
parente506efd7ce04d93714480635bdd7790c7d21352f (diff)
downloadFreeBSD-src-5c3976f43b1710732489b117b6dbba9cf97519db.zip
FreeBSD-src-5c3976f43b1710732489b117b6dbba9cf97519db.tar.gz
Use the BGE_IS_* macros consistently. Also add a couple of missing
cases to the debug_info function.
-rw-r--r--sys/dev/bge/if_bge.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c
index c03d2c2..486af13 100644
--- a/sys/dev/bge/if_bge.c
+++ b/sys/dev/bge/if_bge.c
@@ -1359,7 +1359,7 @@ bge_blockinit(struct bge_softc *sc)
* values are 1/8th the number of descriptors allocated to
* each ring.
*/
- if (sc->bge_flags & BGE_FLAG_5705_PLUS)
+ if (BGE_IS_5705_PLUS(sc))
val = 8;
else
val = BGE_STD_RX_RING_CNT / 8;
@@ -2201,7 +2201,7 @@ bge_attach(device_t dev)
}
#else
- if (sc->bge_flags & BGE_FLAG_5705_PLUS) {
+ if (BGE_IS_5705_PLUS(sc)) {
reg = pci_read_config(dev, BGE_PCIE_CAPID_REG, 4);
if ((reg & 0xff) == BGE_PCIE_CAPID)
sc->bge_flags |= BGE_FLAG_PCIE;
@@ -2567,7 +2567,7 @@ bge_reset(struct bge_softc *sc)
* Set GPHY Power Down Override to leave GPHY
* powered up in D0 uninitialized.
*/
- if (sc->bge_flags & BGE_FLAG_5705_PLUS)
+ if (BGE_IS_5705_PLUS(sc))
reset |= 0x04000000;
/* Issue global reset */
@@ -4099,10 +4099,14 @@ bge_sysctl_debug_info(SYSCTL_HANDLER_ARGS)
}
printf("Hardware Flags:\n");
- if (sc->bge_flags & BGE_FLAG_575X_PLUS)
+ if (BGE_IS_575X_PLUS(sc))
printf(" - 575X Plus\n");
- if (sc->bge_flags & BGE_FLAG_5705_PLUS)
+ if (BGE_IS_5705_PLUS(sc))
printf(" - 5705 Plus\n");
+ if (BGE_IS_5714_FAMILY(sc))
+ printf(" - 5714 Family\n");
+ if (BGE_IS_5700_FAMILY(sc))
+ printf(" - 5700 Family\n");
if (sc->bge_flags & BGE_FLAG_JUMBO)
printf(" - Supports Jumbo Frames\n");
if (sc->bge_flags & BGE_FLAG_PCIX)
OpenPOWER on IntegriCloud