diff options
| author | drochner <drochner@NetBSD.org> | 2003-03-27 19:36:49 +0000 |
|---|---|---|
| committer | drochner <drochner@NetBSD.org> | 2003-03-27 19:36:49 +0000 |
| commit | ba0f309a91c5cbcf385837dac281d29a845bcdfd (patch) | |
| tree | b99e45b26539de664ce87cf96fbe4a1399e9b111 /sys/dev | |
| parent | 5fe02453b5f6c031b57c0cf1469a0ca3d42b7501 (diff) | |
Before checking the (Intel specific) SCR_T4 register, make
sure the chip implements 100T4 (in BMSR).
The 82562 (which doesn't implement 100T4) has the SCR_T4 bit
(always?) set, which led to wrong media status reports.
approved by thorpej
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/mii/inphy.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/mii/inphy.c b/sys/dev/mii/inphy.c index 151eb235146..783d34fb174 100644 --- a/sys/dev/mii/inphy.c +++ b/sys/dev/mii/inphy.c @@ -1,4 +1,4 @@ -/* $NetBSD: inphy.c,v 1.33 2003/03/07 00:14:38 matt Exp $ */ +/* $NetBSD: inphy.c,v 1.34 2003/03/27 19:36:49 drochner Exp $ */ /*- * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. @@ -72,7 +72,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: inphy.c,v 1.33 2003/03/07 00:14:38 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: inphy.c,v 1.34 2003/03/27 19:36:49 drochner Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -255,7 +255,7 @@ inphy_status(struct mii_softc *sc) return; } scr = PHY_READ(sc, MII_INPHY_SCR); - if (scr & SCR_T4) + if ((bmsr & BMSR_100T4) && (scr & SCR_T4)) mii->mii_media_active |= IFM_100_T4; else if (scr & SCR_S100) mii->mii_media_active |= IFM_100_TX; |
