From nobody@FreeBSD.org  Mon Dec 29 05:33:56 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E68B51065670
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 29 Dec 2008 05:33:56 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id D70058FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 29 Dec 2008 05:33:56 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id mBT5Xu8r039475
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 29 Dec 2008 05:33:56 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id mBT5XuQe039474;
	Mon, 29 Dec 2008 05:33:56 GMT
	(envelope-from nobody)
Message-Id: <200812290533.mBT5XuQe039474@www.freebsd.org>
Date: Mon, 29 Dec 2008 05:33:56 GMT
From: Eugene Gladchenko <eugene@donpac.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: re0: PHY write failed - RTL8111C problem
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         130011
>Category:       kern
>Synopsis:       [re] re0: PHY write failed - RTL8111C problem
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    yongari
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 29 05:40:00 UTC 2008
>Closed-Date:    Tue Feb 17 07:52:19 UTC 2009
>Last-Modified:  Tue Feb 17 07:52:19 UTC 2009
>Originator:     Eugene Gladchenko
>Release:        7.1-RC1
>Organization:
>Environment:
FreeBSD ascot.gladchenko.ru 7.1-RC1 FreeBSD 7.1-RC1 #0: Mon Dec 29 05:39:52 MSK 2008     root@example.net:/usr/obj/usr/src/sys/ASCOT  i386
>Description:
I've just tried to upgrade to 7.1-RC2 and encountered the problem with an on-board gigabit RealTek. It doesn't work at all:

re0: <RealTek 8168/8168B/8168C/8168CP/8111B/8111C/8111CP PCIe Gigabit Ethernet> port 0xc000-0xc0ff mem 0xe2010000-0xe2010fff,0xe2000000-0xe200ffff irq 17 at device 0.0 on pci4
re0: Chip rev. 0x3c000000
re0: MAC rev. 0x00400000
re0: PHY write failed
re0: PHY write failed
re0: MII without any phy!
device_attach: re0 attach returned 6

I had to downgrade back to tag=RELENG_7_1 date=2008.12.16.00.00.00 to get the working system.

Here is pciconf -lv output for the NIC:

re0@pci0:2:0:0: class=0x020000 card=0xe0001458 chip=0x816810ec rev=0x02 hdr=0x00
    vendor     = 'Realtek Semiconductor'
    device     = 'RTL8168/8111 PCI-E Gigabit Ethernet NIC'
    class      = network
    subclass   = ethernet

The motherboard is a GigaByte GA-G31M-S2L.

I'd expect this to get fixed before 7.1-RELEASE is out.
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->yongari 
Responsible-Changed-By: remko 
Responsible-Changed-When: Mon Dec 29 08:58:48 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=130011 
State-Changed-From-To: open->feedback 
State-Changed-By: yongari 
State-Changed-When: Tue Dec 30 00:20:29 UTC 2008 
State-Changed-Why:  
Your controller looks like RTL8168C SPIN2 and I think the fix for 
the issue was committed to HEAD(r186210). So I guess you can get 
re(4)/rl(4) source from latest HEAD and buid it on 7.1-RC1. 
Specifically download the following files from HEAD. 
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/re/if_re.c 
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/pci/if_rl.c 
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/pci/if_rlreg.h 

Select latest revision from the URL and after downloading the files 
above, 
1. copy if_re.c to /usr/src/sys/dev/re/ 
2. copy if_rl.c to /usr/src/sys/pci 
3. copy if_rlreg.h to /usr/src/sys/pci 
And rebuild/reboot your kernel. 
Can you confirm it solve your issue? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=130011 

From: Eugene Gladchenko <eugene@donpac.ru>
To: bug-followup@FreeBSD.org, eugene@donpac.ru
Cc:  
Subject: Re: kern/130011: [re] re0: PHY write failed - RTL8111C problem
Date: Tue, 30 Dec 2008 13:28:11 +0300

 Thank you very much! It did help and it appears to work.
 
 -- 
 Eugene Gladchenko
 EVG15-RIPE
 
 
 
State-Changed-From-To: feedback->patched 
State-Changed-By: yongari 
State-Changed-When: Tue Dec 30 10:55:03 UTC 2008 
State-Changed-Why:  
Submitter confirms r186210 fixed the issue. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=130011 
State-Changed-From-To: patched->closed 
State-Changed-By: yongari 
State-Changed-When: Tue Feb 17 07:51:43 UTC 2009 
State-Changed-Why:  
MFC done. Thanks for testing! 

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