diff options
author | dim <dim@FreeBSD.org> | 2010-11-16 10:33:41 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2010-11-16 10:33:41 +0000 |
commit | b0df1c137c1d7cc6c086e8c3de63b91a97e180c7 (patch) | |
tree | 56f0dadc92981a1efbf66b53a434baa21a8c2c82 /sys/dev/mii | |
parent | b355314642d1e24edf4e05d08b793f8b9ea76458 (diff) | |
download | FreeBSD-src-b0df1c137c1d7cc6c086e8c3de63b91a97e180c7.zip FreeBSD-src-b0df1c137c1d7cc6c086e8c3de63b91a97e180c7.tar.gz |
Sync: merge r215319 through r215395 from ^/head, so ports can actually
build! :)
Diffstat (limited to 'sys/dev/mii')
-rw-r--r-- | sys/dev/mii/brgphy.c | 22 | ||||
-rw-r--r-- | sys/dev/mii/mii.c | 3 |
2 files changed, 16 insertions, 9 deletions
diff --git a/sys/dev/mii/brgphy.c b/sys/dev/mii/brgphy.c index 96947d4..58adc53 100644 --- a/sys/dev/mii/brgphy.c +++ b/sys/dev/mii/brgphy.c @@ -154,15 +154,19 @@ static int detect_hs21(struct bce_softc *bce_sc) { char *sysenv; - - if (bce_sc->bce_chipid != HS21_BCM_CHIPID) - return (0); - sysenv = getenv("smbios.system.product"); - if (sysenv == NULL) - return (0); - if (strncmp(sysenv, HS21_PRODUCT_ID, strlen(HS21_PRODUCT_ID)) != 0) - return (0); - return (1); + int found; + + found = 0; + if (bce_sc->bce_chipid == HS21_BCM_CHIPID) { + sysenv = getenv("smbios.system.product"); + if (sysenv != NULL) { + if (strncmp(sysenv, HS21_PRODUCT_ID, + strlen(HS21_PRODUCT_ID)) == 0) + found = 1; + freeenv(sysenv); + } + } + return (found); } /* Search for our PHY in the list of known PHYs */ diff --git a/sys/dev/mii/mii.c b/sys/dev/mii/mii.c index 79378f5..3df5dfa 100644 --- a/sys/dev/mii/mii.c +++ b/sys/dev/mii/mii.c @@ -438,6 +438,9 @@ mii_attach(device_t dev, device_t *miibus, struct ifnet *ifp, rv = bus_generic_attach(dev); if (rv != 0) goto fail; + + /* Attaching of the PHY drivers is done in miibus_attach(). */ + return (0); } rv = bus_generic_attach(*miibus); if (rv != 0) |