summaryrefslogtreecommitdiffstats
path: root/sys/pci
diff options
context:
space:
mode:
authormdodd <mdodd@FreeBSD.org>2003-08-23 18:09:25 +0000
committermdodd <mdodd@FreeBSD.org>2003-08-23 18:09:25 +0000
commitcea9a5fcc59afc95f24c82f7c01f28cec4662a70 (patch)
tree9366c4d07e552ac35b29d0afc0af777cba7c66b5 /sys/pci
parent7694211a9f6c5b3db9fe446e2a4913c7e5ed40ad (diff)
downloadFreeBSD-src-cea9a5fcc59afc95f24c82f7c01f28cec4662a70.zip
FreeBSD-src-cea9a5fcc59afc95f24c82f7c01f28cec4662a70.tar.gz
Report media status for bitrate PHYs.
Diffstat (limited to 'sys/pci')
-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 93db5b8..5d83aca 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:
OpenPOWER on IntegriCloud