diff options
author | marius <marius@FreeBSD.org> | 2010-10-03 17:00:57 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2010-10-03 17:00:57 +0000 |
commit | d0f9146ceecb9f4cddb582a45af08a5d84271fb6 (patch) | |
tree | 0b038b8f75b103c62cca82c7f5f5ed8385e5ad37 /sys/dev/dc | |
parent | 91a938a7c56ab798b0e49b73d0efc3791f267969 (diff) | |
download | FreeBSD-src-d0f9146ceecb9f4cddb582a45af08a5d84271fb6.zip FreeBSD-src-d0f9146ceecb9f4cddb582a45af08a5d84271fb6.tar.gz |
Consistently always explicitly set IFM_HDX for half-duplex.
Obtained from: OpenBSD (mostly)
Diffstat (limited to 'sys/dev/dc')
-rw-r--r-- | sys/dev/dc/dcphy.c | 12 | ||||
-rw-r--r-- | sys/dev/dc/pnphy.c | 2 |
2 files changed, 9 insertions, 5 deletions
diff --git a/sys/dev/dc/dcphy.c b/sys/dev/dc/dcphy.c index 5d8d6fa..1fd621c 100644 --- a/sys/dev/dc/dcphy.c +++ b/sys/dev/dc/dcphy.c @@ -341,14 +341,14 @@ dcphy_status(struct mii_softc *sc) mii->mii_media_active |= IFM_100_TX | IFM_FDX; else if (anlpar & ANLPAR_T4 && sc->mii_capabilities & BMSR_100T4) - mii->mii_media_active |= IFM_100_T4; + mii->mii_media_active |= IFM_100_T4 | IFM_HDX; else if (anlpar & ANLPAR_TX && sc->mii_capabilities & BMSR_100TXHDX) - mii->mii_media_active |= IFM_100_TX; + mii->mii_media_active |= IFM_100_TX | IFM_HDX; else if (anlpar & ANLPAR_10_FD) mii->mii_media_active |= IFM_10_T | IFM_FDX; else if (anlpar & ANLPAR_10) - mii->mii_media_active |= IFM_10_T; + mii->mii_media_active |= IFM_10_T | IFM_HDX; else mii->mii_media_active |= IFM_NONE; if (DC_IS_INTEL(dc_sc)) @@ -366,9 +366,9 @@ dcphy_status(struct mii_softc *sc) * change the media settings if we're wrong. */ if (!(reg & DC_TSTAT_LS100)) - mii->mii_media_active |= IFM_100_TX; + mii->mii_media_active |= IFM_100_TX | IFM_HDX; else if (!(reg & DC_TSTAT_LS10)) - mii->mii_media_active |= IFM_10_T; + mii->mii_media_active |= IFM_10_T | IFM_HDX; else mii->mii_media_active |= IFM_NONE; if (DC_IS_INTEL(dc_sc)) @@ -383,6 +383,8 @@ skip: mii->mii_media_active |= IFM_100_TX; if (CSR_READ_4(dc_sc, DC_NETCFG) & DC_NETCFG_FULLDUPLEX) mii->mii_media_active |= IFM_FDX; + else + mii->mii_media_active |= IFM_HDX; } static int diff --git a/sys/dev/dc/pnphy.c b/sys/dev/dc/pnphy.c index 28d02bb..570ee5f 100644 --- a/sys/dev/dc/pnphy.c +++ b/sys/dev/dc/pnphy.c @@ -237,4 +237,6 @@ pnphy_status(struct mii_softc *sc) mii->mii_media_active |= IFM_100_TX; if (CSR_READ_4(dc_sc, DC_NETCFG) & DC_NETCFG_FULLDUPLEX) mii->mii_media_active |= IFM_FDX; + else + mii->mii_media_active |= IFM_HDX; } |