From nobody@FreeBSD.org  Tue Nov  9 17:22:14 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id C987D16A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  9 Nov 2004 17:22:14 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id BBD1343D41
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  9 Nov 2004 17:22:14 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.11/8.12.11) with ESMTP id iA9HMEeb067852
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 9 Nov 2004 17:22:14 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.11/8.12.11/Submit) id iA9HMENw067851;
	Tue, 9 Nov 2004 17:22:14 GMT
	(envelope-from nobody)
Message-Id: <200411091722.iA9HMENw067851@www.freebsd.org>
Date: Tue, 9 Nov 2004 17:22:14 GMT
From: Randy Reitz <rreitz@fnal.gov>
To: freebsd-gnats-submit@FreeBSD.org
Subject: if_sk.ko fails to load with "no PHY found"
X-Send-Pr-Version: www-2.3

>Number:         73725
>Category:       kern
>Synopsis:       if_sk.ko fails to load with "no PHY found"
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bz
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 09 17:30:07 GMT 2004
>Closed-Date:    Tue Dec 14 22:26:18 GMT 2004
>Last-Modified:  Tue Dec 14 22:26:18 GMT 2004
>Originator:     Randy Reitz
>Release:        5.3-STABLE
>Organization:
Fermilab
>Environment:
FreeBSD gumshoe.fnal.gov 5.3-STABLE FreeBSD 5.3-STABLE #8: Mon Nov  8 21:26:36 CST 2004     rreitz@gumshoe.fnal.gov:/usr/obj/usr/src/sys/GUMSHOE  i386
>Description:
skc0: <SysKonnect Gigabit Ethernet (V1.0)> port 0x1000-0x10ff mem 0xf4000000-0xf4003fff irq 20 at device 8.0 on pci0
skc0: SysKonnect SK-NET Gigabit Ethernet Adapter SK-9844 SX dual link
sk0: <XaQti Corp. XMAC II> on skc0
sk0: Ethernet address: 00:00:5a:9a:f5:28
skc0: no PHY found!
device_attach: sk0 attach returned 6
sk1: <XaQti Corp. XMAC II> on skc0
sk1: Ethernet address: 00:00:5a:9a:f5:29
skc1: no PHY found!
device_attach: sk1 attach returned 6
      
>How-To-Repeat:
# kldload -v if_sk.ko
Loaded if_sk.ko, id=6    
>Fix:
None
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: bz 
State-Changed-When: Tue Nov 23 09:47:35 GMT 2004 
State-Changed-Why:  
Please try this patch: 

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 


Responsible-Changed-From-To: freebsd-bugs->bz 
Responsible-Changed-By: bz 
Responsible-Changed-When: Tue Nov 23 09:47:35 GMT 2004 
Responsible-Changed-Why:  
I'll handle this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=73725 
State-Changed-From-To: feedback->closed 
State-Changed-By: bz 
State-Changed-When: Tue Dec 14 22:22:06 GMT 2004 
State-Changed-Why:  
HEAD and RELENG_5 have a fix for this. Thanks for reporting. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=73725 
>Unformatted:
