aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMatthew N. Dodd <mdodd@FreeBSD.org>2003-08-23 18:09:25 +0000
committerMatthew N. Dodd <mdodd@FreeBSD.org>2003-08-23 18:09:25 +0000
commit0c5eb28b6b85b05e4867ccba4b2ff116ea77d010 (patch)
tree9366c4d07e552ac35b29d0afc0af777cba7c66b5 /sys
parent34345c0870bb070f9a6e13e3c5162aea8dc66a4c (diff)
downloadsrc-0c5eb28b6b85b05e4867ccba4b2ff116ea77d010.tar.gz
src-0c5eb28b6b85b05e4867ccba4b2ff116ea77d010.zip
Report media status for bitrate PHYs.
Notes
Notes: svn path=/head/; revision=119369
Diffstat (limited to 'sys')
-rw-r--r--sys/pci/if_xl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/pci/if_xl.c b/sys/pci/if_xl.c
index 93db5b8a5b3a..5d83acab0dfb 100644
--- a/sys/pci/if_xl.c
+++ b/sys/pci/if_xl.c
@@ -3020,17 +3020,25 @@ xl_ifmedia_sts(ifp, ifmr)
{
struct xl_softc *sc;
u_int32_t icfg;
+ u_int16_t status = 0;
struct mii_data *mii = NULL;
sc = ifp->if_softc;
if (sc->xl_miibus != NULL)
mii = device_get_softc(sc->xl_miibus);
+ XL_SEL_WIN(4);
+ status = CSR_READ_2(sc, XL_W4_MEDIA_STATUS);
+
XL_SEL_WIN(3);
icfg = CSR_READ_4(sc, XL_W3_INTERNAL_CFG) & XL_ICFG_CONNECTOR_MASK;
icfg >>= XL_ICFG_CONNECTOR_BITS;
ifmr->ifm_active = IFM_ETHER;
+ ifmr->ifm_status = IFM_AVALID;
+
+ if ((status & XL_MEDIASTAT_CARRIER) == 0)
+ ifmr->ifm_status |= IFM_ACTIVE;
switch(icfg) {
case XL_XCVR_10BT: