From nobody@FreeBSD.org  Wed Oct 12 11:22:35 2005
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 74ECA16A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 12 Oct 2005 11:22:35 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 1EB3B43D48
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 12 Oct 2005 11:22:35 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j9CBMYeM046373
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 12 Oct 2005 11:22:34 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j9CBMYBK046372;
	Wed, 12 Oct 2005 11:22:34 GMT
	(envelope-from nobody)
Message-Id: <200510121122.j9CBMYBK046372@www.freebsd.org>
Date: Wed, 12 Oct 2005 11:22:34 GMT
From: Ilya Sher <ilya79@actcom.net.il>
To: freebsd-gnats-submit@FreeBSD.org
Subject: "vge0 attach returned 6" on FreeBSD 6.0-RC1 amd64
X-Send-Pr-Version: www-2.3

>Number:         87316
>Category:       amd64
>Synopsis:       [vge] "vge0 attach returned 6" on FreeBSD 6.0-RC1 amd64
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    yongari
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 12 11:30:09 GMT 2005
>Closed-Date:    Tue Jul 06 22:38:54 UTC 2010
>Last-Modified:  Tue Jul 06 22:38:54 UTC 2010
>Originator:     Ilya Sher
>Release:        6.0-RC1
>Organization:
>Environment:
FreeBSD c15 6.0-RC1 FreeBSD 6.0-RC1 #5: Wed Oct 12 12:25:58 IST 2005     ilya@c15:/usr/obj/usr/src/sys/MY  amd64
>Description:
              if_vge stopped working for no apparent reason. It worked for a while in FreeBSD 6 beta 5. After one of the reboots (IIRC no kernel upgrade) I have "vge0: MII read timed out, vge0: failed to start MII autopoll, vge0: MII without any phy!, device_attach: vge0 attach returned 6". cvsup'ped today (2005-10-12) but the problem persists.
>How-To-Repeat:
              The messages are there after each reboot.
>Fix:
              
>Release-Note:
>Audit-Trail:

From: Ilya Sher <ilya79@actcom.net.il>
To: bug-followup@FreeBSD.org, ilya79@actcom.net.il
Cc:  
Subject: Re: amd64/87316: [vge] "vge0 attach returned 6" on FreeBSD 6.0-RC1
 amd64
Date: Sat, 12 Nov 2005 18:55:18 +0200

 if_vge does work on the same system (only HD replaced)
 after fresh install of 6.0 release.
 
 However, it is not detected during the install -
 does not appear in the menu that allows to
 configure the inerface(s).

From: Ilya Sher <ilya79@actcom.net.il>
To: bug-followup@FreeBSD.org, ilya79@actcom.net.il
Cc:  
Subject: Re: amd64/87316: [vge] "vge0 attach returned 6" on FreeBSD 6.0-RC1
 amd64
Date: Sun, 13 Nov 2005 22:38:16 +0200

 > if_vge does work on the same system
 it only worked for 2 reboots
 
 * loading if_vge later does not help
 
 * the problem narrowed down to if_vge.c:
   vge_miibus_readreg():
         /* Wait for the read command bit to self-clear. */
         for (i = 0; i < VGE_TIMEOUT; i++) {
                 DELAY(1);
                 if ((CSR_READ_1(sc, VGE_MIICMD) & VGE_MIICMD_RCMD) == 0)
                         break;
         }
 
   Looks like the bit is not automagically cleared.
 
 
State-Changed-From-To: open->feedback 
State-Changed-By: yongari 
State-Changed-When: Tue Dec 15 20:13:26 UTC 2009 
State-Changed-Why:  
Would you try the patch at the following URL? 
http://people.freebsd.org/~yongari/vge/vge.miipoll.diff 
The patch generated against latest CURRENT. 



Responsible-Changed-From-To: freebsd-amd64->yongari 
Responsible-Changed-By: yongari 
Responsible-Changed-When: Tue Dec 15 20:13:26 UTC 2009 
Responsible-Changed-Why:  
Grab. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=87316 
State-Changed-From-To: feedback->closed 
State-Changed-By: yongari 
State-Changed-When: Tue Jul 6 22:38:27 UTC 2010 
State-Changed-Why:  
Feedback timeout(> 6 months). If you're able to reproduce the issue 
on more recent FreeBSD releases, please open new PR. 

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