diff options
author | marius <marius@FreeBSD.org> | 2006-11-27 23:50:19 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2006-11-27 23:50:19 +0000 |
commit | e0c840ca32a5bb5bebaccbe99416f0578d8c67eb (patch) | |
tree | 319048ff1a919bb641ef590df465525d9fede0a7 /sys/dev/mii/gentbi.c | |
parent | 08a258453383859edd0bbf92eb53a12b42997b6c (diff) | |
download | FreeBSD-src-e0c840ca32a5bb5bebaccbe99416f0578d8c67eb.zip FreeBSD-src-e0c840ca32a5bb5bebaccbe99416f0578d8c67eb.tar.gz |
Analogous to mii_add_media(), factor out the code for checking whether
the BMSR contains any media at all to mii_phy_add_media(). The majority
of the drivers currently using mii_phy_add_media() were missing such a
check anyway though.
MFC after: 2 weeks
Diffstat (limited to 'sys/dev/mii/gentbi.c')
-rw-r--r-- | sys/dev/mii/gentbi.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/dev/mii/gentbi.c b/sys/dev/mii/gentbi.c index 06ce458..9660419 100644 --- a/sys/dev/mii/gentbi.c +++ b/sys/dev/mii/gentbi.c @@ -198,11 +198,7 @@ gentbi_attach(device_t dev) sc->mii_extcapabilities = PHY_READ(sc, MII_EXTSR); device_printf(dev, " "); - if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0 && - (sc->mii_extcapabilities & EXTSR_MEDIAMASK) == 0) - printf("no media present"); - else - mii_phy_add_media(sc); + mii_phy_add_media(sc); printf("\n"); return (0); |