summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2006-12-03 13:58:59 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2006-12-03 13:58:59 +0000
commit3c89410a4edcf392beb1c85c13d581b872b49fa3 (patch)
tree91154c5649a3e9a1efb6545f4b4236d46e66e254 /sys/dev/pci
parentc3539f4fca699b326a362ae19444253885976af0 (diff)
re-add a tiny little #ifdef VIC_DEBUG, used to compare the vic(4)
features and capabilities on different vmware platforms.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/if_vic.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/sys/dev/pci/if_vic.c b/sys/dev/pci/if_vic.c
index 2aa06156b34..844378d5dbd 100644
--- a/sys/dev/pci/if_vic.c
+++ b/sys/dev/pci/if_vic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vic.c,v 1.35 2006/11/09 18:50:30 reyk Exp $ */
+/* $OpenBSD: if_vic.c,v 1.36 2006/12/03 13:58:58 reyk Exp $ */
/*
* Copyright (c) 2006 Reyk Floeter <reyk@openbsd.org>
@@ -475,13 +475,7 @@ vic_query(struct vic_softc *sc)
}
sc->sc_nrxbuf = vic_read_cmd(sc, VIC_CMD_NUM_Rx_BUF);
- if (sc->sc_nrxbuf > VIC_NBUF_MAX || sc->sc_nrxbuf == 0)
- sc->sc_nrxbuf = VIC_NBUF;
-
sc->sc_ntxbuf = vic_read_cmd(sc, VIC_CMD_NUM_Tx_BUF);
- if (sc->sc_ntxbuf > VIC_NBUF_MAX || sc->sc_ntxbuf == 0)
- sc->sc_ntxbuf = VIC_NBUF;
-
sc->sc_feature = vic_read_cmd(sc, VIC_CMD_FEATURE);
sc->sc_cap = vic_read_cmd(sc, VIC_CMD_HWCAP);
@@ -490,6 +484,16 @@ vic_query(struct vic_softc *sc)
printf("%s: VMXnet %04X, address %s\n", DEVNAME(sc),
major & ~VIC_VERSION_MAJOR_M, ether_sprintf(sc->sc_lladdr));
+#ifdef VIC_DEBUG
+ printf("%s: feature 0x%8x, cap 0x%8x, rx/txbuf %d/%d\n", DEVNAME(sc),
+ sc->sc_feature, sc->sc_cap, sc->sc_nrxbuf, sc->sc_ntxbuf);
+#endif
+
+ if (sc->sc_nrxbuf > VIC_NBUF_MAX || sc->sc_nrxbuf == 0)
+ sc->sc_nrxbuf = VIC_NBUF;
+ if (sc->sc_ntxbuf > VIC_NBUF_MAX || sc->sc_ntxbuf == 0)
+ sc->sc_ntxbuf = VIC_NBUF;
+
return (0);
}