diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2008-09-08 07:38:34 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2008-09-08 07:38:34 +0000 |
commit | cc7af6d6f392fc0f3edd65a1d55a0600aaa52299 (patch) | |
tree | c2608848f342a4192ddbcfd677c41a34eae0bb6e /sys/dev/mii/iophy.c | |
parent | 8aa62324f07d22813b96308137003b7087e161a1 (diff) |
IEEE 802.3 Annex 28B.3 explicitly specifies the following relative
priorities of the technologies supported by 802.3 Selector Field
value.
1000BASE-T full duplex
1000BASE-T
100BASE-T2 full duplex
100BASE-TX full duplex
100BASE-T2
100BASE-T4
100BASE-TX
10BASE-T full duplex
10BAST-T
However PHY drivers did not honor the order such that 100BASE-T4 had
higher priority than 100BASE-TX full duplex. Fix a long standing bug
such that PHY drivers choose the highest common denominator ability.
This bug is exposed by a Cisco 3550 switch which inadvertently
announces 100BASE-T4 capability even though it is not capable of
100BASE-T4 operation, it is a 100BASE-TX switch.
From FreeBSD
Tested with dc(4), fxp(4), rl(4), sis(4).
Diffstat (limited to 'sys/dev/mii/iophy.c')
-rw-r--r-- | sys/dev/mii/iophy.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/mii/iophy.c b/sys/dev/mii/iophy.c index 80208893980..52775ee6954 100644 --- a/sys/dev/mii/iophy.c +++ b/sys/dev/mii/iophy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iophy.c,v 1.15 2008/07/11 15:11:58 brad Exp $ */ +/* $OpenBSD: iophy.c,v 1.16 2008/09/08 07:38:33 brad Exp $ */ /* $NetBSD: iophy.c,v 1.8 2000/02/02 23:34:56 thorpej Exp $ */ /* @@ -250,10 +250,11 @@ iophy_status(sc) ext0 = PHY_READ(sc, MII_IOPHY_EXT0); if (ext0 & EXT0_SPEED) { - if (bmsr & BMSR_100T4) - mii->mii_media_active |= IFM_100_T4; - else + if (bmsr & BMSR_100TXFDX || + bmsr & BMSR_100TXHDX) mii->mii_media_active |= IFM_100_TX; + else + mii->mii_media_active |= IFM_100_T4; } else mii->mii_media_active |= IFM_10_T; |