summaryrefslogtreecommitdiffstats
path: root/sys/dev/cxgb/cxgb_main.c
diff options
context:
space:
mode:
authornp <np@FreeBSD.org>2009-11-13 00:28:16 +0000
committernp <np@FreeBSD.org>2009-11-13 00:28:16 +0000
commit51d617deb7c0c215274235b3ee871143a9cfc558 (patch)
treeb3edbde06917ecd2b31c988dd92c33524b022377 /sys/dev/cxgb/cxgb_main.c
parent2333ace6c1109d1059703e9ebbb79c1dc746deee (diff)
downloadFreeBSD-src-51d617deb7c0c215274235b3ee871143a9cfc558.zip
FreeBSD-src-51d617deb7c0c215274235b3ee871143a9cfc558.tar.gz
sc->rev and is_offload(sc) will always be 0 during probe. Wait till
attach to get correct values.
Diffstat (limited to 'sys/dev/cxgb/cxgb_main.c')
-rw-r--r--sys/dev/cxgb/cxgb_main.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/dev/cxgb/cxgb_main.c b/sys/dev/cxgb/cxgb_main.c
index 58ea2f7..545458f 100644
--- a/sys/dev/cxgb/cxgb_main.c
+++ b/sys/dev/cxgb/cxgb_main.c
@@ -355,7 +355,6 @@ cxgb_controller_probe(device_t dev)
const struct adapter_info *ai;
char *ports, buf[80];
int nports;
- struct adapter *sc = device_get_softc(dev);
ai = cxgb_get_adapter_info(dev);
if (ai == NULL)
@@ -367,9 +366,7 @@ cxgb_controller_probe(device_t dev)
else
ports = "ports";
- snprintf(buf, sizeof(buf), "%s %sNIC, rev: %d nports: %d %s",
- ai->desc, is_offload(sc) ? "R" : "",
- sc->params.rev, nports, ports);
+ snprintf(buf, sizeof(buf), "%s, %d %s", ai->desc, nports, ports);
device_set_desc_copy(dev, buf);
return (BUS_PROBE_DEFAULT);
}
@@ -665,8 +662,8 @@ cxgb_controller_attach(device_t dev)
G_FW_VERSION_MAJOR(vers), G_FW_VERSION_MINOR(vers),
G_FW_VERSION_MICRO(vers));
- snprintf(buf, sizeof(buf), "%s\t E/C: %s S/N: %s",
- ai->desc,
+ snprintf(buf, sizeof(buf), "%s %sNIC\t E/C: %s S/N: %s",
+ ai->desc, is_offload(sc) ? "R" : "",
sc->params.vpd.ec, sc->params.vpd.sn);
device_set_desc_copy(dev, buf);
OpenPOWER on IntegriCloud