From patchwork Thu Mar 27 00:29:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Greatorex X-Patchwork-Id: 3895931 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 274A19F2E8 for ; Thu, 27 Mar 2014 00:30:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 039AC2021F for ; Thu, 27 Mar 2014 00:30:30 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2057F2021C for ; Thu, 27 Mar 2014 00:30:28 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WSyD6-00066j-LV; Thu, 27 Mar 2014 00:30:20 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WSyD4-00082E-57; Thu, 27 Mar 2014 00:30:18 +0000 Received: from mail-wi0-f173.google.com ([209.85.212.173]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WSyCz-00081m-Vi for linux-arm-kernel@lists.infradead.org; Thu, 27 Mar 2014 00:30:15 +0000 Received: by mail-wi0-f173.google.com with SMTP id f8so5365583wiw.6 for ; Wed, 26 Mar 2014 17:29:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fatboyfat.co.uk; s=google; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version:content-type; bh=WlCNh3s3gBktP5GJ6NvUObsBN/Y91kwnZT34Gy4bMiI=; b=J8LjGKF1GuktYTmR3KxK/ocFQSr47CJdnsjxkzwhRzH+EMJL6f5W1UNKn5xhedPQ21 /oo6eHBR/fPK4iLwiRbc41J14Mepm0zuGnN9a5o3zm4VMM0dr5wh2l2Sqs31lLEYp28C aUxycCiV6VmIEeM+iewU9dIgCF+6iBF5oTCLk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version:content-type; bh=WlCNh3s3gBktP5GJ6NvUObsBN/Y91kwnZT34Gy4bMiI=; b=fzy2+exdhGD6cfVZuJ+g8U5IVqdxbI8OrdchqL7DZHLdgHuu56Nb6sdY164FGks8os PH0JAEhJ9MnNfjIc1/1TSl79XDgFMguA/1c5O2VCyrZuWsSOFwC5EZ6E1dnphNkN1Pb8 QWedYKUILnffElev60Z4Or7siweXS2RDDlY3JXd7iOo1EM8A8EWkZCbUqiBA/rJ+KEym f0fdt+KeQr1Emt5j9Kq/0K+yX2WdOu5dz6xY4Kr/09wN8pZiCfVhA+X3NTp/T+jqYvTt EN1sMkxST0f61OOpG1zvF/d6ZVLtccyl/kWGRzwbHvOKtLH7BRtDZShZgRECc2vicPs7 WDhg== X-Gm-Message-State: ALoCoQl2pUplxFlpZM0U+ee+qUNhj+35hHG6PfUzl2P1jy2Z1+EfFa/gDeVHT2NsMKqPjawi/gv1 X-Received: by 10.180.76.137 with SMTP id k9mr676931wiw.21.1395880187430; Wed, 26 Mar 2014 17:29:47 -0700 (PDT) Received: from vroombuntu.lan (97e4ff9e.skybroadband.com. [151.228.255.158]) by mx.google.com with ESMTPSA id f3sm1892145wiv.2.2014.03.26.17.29.42 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Mar 2014 17:29:43 -0700 (PDT) Date: Thu, 27 Mar 2014 00:29:32 +0000 (GMT) From: Neil Greatorex X-X-Sender: neil@vroombuntu To: Jason Gunthorpe Subject: Re: Intel I350 mini-PCIe card (igb) on Mirabox (mvebu / Armada 370) In-Reply-To: <20140326214259.GA12330@obsidianresearch.com> Message-ID: References: <20140325202249.GA10378@obsidianresearch.com> <20140325213638.5aba54b6@skate> <20140325222404.GC14718@obsidianresearch.com> <20140325223510.GD14718@obsidianresearch.com> <20140326201243.GA1536@obsidianresearch.com> <20140326214259.GA12330@obsidianresearch.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140326_203014_331455_216973A0 X-CRM114-Status: GOOD ( 19.99 ) X-Spam-Score: -2.7 (--) Cc: Thomas Petazzoni , Bjorn Helgaas , Jason Cooper , linux-arm-kernel , Willy Tarreau X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Jason, On Wed, Mar 26, 2014 at 9:42 PM, Jason Gunthorpe wrote: > On Wed, Mar 26, 2014 at 08:34:19PM +0000, Neil Greatorex wrote: >> Thanks. Here's the relevant output with that patch: >> >> [ 0.135772] mvebu-pcie pcie-controller.3: ICR is 0 >> [ 0.160889] mvebu-pcie pcie-controller.3: Vendor ID is ffffffff >> [ 0.160897] mvebu-pcie pcie-controller.3: ICR is 800200 >> [ 1.170215] mvebu-pcie pcie-controller.3: Try 2: Vendor ID is 15218086 >> [ 1.170228] mvebu-pcie pcie-controller.3: ICR is 0 > > Okay, this looks better.. > > > I checked on my board here with the link down and I get: > > mvebu-pcie pex.1: Link is 0 > mvebu-pcie pex.1: ICR is 0 > mvebu-pcie pex.1: Vendor ID is ffffffff > mvebu-pcie pex.1: ICR is 201 > > Which makes sense - NF Error + Tx while in Link down Error. > > In any event, lets try this. > I ran with this patch applied (but none of the previous ones you sent - was that correct?) but the new dev_info line doesn't fire. I also no longer get the ethernet card detected at boot, and get the weird dual XHCI controller after a rescan. mirabox ~ # dmesg | grep "ID read" mirabox ~ # lspci 00:01.0 PCI bridge: Marvell Technology Group Ltd. Device 6710 (rev 01) 00:02.0 PCI bridge: Marvell Technology Group Ltd. Device 6710 (rev 01) 02:00.0 USB controller: Fresco Logic FL1009 USB 3.0 Host Controller (rev 02) mirabox ~ # echo 1 > /sys/bus/pci/rescan mirabox ~ # lspci 00:01.0 PCI bridge: Marvell Technology Group Ltd. Device 6710 (rev 01) 00:02.0 PCI bridge: Marvell Technology Group Ltd. Device 6710 (rev 01) 01:00.0 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01) 01:00.1 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01) 02:00.0 USB controller: Fresco Logic FL1009 USB 3.0 Host Controller (rev ff) 03:00.0 USB controller: Fresco Logic FL1009 USB 3.0 Host Controller (rev 02) mirabox ~ # dmesg | grep "ID read" mirabox ~ # Full dmesg showing boot and rescan at https://gist.github.com/9796043 I then added an extra dev_info to print the ICR just after you read it in the loop, and get this: [ 0.137047] pci_bus 0000:01: scanning bus [ 0.161098] mvebu-pcie pcie-controller.3: ICR is 808200 [ 0.162104] mvebu-pcie pcie-controller.3: ICR is 808201 [ 0.162191] pci_bus 0000:01: fixups for bus So it seems that the first time we have NFErrDet and PexLinkFail, and on the second time through the loop we have NFErrDet, PexLinkFail and TxReqInDIDownErr, so it then errors out of the loop. Full dmesg for this boot is at https://gist.github.com/9796442 Then, I added back in the 1 second delay just after the call to mvebu_pcie_set_local_dev_nr and the card was detected again with the following: [ 2.133299] pci_bus 0000:01: scanning bus [ 2.133313] mvebu-pcie pcie-controller.3: ICR is 808000 [ 2.133351] pci 0000:01:00.0: [8086:1521] type 00 class 0x020000 [ 2.133379] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x0007ffff] [ 2.133405] pci 0000:01:00.0: reg 0x18: [io 0x0000-0x001f] [ 2.133422] pci 0000:01:00.0: reg 0x1c: [mem 0x00000000-0x00003fff] [ 2.133456] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0007ffff pref] [ 2.133473] pci 0000:01:00.0: calling pci_fixup_ide_bases+0x0/0x3c [ 2.133589] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold [ 2.133601] pci 0000:01:00.0: PME# disabled [ 2.133658] pci 0000:01:00.0: reg 0x184: [mem 0x00000000-0x00003fff] [ 2.133692] pci 0000:01:00.0: reg 0x190: [mem 0x00000000-0x00003fff] [ 2.133945] mvebu-pcie pcie-controller.3: ICR is 808000 [ 2.133987] pci 0000:01:00.1: [8086:1521] type 00 class 0x020000 [ 2.134014] pci 0000:01:00.1: reg 0x10: [mem 0x00000000-0x0007ffff] [ 2.134040] pci 0000:01:00.1: reg 0x18: [io 0x0000-0x001f] [ 2.134057] pci 0000:01:00.1: reg 0x1c: [mem 0x00000000-0x00003fff] [ 2.134091] pci 0000:01:00.1: reg 0x30: [mem 0x00000000-0x0007ffff pref] [ 2.134106] pci 0000:01:00.1: calling pci_fixup_ide_bases+0x0/0x3c [ 2.134215] pci 0000:01:00.1: PME# supported from D0 D3hot D3cold [ 2.134226] pci 0000:01:00.1: PME# disabled [ 2.134281] pci 0000:01:00.1: reg 0x184: [mem 0x00000000-0x00003fff] [ 2.134316] pci 0000:01:00.1: reg 0x190: [mem 0x00000000-0x00003fff] [ 2.134560] mvebu-pcie pcie-controller.3: ICR is 808000 [ 2.134571] mvebu-pcie pcie-controller.3: ICR is 808000 [ 2.134581] mvebu-pcie pcie-controller.3: ICR is 808000 [ 2.134590] mvebu-pcie pcie-controller.3: ICR is 808000 [ 2.134599] mvebu-pcie pcie-controller.3: ICR is 808000 [ 2.134607] mvebu-pcie pcie-controller.3: ICR is 808000 [ 2.134633] pci_bus 0000:01: fixups for bus mirabox ~ # lspci [ 71.400126] mvebu-pcie pcie-controller.3: ICR is 0 [ 71.407226] mvebu-pcie pcie-controller.3: ICR is 808000 [ 71.412559] mvebu-pcie pcie-controller.3: ICR is 808000 00:01.0 PCI bridge: Marvell Technology Group Ltd. Device 6710 (rev 01) 00:02.0 PCI bridge: Marvell Technology Group Ltd. Device 6710 (rev 01) 01:00.0 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01) 01:00.1 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01) 03:00.0 USB controller: Fresco Logic FL1009 USB 3.0 Host Controller (rev 02) Full dmesg for this boot is at: https://gist.github.com/9796851 For clarity, the patch that I've applied on top of your last patch is at the end of this e-mail... Cheers, Neil @@ -1018,6 +1020,7 @@ static int mvebu_pcie_probe(struct platform_device *pdev) } mvebu_pcie_set_local_dev_nr(port, 1); + mdelay(1000); port->dn = child; spin_lock_init(&port->conf_lock); diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c index 75d2a73..46f72f54 100644 --- a/drivers/pci/host/pci-mvebu.c +++ b/drivers/pci/host/pci-mvebu.c @@ -273,6 +273,8 @@ static int mvebu_pcie_hw_rd_conf(struct mvebu_pcie_port *port, if (where == 0) { u32 icr = mvebu_readl(port, PCIE_ICR); + dev_info(&port->pcie->pdev->dev, + "ICR is %x\n", icr); if (icr & PCIE_ICR_TX_IN_DOWN) goto err_out;