From owner-freebsd-hardware@FreeBSD.ORG Fri Jun 1 15:22:53 2012 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CDFD11065678 for ; Fri, 1 Jun 2012 15:22:53 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 90E288FC08 for ; Fri, 1 Jun 2012 15:22:53 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D1114B99A; Fri, 1 Jun 2012 11:22:52 -0400 (EDT) From: John Baldwin To: Mike Tancsa Date: Fri, 1 Jun 2012 10:30:52 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <4FC03C83.4030109@sentex.net> <20120601200942.GD10661@michelle.cdnetworks.com> <4FC8A903.6060203@sentex.net> In-Reply-To: <4FC8A903.6060203@sentex.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201206011030.52753.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 01 Jun 2012 11:22:52 -0400 (EDT) Cc: pyunyh@gmail.com, freebsd-hardware@freebsd.org Subject: Re: pcie realtek issue (re driver) X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jun 2012 15:22:53 -0000 On Friday, June 01, 2012 7:35:31 am Mike Tancsa wrote: > On 6/1/2012 4:09 PM, YongHyeon PYUN wrote: > > > > This is the first time I saw BAR2 is I/O space on RealTek PCI > > express device. re(4) switched to use BAR0 with I/O space after > > failing to use BAR2. Could you try attached patch? > > 0(ich10)# patch < re.map.diff > Hmm... Looks like a unified diff to me... > The text leading up to this was: > -------------------------- > |Index: sys/dev/re/if_re.c > |=================================================================== > |--- sys/dev/re/if_re.c (revision 236345) > |+++ sys/dev/re/if_re.c (working copy) > -------------------------- > Patching file sys/dev/re/if_re.c using Plan A... > Hunk #1 succeeded at 1191. > Hunk #2 succeeded at 1220. > Hunk #3 succeeded at 3320 (offset -1 lines). > done > 0(ich10)# > > pci0: driver added > found-> vendor=0x8086, dev=0x1c3a, revid=0x04 > domain=0, bus=0, slot=22, func=0 > class=07-80-00, hdrtype=0x00, mfdev=1 > cmdreg=0x0006, statreg=0x0010, cachelnsz=0 (dwords) > lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) > intpin=a, irq=16 > powerspec 3 supports D0 D3 current D0 > MSI supports 1 message, 64 bit > pci0:0:22:0: reprobing on driver added > found-> vendor=0x8086, dev=0x1c22, revid=0x05 > domain=0, bus=0, slot=31, func=3 > class=0c-05-00, hdrtype=0x00, mfdev=0 > cmdreg=0x0003, statreg=0x0280, cachelnsz=0 (dwords) > lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) > intpin=c, irq=18 > pci0:0:31:3: reprobing on driver added > pci1: driver added > pci2: driver added > pci3: driver added > pci4: driver added > found-> vendor=0x10ec, dev=0x8168, revid=0x03 > domain=0, bus=4, slot=0, func=0 > class=02-00-00, hdrtype=0x00, mfdev=0 > cmdreg=0x0000, statreg=0x0010, cachelnsz=0 (dwords) > lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) > intpin=a, irq=255 > powerspec 3 supports D0 D1 D2 D3 current D0 > MSI supports 1 message, 64 bit > MSI-X supports 4 messages in map 0x20 > pci0:4:0:0: reprobing on driver added > re0: at device > 0.0 on pci4 > pcib4: allocated memory range (0xfe200000-0xfe200fff) for rid 18 of re0 > re0: Lazy allocation of 0x1000 bytes rid 0x18 type 3 at 0xfe200000 > re0: MSI count : 1 > re0: MSI-X count : 4 > pcib4: allocated prefetch range (0xf0000000-0xf0003fff) for rid 20 of re0 > re0: Lazy allocation of 0x4000 bytes rid 0x20 type 3 at 0xf0000000 > re0: attempting to allocate 1 MSI-X vectors (4 supported) > msi: routing MSI-X IRQ 270 to local APIC 1 vector 52 > re0: using IRQ 270 for MSI-X > re0: Using 1 MSI-X message > re0: Chip rev. 0x28000000 > re0: MAC rev. 0x00000000 > miibus0: on re0 > rgephy0: PHY 1 on miibus0 > rgephy0: OUI 0x00e04c, model 0x0011, rev. 2 > rgephy0: none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, > 100baseTX-FDX, 100baseTX-FDX-flow, 100baseT4, 1000baseSX, > 1000baseSX-FDX, 1000baseSX-FDX-flow, 1000baseT, 1000baseT-master, > 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, > 1000baseT-FDX-flow-master, auto, auto-flow > re0: PHY write failed > re0: PHY write failed > re0: bpf attached > re0: Ethernet address: 00:0a:cd:1c:ba:89 > pci5: driver added > pci6: driver added > > re0@pci0:4:0:0: class=0x020000 card=0x816810ec chip=0x816810ec rev=0x03 > hdr=0x00 > vendor = 'Realtek Semiconductor Co., Ltd.' > device = 'RTL8111/8168B PCI Express Gigabit Ethernet controller' > class = network > subclass = ethernet > bar [10] = type I/O Port, range 32, base 0, size 256, disabled > bar [18] = type Memory, range 64, base 0xfe200000, size 4096, disabled > bar [20] = type Prefetchable Memory, range 64, base 0xf0000000, > size 16384, disabled > 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 2 max data 128(128) link x1(x1) > cap 11[ac] = MSI-X supports 4 messages in map 0x20 > cap 03[cc] = VPD > ecap 0001[100] = AER 1 1 fatal 1 non-fatal 3 corrected > ecap 0002[140] = VC 1 max VC0 > ecap 0003[160] = Serial 1 83050000684ce000 BTW, it would be interesting to see what the AER errors are. Can you apply www.freebsd.org/~jhb/patches/pciconf_e.patch to pciconf and paste the output of 'pciconf -lcbe' for re0? -- John Baldwin