From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Hancock Subject: Re: pata_jmicron triggers warning in PCIe code Date: Wed, 23 Nov 2011 23:49:56 -0600 Message-ID: <4ECDDB04.5050307@gmail.com> References: <20111123144344.GA5116@zod.bos.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mail-gx0-f174.google.com ([209.85.161.174]:60079 "EHLO mail-gx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750736Ab1KXFt7 (ORCPT ); Thu, 24 Nov 2011 00:49:59 -0500 In-Reply-To: <20111123144344.GA5116@zod.bos.redhat.com> Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: Josh Boyer Cc: Jeff Garzik , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fedoraproject.org On 11/23/2011 08:43 AM, Josh Boyer wrote: > Hi, > > We have a report of the pata_jmicron driver hitting the following > warning in the 3.1.x kernel series: > > WARNING: at drivers/pci/search.c:44 pci_find_upstream_pcie_bridge+0x56/0x6f() > Hardware name: System Product Name > Modules linked in: pata_jmicron(+) > Pid: 256, comm: modprobe Not tainted 3.1.1-1.fc16.x86_64 #1 > Call Trace: > [] warn_slowpath_common+0x83/0x9b > [] warn_slowpath_null+0x1a/0x1c > [] pci_find_upstream_pcie_bridge+0x56/0x6f > [] get_domain_for_dev.part.9.constprop.13+0x2e/0x47f > [] __get_valid_domain_for_dev+0x2c/0xa0 > [] __intel_map_single+0x5a/0x172 > [] ? alloc_pages_current+0xc7/0xd8 > [] intel_alloc_coherent+0xc7/0xee > [] ? dmam_noncoherent_release+0x1b/0x1b > [] dma_alloc_coherent+0x80/0x82 > [] dmam_alloc_coherent+0x58/0x9c > [] ata_bmdma_port_start+0x43/0x58 > [] ata_host_start+0xdd/0x168 > [] ? __ata_sff_interrupt+0x179/0x179 > [] ata_pci_sff_activate_host+0x36/0x1e0 > [] ? pcibios_set_master+0x88/0x8f > [] ata_pci_bmdma_init_one+0xc2/0xf8 > [] jmicron_init_one+0x32/0x34 [pata_jmicron] > [] local_pci_probe+0x44/0x75 > [] pci_device_probe+0xd0/0xff > [] driver_probe_device+0x131/0x213 > [] __driver_attach+0x5a/0x7e > [] ? driver_probe_device+0x213/0x213 > [] bus_for_each_dev+0x53/0x89 > [] driver_attach+0x1e/0x20 > [] bus_add_driver+0xd1/0x224 > [] ? 0xffffffffa0001fff > [] driver_register+0x98/0x105 > [] ? 0xffffffffa0001fff > [] __pci_register_driver+0x56/0xc1 > [] ? 0xffffffffa0001fff > [] jmicron_init+0x1e/0x20 [pata_jmicron] > [] do_one_initcall+0x7f/0x136 > [] sys_init_module+0x88/0x1d0 > [] system_call_fastpath+0x16/0x1b > > That boils down to the following check: > > /* PCI device should connect to a PCIe bridge */ > if (pdev->pcie_type != PCI_EXP_TYPE_PCI_BRIDGE) { > /* Busted hardware? */ > WARN_ON_ONCE(1); > return NULL; > } > > I don't recall seeing reports of this on the 3.0 kernel. Should we add > some debugging code to print out what pdev->pcie_type is set to here? > Without knowing that, I can't tell if it's actually finding something weird > about the hardware, or memory corruption that seems to hit here. > > The user has hit it about 3 times thus far, so they can at least recreate > it fairly easily. > > Any other ideas? Well, I don't think it has anything to do with the driver. It seems like the code is trying to go from the PCI device up the chain of PCI bridges until it finds a PCI-E device that's a bridge. The warning indicates that the first PCI-E device it found didn't seem to be a bridge. Can we get the output of "lspci -vv" on this machine?