Indicate at probe time if device can do offload and which revision it is

MFC after:	3 days
This commit is contained in:
Kip Macy 2008-09-02 22:38:49 +00:00
parent f90e41acf3
commit 6eb15755c7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=182695

View File

@ -375,6 +375,7 @@ 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)
@ -386,7 +387,9 @@ cxgb_controller_probe(device_t dev)
else
ports = "ports";
snprintf(buf, sizeof(buf), "%s RNIC, %d %s", ai->desc, nports, ports);
snprintf(buf, sizeof(buf), "%s %sNIC, rev: %d nports: %d %s",
ai->desc, is_offload(sc) ? "R" : "",
sc->params.rev, nports, ports);
device_set_desc_copy(dev, buf);
return (BUS_PROBE_DEFAULT);
}