diff options
author | mckay <mckay@FreeBSD.org> | 2007-05-10 13:10:34 +0000 |
---|---|---|
committer | mckay <mckay@FreeBSD.org> | 2007-05-10 13:10:34 +0000 |
commit | 7ecd2bfd0ff9fba73a9c20a0bd41a602fbc5717e (patch) | |
tree | 73147ce4c7a807dcdcb3ea8a27e1bf8023b3b5c9 /sys/dev/sk | |
parent | 53109c1e0622fd4b07b184fee89de47f92d4fc7c (diff) | |
download | FreeBSD-src-7ecd2bfd0ff9fba73a9c20a0bd41a602fbc5717e.zip FreeBSD-src-7ecd2bfd0ff9fba73a9c20a0bd41a602fbc5717e.tar.gz |
Make a missing or empty VPD non-fatal, as it was prior to rev 1.131.
With this change, my D-Link DGE-530T rev A1 is operational again.
Diffstat (limited to 'sys/dev/sk')
-rw-r--r-- | sys/dev/sk/if_sk.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/dev/sk/if_sk.c b/sys/dev/sk/if_sk.c index 605fb61..c774e8b 100644 --- a/sys/dev/sk/if_sk.c +++ b/sys/dev/sk/if_sk.c @@ -1552,7 +1552,7 @@ skc_attach(dev) struct sk_softc *sc; int error = 0, *port; uint8_t skrs; - const char *pname; + const char *pname = NULL; char *revstr; sc = device_get_softc(dev); @@ -1671,16 +1671,14 @@ skc_attach(dev) case DEVICEID_DLINK_DGE530T_A1: case DEVICEID_DLINK_DGE530T_B1: /* Stay with VPD PN. */ - if (pci_get_vpd_ident(dev, &pname)) - goto vpdfailed; + (void) pci_get_vpd_ident(dev, &pname); break; case DEVICEID_SK_V2: /* YUKON VPD PN might bear no resemblance to reality. */ switch (sc->sk_type) { case SK_GENESIS: /* Stay with VPD PN. */ - if (pci_get_vpd_ident(dev, &pname)) - goto vpdfailed; + (void) pci_get_vpd_ident(dev, &pname); break; case SK_YUKON: pname = "Marvell Yukon Gigabit Ethernet"; @@ -1717,7 +1715,6 @@ skc_attach(dev) } break; default: -vpdfailed: device_printf(dev, "unknown device: vendor=%04x, device=%04x, " "chipver=%02x, rev=%x\n", pci_get_vendor(dev), pci_get_device(dev), @@ -1746,8 +1743,9 @@ vpdfailed: } /* Announce the product name and more VPD data if there. */ - device_printf(dev, "%s rev. %s(0x%x)\n", - pname != NULL ? pname : "<unknown>", revstr, sc->sk_rev); + if (pname != NULL) + device_printf(dev, "%s rev. %s(0x%x)\n", + pname, revstr, sc->sk_rev); if (bootverbose) { device_printf(dev, "chip ver = 0x%02x\n", sc->sk_type); |