diff options
| author | Marius Strobl <marius@FreeBSD.org> | 2009-01-15 20:13:22 +0000 |
|---|---|---|
| committer | Marius Strobl <marius@FreeBSD.org> | 2009-01-15 20:13:22 +0000 |
| commit | 2cff0c0960587ed21a56387f3dcfddc2bcc49564 (patch) | |
| tree | a312579f5ba4dc3c4919a87e2306deb6a430d81c /sys/dev/bge | |
| parent | 138c12d19a380c5456176a298b5132e364a4ebe2 (diff) | |
Notes
Diffstat (limited to 'sys/dev/bge')
| -rw-r--r-- | sys/dev/bge/if_bge.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index d55471210f12..fa332d789756 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -134,7 +134,7 @@ MODULE_DEPEND(bge, miibus, 1, 1, 1); * ID burned into it, though it will always be overriden by the vendor * ID in the EEPROM. Just to be safe, we cover all possibilities. */ -static struct bge_type { +static const struct bge_type { uint16_t bge_vid; uint16_t bge_did; } bge_devs[] = { @@ -1861,7 +1861,7 @@ bge_lookup_vendor(uint16_t vid) static int bge_probe(device_t dev) { - struct bge_type *t = bge_devs; + const struct bge_type *t = bge_devs; struct bge_softc *sc = device_get_softc(dev); uint16_t vid, did; @@ -1883,7 +1883,8 @@ bge_probe(device_t dev) #if __FreeBSD_version > 700024 const char *pname; - if (pci_get_vpd_ident(dev, &pname) == 0) + if (bge_has_eaddr(sc) && + pci_get_vpd_ident(dev, &pname) == 0) snprintf(model, 64, "%s", pname); else #endif |
