sc->rev and is_offload(sc) will always be 0 during probe. Wait till
attach to get correct values.
This commit is contained in:
parent
c2eeded255
commit
7ead19d4a8
@ -355,7 +355,6 @@ cxgb_controller_probe(device_t dev)
|
|||||||
const struct adapter_info *ai;
|
const struct adapter_info *ai;
|
||||||
char *ports, buf[80];
|
char *ports, buf[80];
|
||||||
int nports;
|
int nports;
|
||||||
struct adapter *sc = device_get_softc(dev);
|
|
||||||
|
|
||||||
ai = cxgb_get_adapter_info(dev);
|
ai = cxgb_get_adapter_info(dev);
|
||||||
if (ai == NULL)
|
if (ai == NULL)
|
||||||
@ -367,9 +366,7 @@ cxgb_controller_probe(device_t dev)
|
|||||||
else
|
else
|
||||||
ports = "ports";
|
ports = "ports";
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "%s %sNIC, rev: %d nports: %d %s",
|
snprintf(buf, sizeof(buf), "%s, %d %s", ai->desc, nports, ports);
|
||||||
ai->desc, is_offload(sc) ? "R" : "",
|
|
||||||
sc->params.rev, nports, ports);
|
|
||||||
device_set_desc_copy(dev, buf);
|
device_set_desc_copy(dev, buf);
|
||||||
return (BUS_PROBE_DEFAULT);
|
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_MAJOR(vers), G_FW_VERSION_MINOR(vers),
|
||||||
G_FW_VERSION_MICRO(vers));
|
G_FW_VERSION_MICRO(vers));
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "%s\t E/C: %s S/N: %s",
|
snprintf(buf, sizeof(buf), "%s %sNIC\t E/C: %s S/N: %s",
|
||||||
ai->desc,
|
ai->desc, is_offload(sc) ? "R" : "",
|
||||||
sc->params.vpd.ec, sc->params.vpd.sn);
|
sc->params.vpd.ec, sc->params.vpd.sn);
|
||||||
device_set_desc_copy(dev, buf);
|
device_set_desc_copy(dev, buf);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user