diff options
author | gnn <gnn@FreeBSD.org> | 2008-12-05 21:40:11 +0000 |
---|---|---|
committer | gnn <gnn@FreeBSD.org> | 2008-12-05 21:40:11 +0000 |
commit | 5832ddeb002fc81339a8307cc06a955a3262345b (patch) | |
tree | 96580bcf179d1cbdb431d54d041b076a7a4e95d0 /sys | |
parent | 1c56af0e2d11d9778380f810b3e428ec6026961c (diff) | |
download | FreeBSD-src-5832ddeb002fc81339a8307cc06a955a3262345b.zip FreeBSD-src-5832ddeb002fc81339a8307cc06a955a3262345b.tar.gz |
Re submit code to print the part and serial number for Chelsio cards.
The original code was accidentally removed in another commit.
MFC after: 1 day
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/cxgb/cxgb_main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/dev/cxgb/cxgb_main.c b/sys/dev/cxgb/cxgb_main.c index 581cc09..f0492c2 100644 --- a/sys/dev/cxgb/cxgb_main.c +++ b/sys/dev/cxgb/cxgb_main.c @@ -402,6 +402,8 @@ cxgb_controller_attach(device_t dev) int msi_needed, reg; #endif int must_load = 0; + char buf[80]; + sc = device_get_softc(dev); sc->dev = dev; sc->msi_count = 0; @@ -614,6 +616,11 @@ 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, + sc->params.vpd.ec, sc->params.vpd.sn); + device_set_desc_copy(dev, buf); + device_printf(sc->dev, "Firmware Version %s\n", &sc->fw_version[0]); callout_reset(&sc->cxgb_tick_ch, CXGB_TICKS(sc), cxgb_tick, sc); t3_add_attach_sysctls(sc); |