From owner-freebsd-net@FreeBSD.ORG Mon Dec 1 04:32:33 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 437731065672 for ; Mon, 1 Dec 2008 04:32:33 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.230]) by mx1.freebsd.org (Postfix) with ESMTP id 0BB648FC08 for ; Mon, 1 Dec 2008 04:32:32 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so2245736rvf.43 for ; Sun, 30 Nov 2008 20:32:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:received:date:from :to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=ligKtHQons300GX/vS76xRMlvUhcLYWjOWiU/4CL/2c=; b=QjmfxEVE/clir819ZJZuvOZoOyv3hDK5Nr2TzcQYDmf9yej/O1TtCV7R9R7MjQvNgX hiHVPQPdlSNAUAQOtfhHKpMV4GC2WXsok+iu2NQniGrcCrqiUImLIBm6llGU0xx7MnPw Psgkt+fl0VxTtVspiAr7/+ri9qnO8oli2ZRdQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=D1l3FF6cTXQoB8AOyDftHmeQ0LfcsW2ClrXXQymf3DVTt0awuQTKrUSTS0Gt7BXf9P WNYN3gsimFLwB8USujZDkwqDm15npzT9QjdHSk6ubcwJzM+7uaFXRNSZO+IbUO7ia3yo bTmKLzhUxJVyxZf3Pt2vt7Z2tA7N/RA+pIr20= Received: by 10.110.47.9 with SMTP id u9mr15758219tiu.15.1228105951766; Sun, 30 Nov 2008 20:32:31 -0800 (PST) Received: from michelle.cdnetworks.co.kr ([211.53.35.84]) by mx.google.com with ESMTPS id a14sm360158tia.12.2008.11.30.20.32.27 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 30 Nov 2008 20:32:30 -0800 (PST) Received: from michelle.cdnetworks.co.kr (localhost.cdnetworks.co.kr [127.0.0.1]) by michelle.cdnetworks.co.kr (8.13.5/8.13.5) with ESMTP id mB14WKba001822 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 1 Dec 2008 13:32:20 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id mB14WJqs001821; Mon, 1 Dec 2008 13:32:19 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Mon, 1 Dec 2008 13:32:18 +0900 From: Pyun YongHyeon To: Andrew Tulloch Message-ID: <20081201043218.GB1082@cdnetworks.co.kr> References: <54854a7a0811291918s7affc753k998607f2529e7c2e@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="SLDf9lqlvOQaIe6s" Content-Disposition: inline In-Reply-To: <54854a7a0811291918s7affc753k998607f2529e7c2e@mail.gmail.com> User-Agent: Mutt/1.4.2.1i Cc: freebsd-net@freebsd.org Subject: Re: re0: Unknown H/W revision: 0x28000000 device_attach: re0 attach returned 6 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Dec 2008 04:32:33 -0000 --SLDf9lqlvOQaIe6s Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Nov 30, 2008 at 03:18:41AM +0000, Andrew Tulloch wrote: > I've just installed from the FreeBSD 7.1-BETA1 iso and get the > following when the re driver attempts to attach to the two onboard > NICs found on a Gigabyte GA-EX58-UD5 motherboard: > > re0: Ethernet> port 0x9e00-0x9eff mem > 0xfd3ff000-0xfd3fffff,0xfd3f8000-0xfd3fbfff irq 16 at device 0.0 on > pci8 > re0: Chip rev. 0x28000000 > re0: MAC rev. 0x00100000 > re0: Unknown H/W revision: 0x28000000 > device_attach: re0 attach returned 6 > pcib9: irq 17 at device 28.5 on pci0 > pci9: on pcib9 > re1: Ethernet> port 0x8e00-0x8eff mem > 0xfd1ff000-0xfd1fffff,0xfd1f8000-0xfd1fbfff irq 17 at device 0.0 on > pci9 > re1: Chip rev. 0x28000000 > re1: MAC rev. 0x00100000 > re1: Unknown H/W revision: 0x28000000 > device_attach: re1 attach returned 6 > > pciconf -lvc extract: > re0@pci0:8:0:0: class=0x020000 card=0xe0001458 chip=0x816810ec rev=0x03 hdr=0x00 > vendor = 'Realtek Semiconductor' > device = 'RTL8168/8111 PCI-E Gigabit Ethernet NIC' > class = network > subclass = ethernet > cap 01[40] = powerspec 3 supports D0 D1 D2 D3 current D0 > cap 05[50] = MSI supports 1 message, 64 bit > cap 10[70] = PCI-Express 2 endpoint IRQ 0 > cap 11[ac] = MSI-X supports 4 messages in map 0x20 > cap 03[cc] = VPD > re1@pci0:9:0:0: class=0x020000 card=0xe0001458 chip=0x816810ec rev=0x03 hdr=0x00 > vendor = 'Realtek Semiconductor' > device = 'RTL8168/8111 PCI-E Gigabit Ethernet NIC' > class = network > subclass = ethernet > cap 01[40] = powerspec 3 supports D0 D1 D2 D3 current D0 > cap 05[50] = MSI supports 1 message, 64 bit > cap 10[70] = PCI-Express 2 endpoint IRQ 0 > cap 11[ac] = MSI-X supports 4 messages in map 0x20 > cap 03[cc] = VPD > > > Is there any simple patch I can apply to get the driver to attach, > assuming it should work? > This controller seems to support MSI-X with 4 messages. Unfortunately previous PCIe controllers from RealTek were notorious for MSI issues so it's hard to know this revision really works with MSI-X. I guess it was added to support RSS(receive-side scaling of MS NDIS 6.0). As sephe said if the controller configuration is the same as 8168C family, the attached patch would make re(4) work as expected. -- Regards, Pyun YongHyeon --SLDf9lqlvOQaIe6s Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="re.8168D.patch" Index: sys/dev/re/if_re.c =================================================================== --- sys/dev/re/if_re.c (revision 185504) +++ sys/dev/re/if_re.c (working copy) @@ -172,7 +172,7 @@ { RT_VENDORID, RT_DEVICEID_8101E, 0, "RealTek 8101E/8102E/8102EL PCIe 10/100baseTX" }, { RT_VENDORID, RT_DEVICEID_8168, 0, - "RealTek 8168/8168B/8168C/8168CP/8111B/8111C/8111CP PCIe " + "RealTek 8168/8168B/8168C/8168CP/8168D/8111B/8111C/8111CP PCIe " "Gigabit Ethernet" }, { RT_VENDORID, RT_DEVICEID_8169, 0, "RealTek 8169/8169S/8169SB(L)/8110S/8110SB(L) Gigabit Ethernet" }, @@ -1225,6 +1225,7 @@ case RL_HWREV_8168C: case RL_HWREV_8168C_SPIN2: case RL_HWREV_8168CP: + case RL_HWREV_8168D: sc->rl_flags |= RL_FLAG_INVMAR | RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT; /* Index: sys/pci/if_rlreg.h =================================================================== --- sys/pci/if_rlreg.h (revision 185504) +++ sys/pci/if_rlreg.h (working copy) @@ -157,6 +157,7 @@ #define RL_HWREV_8169_8110SB 0x10000000 #define RL_HWREV_8169_8110SC 0x18000000 #define RL_HWREV_8102EL 0x24800000 +#define RL_HWREV_8168D 0x28000000 #define RL_HWREV_8168_SPIN1 0x30000000 #define RL_HWREV_8100E 0x30800000 #define RL_HWREV_8101E 0x34000000 --SLDf9lqlvOQaIe6s--