From owner-freebsd-hardware@FreeBSD.ORG Fri Jun 1 11:36:00 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 21CC4106564A; Fri, 1 Jun 2012 11:36:00 +0000 (UTC) (envelope-from mike@sentex.net) Received: from smarthost1.sentex.ca (smarthost1-6.sentex.ca [IPv6:2607:f3e0:0:1::12]) by mx1.freebsd.org (Postfix) with ESMTP id AB1C98FC08; Fri, 1 Jun 2012 11:35:59 +0000 (UTC) Received: from [192.168.43.26] (pyroxene.sentex.ca [199.212.134.18]) by smarthost1.sentex.ca (8.14.5/8.14.4) with ESMTP id q51BZwoA008292; Fri, 1 Jun 2012 07:35:58 -0400 (EDT) (envelope-from mike@sentex.net) Message-ID: <4FC8A903.6060203@sentex.net> Date: Fri, 01 Jun 2012 07:35:31 -0400 From: Mike Tancsa Organization: Sentex Communications User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: pyunyh@gmail.com References: <4FC03C83.4030109@sentex.net> <201205301126.40105.jhb@freebsd.org> <20120531161418.GF1467@michelle.cdnetworks.com> <201205311057.05234.jhb@freebsd.org> <4FC7AD6F.60004@sentex.net> <4FC7B301.30109@sentex.net> <20120601200942.GD10661@michelle.cdnetworks.com> In-Reply-To: <20120601200942.GD10661@michelle.cdnetworks.com> X-Enigmail-Version: 1.4.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.72 on 64.7.153.18 Cc: 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 11:36:00 -0000 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 but ifconfig re0 up re0: reset never completed! re0: PHY write failed re0: PHY write failed re0: PHY write failed re0: PHY write failed re0: PHY write failed re0: PHY write failed re0: PHY write failed -- ------------------- Mike Tancsa, tel +1 519 651 3400 Sentex Communications, mike@sentex.net Providing Internet services since 1994 www.sentex.net Cambridge, Ontario Canada http://www.tancsa.com/