From ba0f309a91c5cbcf385837dac281d29a845bcdfd Mon Sep 17 00:00:00 2001 From: drochner Date: Thu, 27 Mar 2003 19:36:49 +0000 Subject: 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 --- sys/dev/mii/inphy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/dev') 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 -__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 #include @@ -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; -- cgit