Kernel cannot see PCI device

Bjorn Helgaas bhelgaas at google.com
Fri May 20 03:58:54 EST 2011


On Thu, May 19, 2011 at 6:41 AM, Prashant Bhole
<prashantsmailcenter at gmail.com> wrote:
> On Wed, May 18, 2011 at 7:44 PM, Bjorn Helgaas <bhelgaas at google.com> wrote:
>> On Wed, May 18, 2011 at 4:02 AM, Prashant Bhole
>> <prashantsmailcenter at gmail.com> wrote:
>>> On Mon, May 2, 2011 at 10:21 AM, Prashant Bhole
>>> <prashantsmailcenter at gmail.com> wrote:
>>>>
>>>> I have a custom made powerpc 460EX board. On that board u-boot
>>>> can see a PCI device but Linux kernel cannot see it. What could be the problem?
>>>>
>>>> On u-boot "pci  2" commands displays following device:
>>>> Scanning PCI devices on bus 2
>>>> BusDevFun  VendorId   DeviceId   Device Class       Sub-Class
>>>> _____________________________________________________________
>>>> 02.00.00   0x1000     0x0072     Mass storage controller 0x00
>>>>
>>>> And when the kernel is booted, there is only one pci device (bridge):
>>>> #ls /sys/bus/pci/devices
>>>> 0000:80:00.0
>>>
>>> a call to pci_bus_read_config_dword(bus, devfn, PCI_VENDOR_ID, &l) returns
>>> positive value in the function pci_scan_device(), which means VENDOR_ID reading
>>> failed. I could not find the reason. Any hints?
>>
>> My guess would be that Linux didn't find the host bridge to the
>> hierarchy containing bus 2.  I would guess the host bridge info is
>> supposed to come from OF.  More information, like the complete u-boot
>> PCI scan and the kernel dmesg log, would be useful.  And maybe u-boot
>> has a way to dump the OF device tree?
>
> I am not using OF for booting u-boot. OF is being used for booting the kernel.
> Not sure whether the host bridge info is coming from OF.
> Device tree has two pciex nodes with following property:
>
> compatible = "ibm,plb-pciex-460ex", "ibm,plb-pciex"
> I think that node represents a pciex bus not the bridge.

I think you have three PCI host bridges:

  PCIE1 to domain 0000 [bus 80-bf]  /plb/pciex at d20000000
  PCIX0 to domain 0001 [bus 00-3f]  /plb/pci at c0ec00000
  PCIE0 to [bus 40-7f] ("disabled via device-tree")

The scan below PCIE1 seems to work; at least, we found a P2P bridge at
0000:80:00.0.

The scan below PCIX0 (bus 0001:00) doesn't find anything.  You really
need a powerpc expert to help here, but in their absence, my guess
would be something's wrong with config space access, so I would start
by just adding some printks to ppc4xx_probe_pcix_bridge() to see if
the rsrc_cfg address looks reasonable.  You might need a chip spec or
maybe you can compare it to the device tree (I have no idea what the
relation between the device tree and OF is).

You mentioned the u-boot "pci 2" command earlier.  It found a device
on bus 2, which means there must be at least one P2P bridge to get you
from bus 0 to bus 2.  So the output of "pci 0", "pci 1", "pci 80", and
"pci 81" (to compare with what Linux found) would be interesting.

Bjorn


More information about the Linuxppc-dev mailing list