From owner-freebsd-net@FreeBSD.ORG Tue Nov 23 09:45:09 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B564816A4CE for ; Tue, 23 Nov 2004 09:45:09 +0000 (GMT) Received: from transport.cksoft.de (transport.cksoft.de [62.111.66.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1990B43D41 for ; Tue, 23 Nov 2004 09:45:09 +0000 (GMT) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from transport.cksoft.de (localhost [127.0.0.1]) by transport.cksoft.de (Postfix) with ESMTP id 39E561FFACA for ; Tue, 23 Nov 2004 10:45:07 +0100 (CET) Received: by transport.cksoft.de (Postfix, from userid 66) id 578991FF9AF; Tue, 23 Nov 2004 10:45:05 +0100 (CET) Received: by mail.int.zabbadoz.net (Postfix, from userid 1060) id 6621F156C2; Tue, 23 Nov 2004 09:44:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.int.zabbadoz.net (Postfix) with ESMTP id 5B4D715596 for ; Tue, 23 Nov 2004 09:44:05 +0000 (UTC) Date: Tue, 23 Nov 2004 09:44:05 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@e0-0.zab2.int.zabbadoz.net To: freebsd-net@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS cksoft-s20020300-20031204bz on transport.cksoft.de Subject: please test: miibus GE ony PHY detection X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 09:45:09 -0000 Please test: ! ! With the changes from mii.h rev 1.4 to adopt NetBSD checks ! using BMSR_MEDIAMASK it was missed that in rev 1.26 of mii.c ! in NetBSD there had been another change: ! ! : When probing for a PHY, look at the EXTSTAT bit in the BMSR, as well, ! : not just the media mask. This prevents PHYs/TBIs that only support ! : Gigabit media from slipping through the cracks. ! ! With this GE only ones like from the SK-9844 are detected again. ! Index: mii.c =================================================================== RCS file: /local/mirror/FreeBSD/r/ncvs/src/sys/dev/mii/mii.c,v retrieving revision 1.20 diff -u -p -r1.20 mii.c --- mii.c 15 Aug 2004 06:24:40 -0000 1.20 +++ mii.c 23 Nov 2004 08:46:30 -0000 @@ -125,7 +125,7 @@ miibus_probe(dev) */ bmsr = MIIBUS_READREG(parent, ma.mii_phyno, MII_BMSR); if (bmsr == 0 || bmsr == 0xffff || - (bmsr & BMSR_MEDIAMASK) == 0) { + (bmsr & (BMSR_EXTSTAT|BMSR_MEDIAMASK)) == 0) { /* Assume no PHY at this address. */ continue; } @@ -316,7 +316,7 @@ mii_phy_probe(dev, child, ifmedia_upd, i for (i = 0; i < MII_NPHY; i++) { bmsr = MIIBUS_READREG(dev, i, MII_BMSR); if (bmsr == 0 || bmsr == 0xffff || - (bmsr & BMSR_MEDIAMASK) == 0) { + (bmsr & (BMSR_EXTSTAT|BMSR_MEDIAMASK)) == 0) { /* Assume no PHY at this address. */ continue; } else -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT