From nobody@FreeBSD.org  Sun Nov  3 14:46:19 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id 174218ED
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  3 Nov 2013 14:46:19 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id E050421FC
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  3 Nov 2013 14:46:18 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id rA3EkIh7090226
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 3 Nov 2013 14:46:18 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id rA3EkIFl090223;
	Sun, 3 Nov 2013 14:46:18 GMT
	(envelope-from nobody)
Message-Id: <201311031446.rA3EkIFl090223@oldred.freebsd.org>
Date: Sun, 3 Nov 2013 14:46:18 GMT
From: Danny Winn <danny.gabriel.winn@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: RTL8111/8168B PCIE NIC not detected on any FreeBSD Version
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         183620
>Category:       kern
>Synopsis:       RTL8111/8168B PCIE NIC not detected on any FreeBSD Version
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    yongari
>State:          feedback
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 03 14:50:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Wed Nov 06 04:23:28 UTC 2013
>Originator:     Danny Winn
>Release:        8.4, 9.1, 9.2, 10.0-BETA2 (same bug in all releases)
>Organization:
>Environment:
Every version/kernel/environment mentioned above
>Description:
Hello,

we are trying to install FreeBSD on a computer that uses the NIC mentioned above. The NIC is running under linux without problems, which we've tested for several days transferring several GB of data.

The NIC is neither detected by the FreeBSD installer when attempting to setup the network, nor after the system installation when booting from HD. We've tested FreeBSD 8.x, 9.x and 10.x; same issues with this NIC.

We cannot use a different NIC (this one is onboard. The micro ATX mainboard has no room left for any other device)

pciconf -l -v:

none2@pci0:3:0:0:    class=0x020000 card=0x81681849 chip=0x816810ec rev=0x0c hdr=0x00
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    device     = 'RTL8111/8168B PCI Express Gigabit Ethernet controller'
    class      = network
    subclass   = ethernet

dmesg:

re0: <RealTek 8168/8111 B/C/CP/D/DP/E/F PCIe Gigabit Ethernet> port 0xd000-0xd0ff mem 0xf3204000-0xf3204fff,0xf3200000-0xf3203fff irq 19 at device 0.0 on pci3
re0: Using 1 MSI-X message
re0: Chip rev. 0x4c000000
re0: MAC rev. 0x00000000
re0: Unknown H/W revision: 0x4c000000
device_attach: re0 attach returned 6

ifconfig -a:

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
    inet6 ::1 prefixlen 128
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
    inet 127.0.0.1 netmask 0xff000000
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>

Even though "dmesg" shows the device "re0", it remains unknown to "ifconfig".

"if_re" is already in the generic kernel, so it can't be loaded via "kldload" as a module, right?


>How-To-Repeat:
1.) Install any FreeBSD Version: 8.4, 9.1, 9.2, 10.0-BETA2 with this NIC
2.) "ifconfig -a" shows only the loopback device. 
>Fix:


>Release-Note:
>Audit-Trail:

From: John Baldwin <jhb@freebsd.org>
To: freebsd-amd64@freebsd.org
Cc: Danny Winn <danny.gabriel.winn@gmail.com>,
 freebsd-gnats-submit@freebsd.org,
 yongari@freebsd.org
Subject: Re: amd64/183620: RTL8111/8168B PCIE NIC not detected on any FreeBSD Version
Date: Mon, 4 Nov 2013 15:06:52 -0500

 It looks like Pyun just merged support for this device into 9.x and 10.x
 today, e.g.:
 
 Log:
   MFC r257305:
     Add preliminary support for RTL8168G, RTL8168GU and RTL8411B.
     RTL8168GU has two variants(GMII and MII) but it uses the same chip
     revision id.  Driver checks PCI device id of controller and
     sets internal capability flag(i.e. jumbo frame and link speed down
     in WOL).
 
 Modified:
   stable/9/sys/dev/re/if_re.c
   stable/9/sys/pci/if_rlreg.h
 
 In particular, it adds support for the hwrev you pasted as an 8168G part:
 
 +#define        RL_HWREV_8168G          0x4C000000
 
 -- 
 John Baldwin
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Wed Nov 6 04:22:12 UTC 2013 
State-Changed-Why:  
to submitter: does the recent commit by yongari fix the problem? 


Responsible-Changed-From-To: freebsd-amd64->yongari 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Nov 6 04:22:12 UTC 2013 
Responsible-Changed-Why:  
over to committer of possible fix for MFC consideration. 

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