From owner-freebsd-hardware@FreeBSD.ORG Mon May 28 11:07:28 2012 Return-Path: Delivered-To: freebsd-hardware@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 541851065675 for ; Mon, 28 May 2012 11:07:28 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 2438D8FC18 for ; Mon, 28 May 2012 11:07:28 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q4SB7Squ063350 for ; Mon, 28 May 2012 11:07:28 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q4SB7RA6063348 for freebsd-hardware@FreeBSD.org; Mon, 28 May 2012 11:07:27 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 28 May 2012 11:07:27 GMT Message-Id: <201205281107.q4SB7RA6063348@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-hardware@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-hardware@FreeBSD.org 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: Mon, 28 May 2012 11:07:28 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/156241 hardware [mfi] 'zfs send' does not prevents disks to suspend if 1 problem total. From owner-freebsd-hardware@FreeBSD.ORG Mon May 28 12:25:56 2012 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48207106566B; Mon, 28 May 2012 12:25:56 +0000 (UTC) (envelope-from vermaden@interia.pl) Received: from smtpo.poczta.interia.pl (smtpo.poczta.interia.pl [217.74.65.208]) by mx1.freebsd.org (Postfix) with ESMTP id EDE758FC15; Mon, 28 May 2012 12:25:55 +0000 (UTC) Date: Mon, 28 May 2012 14:25:49 +0200 From: vermaden To: Polytropon , marius@alchemy.franken.de, Don Lewis , Robert Huff X-Mailer: interia.pl/pf09 In-Reply-To: <20120524011023.6f5401c6.freebsd@edvax.de> References: <20120524011023.6f5401c6.freebsd@edvax.de> Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=interia.pl; s=biztos; t=1338207949; bh=dMgMi50/LJEoe/yTTCk2OnJOTF8OnOkf310RL/PaZBU=; h=Date:From:Subject:To:Cc:X-Mailer:In-Reply-To:References: Message-Id:MIME-Version:Content-Type:Content-Transfer-Encoding; b=DUWpndtHG6vam/C3AGL0DeXUOSTHNh/TzgJ+6bULCjJnVz4BKHYr6HSJ/FZmOEUcN dkCd/09+1IjCo0c04ZzIRLLechs68iqPGSDu3WEN6+I24aEUnR1jiz5G3C7k1gXLB1 YYJBY+jsxioTxgZ7SY9FBK425WfHCPKV/DCCi8dU= Cc: freebsd-scsi@FreeBSD.org, freebsd-questions@freebsd.org, freebsd-hardware@FreeBSD.org Subject: Re: Working and Supported SCSI Controller 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: Mon, 28 May 2012 12:25:56 -0000 > I haven't looked into that topic for a long time, but in > the past, I've had _no_ problems using Ataptec's 2940 > type of controllers (either W or U, and UW). The ahc > driver worked well with them. >=20 > Polytropon > LSI 53C1010-66 (Ultra160, sym(4)) or 53C1030 (Ultra320, mpt(4)) based one= s. >=20 > Marius > I'm using an Adaptec 29160N (Ultra 160) with the ahc driver. It has > internal and external 69 pin LVD connectors, a 68 pin internal > single-ended connector and a 50 pin internal single-ended connector. >=20 > Don Lewis > > I haven't looked into that topic for a long time, but in > > the past, I've had _no_ problems using Ataptec's 2940 > > type of controllers (either W or U, and UW). The ahc > > driver worked well with them. > Agreed. Adaptec has the reputation of being expensive but=20 > robust and well-supported; my experience confirms all three. >=20 > Robert Huff Thank You gentleman, gonna try 'Ataptec AHA-2940UW' this time and share the results. Regards, vermaden ... From owner-freebsd-hardware@FreeBSD.ORG Tue May 29 09:01:48 2012 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16E871065673 for ; Tue, 29 May 2012 09:01:48 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id DAE158FC1D for ; Tue, 29 May 2012 09:01:47 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so5867165pbb.13 for ; Tue, 29 May 2012 02:01:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=4qortFSTY1ROz54yF9kYwhAxpBAxTPjJSW0TFDsLIfM=; b=wZyO4Sd6Ie21dtOIbqa56iYlKxyLddG5cBWT40EsGxH0wiBkyJk22sxq5Tm0Rdni6Y /G7edt8P80JIk/HtTL/uUjcanwqYdQfKkT6jz59gL0IH4dKZpDxEhxWFfFcDd+YwLaxX nbPRff6DOwu6XY9y9hCAvLOjOZKrd6MSLsJWEfmxppQgS5l1qWNxG8GZVEabN7kVKb39 lAC4fdnEcr0R0s2rdbEBNVvgtEt3FbQ2/WRH5rdJglcwu5kok8b9DzwSyaLRYNkiyDjj jpmVCnOs++FsGEBfZXVD8aZAOxvxdmg8hMLb17NZtltkgOuQ319mNAzRpn+iBD9B2Uuc 9bUQ== Received: by 10.68.213.102 with SMTP id nr6mr30253610pbc.112.1338282107481; Tue, 29 May 2012 02:01:47 -0700 (PDT) Received: from pyunyh@gmail.com ([114.111.62.249]) by mx.google.com with ESMTPS id it1sm5811384pbc.0.2012.05.29.02.01.44 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 29 May 2012 02:01:46 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Tue, 29 May 2012 18:01:38 -0700 From: YongHyeon PYUN Date: Tue, 29 May 2012 18:01:38 -0700 To: Mike Tancsa Message-ID: <20120530010138.GA9661@michelle.cdnetworks.com> References: <4FC03C83.4030109@sentex.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4FC03C83.4030109@sentex.net> User-Agent: Mutt/1.4.2.3i 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 Reply-To: pyunyh@gmail.com List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 May 2012 09:01:48 -0000 On Fri, May 25, 2012 at 10:14:27PM -0400, Mike Tancsa wrote: > My recent batch of realtek nics seems to have a version that does not > work with RELENG_8 or RELENG_9. Anyone know what the issue might be ? > > > re0: at device > 0.0 on pci4 > re0: Using 1 MSI-X message > re0: turning off MSI enable bit. > re0: ASPM disabled > re0: Chip rev. 0x7c800000 ^^^^^^^^^^ If memory serves me right there would be no known controller for revision 0x7c800000. Actually I wonder how re(4) can attach to this unknown device. Did you apply local patch? > re0: MAC rev. 0x00400000 > re0: reset never completed! > re0: PHY write failed > re0: PHY write failed > re0: attaching PHYs failed > device_attach: re0 attach returned 6 > > > none2@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 [18] = type I/O Port, range 32, base 0xfffffffc, size 4, disabled > bar [20] = type I/O Port, range 32, base 0xfffffffc, 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 15 type 15 IRQ 62 max data 16384(16384) > link x63(x63) From owner-freebsd-hardware@FreeBSD.ORG Tue May 29 12:57:44 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 5197D1065670 for ; Tue, 29 May 2012 12:57:44 +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 13E018FC15 for ; Tue, 29 May 2012 12:57:44 +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 q4TCvhsC060950; Tue, 29 May 2012 08:57:43 -0400 (EDT) (envelope-from mike@sentex.net) Message-ID: <4FC4C7B2.8080806@sentex.net> Date: Tue, 29 May 2012 08:57:22 -0400 From: Mike Tancsa Organization: Sentex Communications User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: pyunyh@gmail.com References: <4FC03C83.4030109@sentex.net> <20120530010138.GA9661@michelle.cdnetworks.com> In-Reply-To: <20120530010138.GA9661@michelle.cdnetworks.com> X-Enigmail-Version: 1.1.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: Tue, 29 May 2012 12:57:44 -0000 On 5/29/2012 9:01 PM, YongHyeon PYUN wrote: > On Fri, May 25, 2012 at 10:14:27PM -0400, Mike Tancsa wrote: >> My recent batch of realtek nics seems to have a version that does not >> work with RELENG_8 or RELENG_9. Anyone know what the issue might be ? >> >> >> re0: at device >> 0.0 on pci4 >> re0: Using 1 MSI-X message >> re0: turning off MSI enable bit. >> re0: ASPM disabled >> re0: Chip rev. 0x7c800000 > ^^^^^^^^^^ > > If memory serves me right there would be no known controller for > revision 0x7c800000. Actually I wonder how re(4) can attach to > this unknown device. > Did you apply local patch? Hi, No, its a stock kernel. If I add hw.re.msix_disable=1 hw.re.msi_disable=1 it sort of comes up re0 pnpinfo vendor=0x10ec device=0x8168 subvendor=0x10ec subdevice=0x8168 class=0x020000 at slot=0 function=0 miibus0 rgephy0 pnpinfo oui=0xe04c model=0x11 rev=0x2 at phyno=1 re0: port 0xd000-0xd0ff mem 0xfe200000-0xfe200fff,0xf0000000-0xf0003fff irq 18 at device 0.0 on pci4 re0: Chip rev. 0x28000000 re0: MAC rev. 0x00000000 miibus0: on re0 rgephy0: PHY 1 on miibus0 rgephy0: none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow re0: Ethernet address: 00:0a:cd:1c:ba:89 but doing ifconfig re0 up, does not work as dmesg shows 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 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 0xd000, 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 -- ------------------- 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/ From owner-freebsd-hardware@FreeBSD.ORG Wed May 30 01:32:06 2012 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 364E4106566B; Wed, 30 May 2012 01:32:06 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id F29408FC0C; Wed, 30 May 2012 01:32:05 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so7061178pbb.13 for ; Tue, 29 May 2012 18:32:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=Tdjt/YrGrVhfhWK1RId3eWaPZICKg7nx0jFppgMnSdc=; b=ibyT1DQ3LAYX5qJrAoPOGmH5AZu8t5ktoBJaDIZy5wFSx2vxj6w2uGp4gROekVv8a4 B7g0RVwBF4S/1CzC5em9gz/LNqaYJ2bCXAidePl4IOrWYDcGq+/dfwXgAr0oaBndJpWs FS0tdOXeVMnpzlyYugsOXaMGpTEu3M+QCcbqvfdQ+G75RH2mDsQ+ZnKlK8i3yb9eLsN2 zAnC+QpPB/LF/Enty3fKVCGdDq+9gGTEvB10egioBypS5pe3qlp9vX4nccsFMZvB9/zH QEMYM8qN0KAYhSF78ooDT6PpOcIP9NYsmULtbtc0diIgAJLL6+YT9gUYgoYVqTDBcI4I MP5g== Received: by 10.68.134.1 with SMTP id pg1mr6075532pbb.1.1338341524107; Tue, 29 May 2012 18:32:04 -0700 (PDT) Received: from pyunyh@gmail.com ([114.111.62.249]) by mx.google.com with ESMTPS id rv8sm24593548pbc.64.2012.05.29.18.32.01 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 29 May 2012 18:32:03 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Wed, 30 May 2012 10:31:58 -0700 From: YongHyeon PYUN Date: Wed, 30 May 2012 10:31:58 -0700 To: Mike Tancsa Message-ID: <20120530173158.GA1467@michelle.cdnetworks.com> References: <4FC03C83.4030109@sentex.net> <20120530010138.GA9661@michelle.cdnetworks.com> <4FC4C7B2.8080806@sentex.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4FC4C7B2.8080806@sentex.net> User-Agent: Mutt/1.4.2.3i Cc: jhb@FreeBSD.org, "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 Reply-To: pyunyh@gmail.com List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 May 2012 01:32:06 -0000 On Tue, May 29, 2012 at 08:57:22AM -0400, Mike Tancsa wrote: > On 5/29/2012 9:01 PM, YongHyeon PYUN wrote: > > On Fri, May 25, 2012 at 10:14:27PM -0400, Mike Tancsa wrote: > >> My recent batch of realtek nics seems to have a version that does not > >> work with RELENG_8 or RELENG_9. Anyone know what the issue might be ? > >> > >> > >> re0: at device > >> 0.0 on pci4 > >> re0: Using 1 MSI-X message > >> re0: turning off MSI enable bit. > >> re0: ASPM disabled > >> re0: Chip rev. 0x7c800000 > > ^^^^^^^^^^ > > > > If memory serves me right there would be no known controller for > > revision 0x7c800000. Actually I wonder how re(4) can attach to > > this unknown device. > > Did you apply local patch? > > Hi, > No, its a stock kernel. If I add > > hw.re.msix_disable=1 > hw.re.msi_disable=1 > > it sort of comes up > > > re0 pnpinfo vendor=0x10ec device=0x8168 subvendor=0x10ec > subdevice=0x8168 class=0x020000 at slot=0 function=0 > miibus0 > rgephy0 pnpinfo oui=0xe04c model=0x11 rev=0x2 at phyno=1 > > re0: port > 0xd000-0xd0ff mem 0xfe200000-0xfe200fff,0xf0000000-0xf0003fff irq 18 at > device 0.0 on pci4 > re0: Chip rev. 0x28000000 Hmm, this looks really weird. It now read as 0x28000000 which indicates this controller is RTL8168D. I remember there is no MSI-X capability reported by pciconf(8) but previously re(4) used MSI-X which I can't explain. Actually the output of pciconf(8) in earlier mail looks wrong to me. > re0: MAC rev. 0x00000000 > miibus0: on re0 > rgephy0: PHY 1 on miibus0 > rgephy0: none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, > 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT, 1000baseT-master, > 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, > 1000baseT-FDX-flow-master, auto, auto-flow > re0: Ethernet address: 00:0a:cd:1c:ba:89 > > but doing ifconfig re0 up, does not work as dmesg shows > > 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 > Probably controller was put into some kind of power saving state by BIOS/firmware? > > 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 0xd000, 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 > It does not even list MSI capability. :-( The most interesting one is both BAR0/BAR2 was disabled even though re(4) was successfully attached to the device. Probably this could be main reason why re(4) does not work at all. I'm not sure this issue could be related with pci(4)(CCed to John to get his advice). From owner-freebsd-hardware@FreeBSD.ORG Wed May 30 15:58:17 2012 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E861E1065678 for ; Wed, 30 May 2012 15:58:16 +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 AAB688FC1D for ; Wed, 30 May 2012 15:58:16 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0515EB9BE; Wed, 30 May 2012 11:58:16 -0400 (EDT) From: John Baldwin To: freebsd-hardware@freebsd.org, pyunyh@gmail.com Date: Wed, 30 May 2012 11:26:39 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <4FC03C83.4030109@sentex.net> <4FC4C7B2.8080806@sentex.net> <20120530173158.GA1467@michelle.cdnetworks.com> In-Reply-To: <20120530173158.GA1467@michelle.cdnetworks.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201205301126.40105.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 30 May 2012 11:58:16 -0400 (EDT) Cc: Mike Tancsa 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: Wed, 30 May 2012 15:58:17 -0000 On Wednesday, May 30, 2012 1:31:58 pm YongHyeon PYUN wrote: > On Tue, May 29, 2012 at 08:57:22AM -0400, Mike Tancsa wrote: > > On 5/29/2012 9:01 PM, YongHyeon PYUN wrote: > > > On Fri, May 25, 2012 at 10:14:27PM -0400, Mike Tancsa wrote: > > >> My recent batch of realtek nics seems to have a version that does not > > >> work with RELENG_8 or RELENG_9. Anyone know what the issue might be ? > > >> > > >> > > >> re0: at device > > >> 0.0 on pci4 > > >> re0: Using 1 MSI-X message > > >> re0: turning off MSI enable bit. > > >> re0: ASPM disabled > > >> re0: Chip rev. 0x7c800000 > > > ^^^^^^^^^^ > > > > > > If memory serves me right there would be no known controller for > > > revision 0x7c800000. Actually I wonder how re(4) can attach to > > > this unknown device. > > > Did you apply local patch? > > > > Hi, > > No, its a stock kernel. If I add > > > > hw.re.msix_disable=1 > > hw.re.msi_disable=1 > > > > it sort of comes up > > > > > > re0 pnpinfo vendor=0x10ec device=0x8168 subvendor=0x10ec > > subdevice=0x8168 class=0x020000 at slot=0 function=0 > > miibus0 > > rgephy0 pnpinfo oui=0xe04c model=0x11 rev=0x2 at phyno=1 > > > > re0: port > > 0xd000-0xd0ff mem 0xfe200000-0xfe200fff,0xf0000000-0xf0003fff irq 18 at > > device 0.0 on pci4 > > re0: Chip rev. 0x28000000 > > Hmm, this looks really weird. It now read as 0x28000000 which > indicates this controller is RTL8168D. I remember there is no > MSI-X capability reported by pciconf(8) but previously re(4) used > MSI-X which I can't explain. Actually the output of pciconf(8) in > earlier mail looks wrong to me. > > > re0: MAC rev. 0x00000000 > > miibus0: on re0 > > rgephy0: PHY 1 on miibus0 > > rgephy0: none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, > > 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT, 1000baseT-master, > > 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, > > 1000baseT-FDX-flow-master, auto, auto-flow > > re0: Ethernet address: 00:0a:cd:1c:ba:89 > > > > but doing ifconfig re0 up, does not work as dmesg shows > > > > 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 > > > > Probably controller was put into some kind of power saving state by > BIOS/firmware? > > > > > 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 0xd000, 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 > > > > It does not even list MSI capability. :-( > The most interesting one is both BAR0/BAR2 was disabled even though > re(4) was successfully attached to the device. Probably this could > be main reason why re(4) does not work at all. I'm not sure this > issue could be related with pci(4)(CCed to John to get his advice). The BAR should be enabled if the driver uses RF_ACTIVE with bus_alloc_resource(). -- John Baldwin From owner-freebsd-hardware@FreeBSD.ORG Thu May 31 00:14:31 2012 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66F221065670; Thu, 31 May 2012 00:14:31 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2EAA68FC15; Thu, 31 May 2012 00:14:31 +0000 (UTC) Received: by dadv36 with SMTP id v36so523432dad.13 for ; Wed, 30 May 2012 17:14:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=vcfHxEYLI2kINqG2x5N+uu57+yoZElC2jOXKqybfuTs=; b=ZXYotg5+aR2afuBdP15aKE92bqX2uy4DiXjPMlEjT3LNQQh9V/W6H5UUv1bDzBlabn AjIDWWJ3JEwWFRssrkB0Dkm4Y0aWz0kgXLejrXrKBhQNuMgZe0sQXDVxZDZe8m26YvBz KzaqraGDT5GxW3ToJfDBxLk1jXoFhZASPhkWBcBoorxf1JdcKjFMHwKGf8MWqKo4CqeF sbfsQRHKZ/wECQouV0rV/A0xeePjyfeFcrcHEwhIyzycTBl8fWXli6ZsLB38L8wRy7zS yI5i50U3+0tfyYoTQ84aSY44vsdtbpHPskvo1cpQ3R83uV0FzkFxjlrIeZJxbhGHhIAm fmXQ== Received: by 10.68.242.99 with SMTP id wp3mr915625pbc.21.1338423265054; Wed, 30 May 2012 17:14:25 -0700 (PDT) Received: from pyunyh@gmail.com ([114.111.62.249]) by mx.google.com with ESMTPS id rs3sm2117035pbc.47.2012.05.30.17.14.22 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 30 May 2012 17:14:24 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Thu, 31 May 2012 09:14:18 -0700 From: YongHyeon PYUN Date: Thu, 31 May 2012 09:14:18 -0700 To: John Baldwin Message-ID: <20120531161418.GF1467@michelle.cdnetworks.com> References: <4FC03C83.4030109@sentex.net> <4FC4C7B2.8080806@sentex.net> <20120530173158.GA1467@michelle.cdnetworks.com> <201205301126.40105.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201205301126.40105.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: Mike Tancsa , 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 Reply-To: pyunyh@gmail.com List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 May 2012 00:14:31 -0000 On Wed, May 30, 2012 at 11:26:39AM -0400, John Baldwin wrote: > On Wednesday, May 30, 2012 1:31:58 pm YongHyeon PYUN wrote: > > On Tue, May 29, 2012 at 08:57:22AM -0400, Mike Tancsa wrote: > > > On 5/29/2012 9:01 PM, YongHyeon PYUN wrote: > > > > On Fri, May 25, 2012 at 10:14:27PM -0400, Mike Tancsa wrote: > > > >> My recent batch of realtek nics seems to have a version that does not > > > >> work with RELENG_8 or RELENG_9. Anyone know what the issue might be ? > > > >> > > > >> > > > >> re0: at > device > > > >> 0.0 on pci4 > > > >> re0: Using 1 MSI-X message > > > >> re0: turning off MSI enable bit. > > > >> re0: ASPM disabled > > > >> re0: Chip rev. 0x7c800000 > > > > ^^^^^^^^^^ > > > > > > > > If memory serves me right there would be no known controller for > > > > revision 0x7c800000. Actually I wonder how re(4) can attach to > > > > this unknown device. > > > > Did you apply local patch? > > > > > > Hi, > > > No, its a stock kernel. If I add > > > > > > hw.re.msix_disable=1 > > > hw.re.msi_disable=1 > > > > > > it sort of comes up > > > > > > > > > re0 pnpinfo vendor=0x10ec device=0x8168 subvendor=0x10ec > > > subdevice=0x8168 class=0x020000 at slot=0 function=0 > > > miibus0 > > > rgephy0 pnpinfo oui=0xe04c model=0x11 rev=0x2 at phyno=1 > > > > > > re0: port > > > 0xd000-0xd0ff mem 0xfe200000-0xfe200fff,0xf0000000-0xf0003fff irq 18 at > > > device 0.0 on pci4 > > > re0: Chip rev. 0x28000000 > > > > Hmm, this looks really weird. It now read as 0x28000000 which > > indicates this controller is RTL8168D. I remember there is no > > MSI-X capability reported by pciconf(8) but previously re(4) used > > MSI-X which I can't explain. Actually the output of pciconf(8) in > > earlier mail looks wrong to me. > > > > > re0: MAC rev. 0x00000000 > > > miibus0: on re0 > > > rgephy0: PHY 1 on miibus0 > > > rgephy0: none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, > > > 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT, 1000baseT-master, > > > 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, > > > 1000baseT-FDX-flow-master, auto, auto-flow > > > re0: Ethernet address: 00:0a:cd:1c:ba:89 > > > > > > but doing ifconfig re0 up, does not work as dmesg shows > > > > > > 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 > > > > > > > Probably controller was put into some kind of power saving state by > > BIOS/firmware? > > > > > > > > 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 0xd000, 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 > > > > > > > It does not even list MSI capability. :-( > > The most interesting one is both BAR0/BAR2 was disabled even though > > re(4) was successfully attached to the device. Probably this could > > be main reason why re(4) does not work at all. I'm not sure this > > issue could be related with pci(4)(CCed to John to get his advice). > > The BAR should be enabled if the driver uses RF_ACTIVE with > bus_alloc_resource(). > Right, but what if it is not(from the pciconf output)? I'm pretty sure re(4) used RF_ACTIVE with bus_alloc_resource_any(9). From owner-freebsd-hardware@FreeBSD.ORG Thu May 31 15:25:07 2012 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 640E91065675 for ; Thu, 31 May 2012 15:25:07 +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 07C918FC0C for ; Thu, 31 May 2012 15:25:07 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 604C1B95B; Thu, 31 May 2012 11:25:06 -0400 (EDT) From: John Baldwin To: pyunyh@gmail.com Date: Thu, 31 May 2012 10:57:04 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <4FC03C83.4030109@sentex.net> <201205301126.40105.jhb@freebsd.org> <20120531161418.GF1467@michelle.cdnetworks.com> In-Reply-To: <20120531161418.GF1467@michelle.cdnetworks.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201205311057.05234.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 31 May 2012 11:25:06 -0400 (EDT) Cc: Mike Tancsa , 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: Thu, 31 May 2012 15:25:07 -0000 On Thursday, May 31, 2012 12:14:18 pm YongHyeon PYUN wrote: > On Wed, May 30, 2012 at 11:26:39AM -0400, John Baldwin wrote: > > On Wednesday, May 30, 2012 1:31:58 pm YongHyeon PYUN wrote: > > > On Tue, May 29, 2012 at 08:57:22AM -0400, Mike Tancsa wrote: > > > > On 5/29/2012 9:01 PM, YongHyeon PYUN wrote: > > > > > On Fri, May 25, 2012 at 10:14:27PM -0400, Mike Tancsa wrote: > > > > >> My recent batch of realtek nics seems to have a version that does not > > > > >> work with RELENG_8 or RELENG_9. Anyone know what the issue might be ? > > > > >> > > > > >> > > > > >> re0: at > > device > > > > >> 0.0 on pci4 > > > > >> re0: Using 1 MSI-X message > > > > >> re0: turning off MSI enable bit. > > > > >> re0: ASPM disabled > > > > >> re0: Chip rev. 0x7c800000 > > > > > ^^^^^^^^^^ > > > > > > > > > > If memory serves me right there would be no known controller for > > > > > revision 0x7c800000. Actually I wonder how re(4) can attach to > > > > > this unknown device. > > > > > Did you apply local patch? > > > > > > > > Hi, > > > > No, its a stock kernel. If I add > > > > > > > > hw.re.msix_disable=1 > > > > hw.re.msi_disable=1 > > > > > > > > it sort of comes up > > > > > > > > > > > > re0 pnpinfo vendor=0x10ec device=0x8168 subvendor=0x10ec > > > > subdevice=0x8168 class=0x020000 at slot=0 function=0 > > > > miibus0 > > > > rgephy0 pnpinfo oui=0xe04c model=0x11 rev=0x2 at phyno=1 > > > > > > > > re0: port > > > > 0xd000-0xd0ff mem 0xfe200000-0xfe200fff,0xf0000000-0xf0003fff irq 18 at > > > > device 0.0 on pci4 > > > > re0: Chip rev. 0x28000000 > > > > > > Hmm, this looks really weird. It now read as 0x28000000 which > > > indicates this controller is RTL8168D. I remember there is no > > > MSI-X capability reported by pciconf(8) but previously re(4) used > > > MSI-X which I can't explain. Actually the output of pciconf(8) in > > > earlier mail looks wrong to me. > > > > > > > re0: MAC rev. 0x00000000 > > > > miibus0: on re0 > > > > rgephy0: PHY 1 on miibus0 > > > > rgephy0: none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, > > > > 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT, 1000baseT-master, > > > > 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, > > > > 1000baseT-FDX-flow-master, auto, auto-flow > > > > re0: Ethernet address: 00:0a:cd:1c:ba:89 > > > > > > > > but doing ifconfig re0 up, does not work as dmesg shows > > > > > > > > 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 > > > > > > > > > > Probably controller was put into some kind of power saving state by > > > BIOS/firmware? > > > > > > > > > > > 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 0xd000, 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 > > > > > > > > > > It does not even list MSI capability. :-( He might have only used -lb and not -lbc. > > > The most interesting one is both BAR0/BAR2 was disabled even though > > > re(4) was successfully attached to the device. Probably this could > > > be main reason why re(4) does not work at all. I'm not sure this > > > issue could be related with pci(4)(CCed to John to get his advice). > > > > The BAR should be enabled if the driver uses RF_ACTIVE with > > bus_alloc_resource(). > > > > Right, but what if it is not(from the pciconf output)? > I'm pretty sure re(4) used RF_ACTIVE with bus_alloc_resource_any(9). Hmm, is this pciconf output when the driver is attached? -- John Baldwin From owner-freebsd-hardware@FreeBSD.ORG Thu May 31 17:42:35 2012 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E1C510657AA; Thu, 31 May 2012 17:42:35 +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 A39B28FC0C; Thu, 31 May 2012 17:42:34 +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 q4VHgXex099643; Thu, 31 May 2012 13:42:33 -0400 (EDT) (envelope-from mike@sentex.net) Message-ID: <4FC7AD6F.60004@sentex.net> Date: Thu, 31 May 2012 13:42:07 -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: John Baldwin References: <4FC03C83.4030109@sentex.net> <201205301126.40105.jhb@freebsd.org> <20120531161418.GF1467@michelle.cdnetworks.com> <201205311057.05234.jhb@freebsd.org> In-Reply-To: <201205311057.05234.jhb@freebsd.org> X-Enigmail-Version: 1.4.1 Content-Type: multipart/mixed; boundary="------------060302050307020002060105" X-Scanned-By: MIMEDefang 2.72 on 64.7.153.18 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: Thu, 31 May 2012 17:42:35 -0000 This is a multi-part message in MIME format. --------------060302050307020002060105 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 5/31/2012 10:57 AM, John Baldwin wrote: >> >> Right, but what if it is not(from the pciconf output)? >> I'm pretty sure re(4) used RF_ACTIVE with bus_alloc_resource_any(9). > > Hmm, is this pciconf output when the driver is attached? Hi, Here are some of the variations attached in a txt file. Could this just be a broken card ? I will try and boot up another OS on the box and see if it works. ---Mike -- ------------------- 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/ --------------060302050307020002060105 Content-Type: text/plain; charset=windows-1252; name="re.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="re.txt" GENERIC kernel, no loader tuneables with if_re loaded from /boot/loader.conf none2@pci0:4:0:0: class=0x020000 card=0xffff10ec 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 0xdfa00000, size 4096, disabled bar [20] = type Prefetchable Memory, range 64, base 0, size 16384, disabled cap 01[40] = powerspec 7 supports D0 D1 D2 D3 current D3 pci4: on pcib4 pci4: domain=0, physical bus=4 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 map[10]: type I/O Port, range 32, base 0, size 8, port disabled map[18]: type Memory, range 64, base 0, size 12, memory disabled map[20]: type Prefetchable Memory, range 64, base 0, size 14, memory disabled re0: at device 0.0 on pci4 pcib0: allocated type 3 (0xdfa00000-0xdfafffff) for rid 20 of pcib4 pcib4: allocated initial memory window of 0xdfa00000-0xdfafffff pcib4: allocated memory range (0xdfa00000-0xdfa00fff) for rid 18 of re0 re0: Lazy allocation of 0x1000 bytes rid 0x18 type 3 at 0xdfa00000 re0: MSI count : 0 re0: MSI-X count : 0 pcib4: matched entry for 4.0.INTA pcib4: slot 0 INTA hardwired to IRQ 18 re0: turning off MSI enable bit. re0: ASPM disabled re0: Chip rev. 0x7c800000 re0: MAC rev. 0x00400000 re0: reset never completed! re0: PHY write failed re0: PHY write failed re0: attaching PHYs failed device_attach: re0 attach returned 6 ------------------------ with if_re_load="YES" hw.re.msi_disable=1 pci4: on pcib4 pci4: domain=0, physical bus=4 found-> vendor=0x10ec, dev=0x8168, revid=0x03 domain=0, bus=4, slot=0, func=0 class=02-00-00, hdrtype=0x00, mfdev=0 cmdreg=0x0007, 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 map[10]: type I/O Port, range 32, base 0, size 8, enabled map[18]: type Memory, range 64, base 0, size 12, enabled map[20]: type Prefetchable Memory, range 64, base 0, size 14, enabled 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 memory range (0xfe204000-0xfe207fff) for rid 20 of re0 re0: Lazy allocation of 0x4000 bytes rid 0x20 type 3 at 0xfe204000 re0: attempting to allocate 1 MSI-X vectors (4 supported) msi: routing MSI-X IRQ 266 to local APIC 0 vector 62 re0: using IRQ 266 for MSI-X re0: Using 1 MSI-X message re0: Chip rev. 0x28000000 re0: MAC rev. 0x00000000 miibus0: on re0 ukphy0: PHY 1 on miibus0 ukphy0: OUI 0x00e0fc, model 0x003f, rev. 15 re0: PHY write failed re0: PHY write failed ukphy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 100baseT4, 1000baseSX, 1000baseSX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto, auto-flow re0: PHY write failed re0: PHY write failed re0: bpf attached re0: Ethernet address: 00:0a:cd:1c:ba:89 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 0xfe204000, 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 it does not work And with nothing loaded none2@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 0xd000, size 256, enabled bar [18] = type Memory, range 64, base 0xfe200000, size 4096, enabled bar [20] = type Prefetchable Memory, range 64, base 0xf0000000, size 16384, enabled 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 The board is an Intel one # dmidecode 2.11 SMBIOS 2.6 present. 56 structures occupying 2284 bytes. Table at 0x000E9450. Handle 0x0000, DMI type 0, 24 bytes BIOS Information Vendor: Intel Corp. Version: BEH6110H.86A.0042.2012.0327.2202 Release Date: 03/27/2012 Address: 0xF0000 Runtime Size: 64 kB ROM Size: 1024 kB Characteristics: PCI is supported BIOS is upgradeable BIOS shadowing is allowed Boot from CD is supported Selectable boot is supported BIOS ROM is socketed EDD is supported 5.25"/1.2 MB floppy services are supported (int 13h) 3.5"/720 kB floppy services are supported (int 13h) 3.5"/2.88 MB floppy services are supported (int 13h) Print screen service is supported (int 5h) 8042 keyboard services are supported (int 9h) Serial services are supported (int 14h) Printer services are supported (int 17h) ACPI is supported USB legacy is supported BIOS boot specification is supported Targeted content distribution is supported Base Board Information Manufacturer: Intel Corporation Product Name: DH61BE Version: AAG14062-208 Serial Number: BTBE212003LQ Asset Tag: To be filled by O.E.M. Features: Board is a hosting board Board is replaceable Location In Chassis: To be filled by O.E.M. Chassis Handle: 0x0003 Type: Motherboard Contained Object Handles: 0 Handle 0x0035, DMI type 9, 17 bytes System Slot Information Designation: PCIeSlot Type: x1 PCI Express x1 Current Usage: In Use Length: Short ID: 4 Characteristics: 3.3 V is provided Opening is shared PME signal is supported Bus Address: 0000:00:1c.2 Handle 0x0036, DMI type 9, 17 bytes System Slot Information Designation: PCIeSlot Type: x1 PCI Express x1 Current Usage: In Use Length: Short ID: 3 Characteristics: 3.3 V is provided Opening is shared PME signal is supported Bus Address: 0000:00:1c.4 --------------060302050307020002060105-- From owner-freebsd-hardware@FreeBSD.ORG Thu May 31 18:06:21 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 2E80F1065673; Thu, 31 May 2012 18:06:21 +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 E298F8FC1D; Thu, 31 May 2012 18:06:20 +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 q4VI6Jis005077; Thu, 31 May 2012 14:06:19 -0400 (EDT) (envelope-from mike@sentex.net) Message-ID: <4FC7B301.30109@sentex.net> Date: Thu, 31 May 2012 14:05:53 -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: John Baldwin References: <4FC03C83.4030109@sentex.net> <201205301126.40105.jhb@freebsd.org> <20120531161418.GF1467@michelle.cdnetworks.com> <201205311057.05234.jhb@freebsd.org> <4FC7AD6F.60004@sentex.net> In-Reply-To: <4FC7AD6F.60004@sentex.net> 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: 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: Thu, 31 May 2012 18:06:21 -0000 On 5/31/2012 1:42 PM, Mike Tancsa wrote: > On 5/31/2012 10:57 AM, John Baldwin wrote: >>> >>> Right, but what if it is not(from the pciconf output)? >>> I'm pretty sure re(4) used RF_ACTIVE with bus_alloc_resource_any(9). >> >> Hmm, is this pciconf output when the driver is attached? > > Hi, > Here are some of the variations attached in a txt file. Could this > just be a broken card ? I will try and boot up another OS on the box > and see if it works. Oh, and doing a load post reboot, 0{intel-i3}# kldload if_re 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 pci4: child re0 requested type 3 for rid 0x18, but the BAR says it is an ioport pcib4: allocated I/O port range (0xd000-0xd0ff) for rid 10 of re0 re0: Lazy allocation of 0x100 bytes rid 0x10 type 4 at 0xd000 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 0{intel-i3}# 0{intel-i3}# 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 0{intel-i3}# -- ------------------- 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/ From owner-freebsd-hardware@FreeBSD.ORG Thu May 31 18:59:43 2012 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B920C106566C for ; Thu, 31 May 2012 18:59:43 +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 8EFC28FC1E for ; Thu, 31 May 2012 18:59:43 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0D67DB968; Thu, 31 May 2012 14:59:43 -0400 (EDT) From: John Baldwin To: Mike Tancsa Date: Thu, 31 May 2012 14:43:56 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <4FC03C83.4030109@sentex.net> <201205311057.05234.jhb@freebsd.org> <4FC7AD6F.60004@sentex.net> In-Reply-To: <4FC7AD6F.60004@sentex.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201205311443.56648.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 31 May 2012 14:59:43 -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: Thu, 31 May 2012 18:59:43 -0000 On Thursday, May 31, 2012 1:42:07 pm Mike Tancsa wrote: > On 5/31/2012 10:57 AM, John Baldwin wrote: > >> > >> Right, but what if it is not(from the pciconf output)? > >> I'm pretty sure re(4) used RF_ACTIVE with bus_alloc_resource_any(9). > > > > Hmm, is this pciconf output when the driver is attached? > > Hi, > Here are some of the variations attached in a txt file. Could this > just be a broken card ? I will try and boot up another OS on the box > and see if it works. So it seems it is not honoring our writes to the command register to turn on I/O or memory decoding. Oh weird, in your last case it seems they are enabled. (Driver not loaded at all). Wonder if something in the driver startup is stomping on the PCI command register (e.g. in the firmware). Might be interesting to add printfs in re_attach() and see when the relevant bits in the command register change (e.g. do they get turned off by re_reset()). -- John Baldwin From owner-freebsd-hardware@FreeBSD.ORG Fri Jun 1 04:09:52 2012 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 364B3106564A; Fri, 1 Jun 2012 04:09:52 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id EDDFE8FC08; Fri, 1 Jun 2012 04:09:51 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so2555756pbb.13 for ; Thu, 31 May 2012 21:09:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=eP3kdDw9j3jJnxjXoPrIPEju9WYsYVjR1/iiV0WQjo4=; b=JJmJiBbGKV+yW9QgjLmLuRUdXQ9Fg+LyJsgfMM1evVpjdyDLF02GKt91SK9ygDqQPy oCb1vZGt+kXs0+Hy13nRvCbPNXTi+X+gVG3oyqtbPAuVO4OoYA6x2ef1VAELOFrnRxpN 7lyaXnVm8EpGaEHmc9QKaxenGlJg8dFqlIm7eFTChXaSnb7atIn93y/EODj9HgPfoSpc d2uZQKgrRfLAS4fOoz6DOgUCQ/84EN9NQYfBTz1S8CKj6JYPYhqH0egeWoX/6ADq+BM+ T21E0g7BUJfhnQ0+P2SmS3rq6PvwFQAnioZHkagijNU6c0RoVdBlA3o/XYyVVbgCVzjI rcSg== Received: by 10.68.234.101 with SMTP id ud5mr2272053pbc.41.1338523791555; Thu, 31 May 2012 21:09:51 -0700 (PDT) Received: from pyunyh@gmail.com ([114.111.62.249]) by mx.google.com with ESMTPS id go10sm1312865pbc.54.2012.05.31.21.09.48 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 31 May 2012 21:09:50 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Fri, 01 Jun 2012 13:09:42 -0700 From: YongHyeon PYUN Date: Fri, 1 Jun 2012 13:09:42 -0700 To: Mike Tancsa Message-ID: <20120601200942.GD10661@michelle.cdnetworks.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> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="+HP7ph2BbKc20aGI" Content-Disposition: inline In-Reply-To: <4FC7B301.30109@sentex.net> User-Agent: Mutt/1.4.2.3i 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 Reply-To: pyunyh@gmail.com 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 04:09:52 -0000 --+HP7ph2BbKc20aGI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, May 31, 2012 at 02:05:53PM -0400, Mike Tancsa wrote: > On 5/31/2012 1:42 PM, Mike Tancsa wrote: > > On 5/31/2012 10:57 AM, John Baldwin wrote: > >>> > >>> Right, but what if it is not(from the pciconf output)? > >>> I'm pretty sure re(4) used RF_ACTIVE with bus_alloc_resource_any(9). > >> > >> Hmm, is this pciconf output when the driver is attached? > > > > Hi, > > Here are some of the variations attached in a txt file. Could this > > just be a broken card ? I will try and boot up another OS on the box > > and see if it works. > > Oh, and doing a load post reboot, > > 0{intel-i3}# kldload if_re > 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 > pci4: child re0 requested type 3 for rid 0x18, but the BAR says it is an > ioport > pcib4: allocated I/O port range (0xd000-0xd0ff) for rid 10 of re0 > re0: Lazy allocation of 0x100 bytes rid 0x10 type 4 at 0xd000 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? > 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 > 0{intel-i3}# > 0{intel-i3}# 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 > 0{intel-i3}# --+HP7ph2BbKc20aGI Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="re.map.diff" Index: sys/dev/re/if_re.c =================================================================== --- sys/dev/re/if_re.c (revision 236345) +++ sys/dev/re/if_re.c (working copy) @@ -1191,7 +1191,7 @@ const struct rl_hwrev *hw_rev; u_int32_t cap, ctl; int hwrev; - u_int16_t devid, re_did = 0; + u_int16_t cmd, devid, re_did = 0; int error = 0, i, phy, rid; int msic, msixc, reg; uint8_t cfg; @@ -1220,8 +1220,12 @@ sc->rl_res_id = PCIR_BAR(1); sc->rl_res_type = SYS_RES_MEMORY; /* RTL8168/8101E seems to use different BARs. */ - if (devid == RT_DEVICEID_8168 || devid == RT_DEVICEID_8101E) + if (devid == RT_DEVICEID_8168 || devid == RT_DEVICEID_8101E) { sc->rl_res_id = PCIR_BAR(2); + cmd = pci_read_config(dev, PCIR_BAR(2), 2); + if (PCI_BAR_IO(cmd)) + sc->rl_res_type = SYS_RES_IOPORT; + } } else { sc->rl_res_id = PCIR_BAR(0); sc->rl_res_type = SYS_RES_IOPORT; @@ -3317,6 +3321,10 @@ mii = device_get_softc(sc->rl_miibus); RL_LOCK(sc); + if ((ifp->if_flags & IFF_UP) == 0) { + RL_UNLOCK(sc); + return; + } mii_pollstat(mii); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; --+HP7ph2BbKc20aGI-- 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/ 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 From owner-freebsd-hardware@FreeBSD.ORG Sat Jun 2 14:25:54 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 27FEB106566B; Sat, 2 Jun 2012 14:25:54 +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 DC1CC8FC15; Sat, 2 Jun 2012 14:25:53 +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 q52EPWMV069436; Sat, 2 Jun 2012 10:25:33 -0400 (EDT) (envelope-from mike@sentex.net) Message-ID: <4FCA223F.5080009@sentex.net> Date: Sat, 02 Jun 2012 10:25:03 -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: John Baldwin References: <4FC03C83.4030109@sentex.net> <20120601200942.GD10661@michelle.cdnetworks.com> <4FC8A903.6060203@sentex.net> <201206011030.52753.jhb@freebsd.org> In-Reply-To: <201206011030.52753.jhb@freebsd.org> 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: 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: Sat, 02 Jun 2012 14:25:54 -0000 On 6/1/2012 10:30 AM, John Baldwin wrote: > > 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? > Hi, Using the pciconf from HEAD, 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 ff[50] = unknown PCI errors = Master Data Parity Error Sent Target-Abort Received Target-Abort Received Master-Abort Signalled System Error Detected Parity Error ---Mike -- ------------------- 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/