From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752124Ab1KXFuA (ORCPT ); Thu, 24 Nov 2011 00:50:00 -0500 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 Message-ID: <4ECDDB04.5050307@gmail.com> Date: Wed, 23 Nov 2011 23:49:56 -0600 From: Robert Hancock User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 MIME-Version: 1.0 To: Josh Boyer CC: Jeff Garzik , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fedoraproject.org Subject: Re: pata_jmicron triggers warning in PCIe code References: <20111123144344.GA5116@zod.bos.redhat.com> In-Reply-To: <20111123144344.GA5116@zod.bos.redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.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?