summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreyk <reyk@openbsd.org>2006-12-03 13:58:58 +0000
committerreyk <reyk@openbsd.org>2006-12-03 13:58:58 +0000
commitc389aaf2ecdae9422b7f9857291a8e5d0b4daac1 (patch)
tree83df31c37aaec8034a5e0611faee3b80089fb770
parentAdd Rapid Spanning Tree Protocol support (802.1d-2004) based on work (diff)
downloadwireguard-openbsd-c389aaf2ecdae9422b7f9857291a8e5d0b4daac1.tar.xz
wireguard-openbsd-c389aaf2ecdae9422b7f9857291a8e5d0b4daac1.zip
re-add a tiny little #ifdef VIC_DEBUG, used to compare the vic(4)
features and capabilities on different vmware platforms.
-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);
}