summaryrefslogtreecommitdiff
path: root/sys/dev/mii/rgephy.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/mii/rgephy.c')
-rw-r--r--sys/dev/mii/rgephy.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/mii/rgephy.c b/sys/dev/mii/rgephy.c
index 0813b3ebdec..6b5874e76e6 100644
--- a/sys/dev/mii/rgephy.c
+++ b/sys/dev/mii/rgephy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rgephy.c,v 1.17 2006/10/07 23:44:51 brad Exp $ */
+/* $OpenBSD: rgephy.c,v 1.18 2006/12/20 22:18:05 kettenis Exp $ */
/*
* Copyright (c) 2003
* Bill Paul <wpaul@windriver.com>. All rights reserved.
@@ -301,7 +301,7 @@ void
rgephy_status(struct mii_softc *sc)
{
struct mii_data *mii = sc->mii_pdata;
- int bmsr, bmcr;
+ int bmsr, bmcr, gtsr;
mii->mii_media_status = IFM_AVALID;
mii->mii_media_active = IFM_ETHER;
@@ -334,6 +334,11 @@ rgephy_status(struct mii_softc *sc)
mii->mii_media_active |= IFM_10_T;
if (bmsr & RL_GMEDIASTAT_FDX)
mii->mii_media_active |= IFM_FDX;
+
+ gtsr = PHY_READ(sc, RGEPHY_MII_1000STS);
+ if ((mii->mii_media_active & IFM_1000_T) &&
+ gtsr & RGEPHY_1000STS_MSR)
+ mii->mii_media_active |= IFM_ETH_MASTER;
}