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/nsphy.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/nsphy.c')
-rw-r--r-- | sys/dev/mii/nsphy.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/mii/nsphy.c b/sys/dev/mii/nsphy.c index bc7fa53d13d..05c9fdaa329 100644 --- a/sys/dev/mii/nsphy.c +++ b/sys/dev/mii/nsphy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nsphy.c,v 1.23 2008/06/26 05:42:16 ray Exp $ */ +/* $OpenBSD: nsphy.c,v 1.24 2008/09/08 07:38:33 brad Exp $ */ /* $NetBSD: nsphy.c,v 1.25 2000/02/02 23:34:57 thorpej Exp $ */ /*- @@ -282,10 +282,10 @@ nsphy_status(struct mii_softc *sc) if (PHY_READ(sc, MII_ANER) & ANER_LPAN) { anlpar = PHY_READ(sc, MII_ANAR) & PHY_READ(sc, MII_ANLPAR); - if (anlpar & ANLPAR_T4) - mii->mii_media_active |= IFM_100_T4|IFM_HDX; - else if (anlpar & ANLPAR_TX_FD) + if (anlpar & ANLPAR_TX_FD) mii->mii_media_active |= IFM_100_TX|IFM_FDX; + else if (anlpar & ANLPAR_T4) + mii->mii_media_active |= IFM_100_T4|IFM_HDX; else if (anlpar & ANLPAR_TX) mii->mii_media_active |= IFM_100_TX|IFM_HDX; else if (anlpar & ANLPAR_10_FD) |