pci_bus_for_each_resource, transparent bridges and rsrc_nonstatic.c
Bjorn Helgaas
bjorn.helgaas at hp.com
Mon Mar 22 12:34:28 EDT 2010
On Monday 22 March 2010 06:00:41 am Dominik Brodowski wrote:
> Komuro reports the following issue:
>
> 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 93) (prog-if 01 [Subtractive decode])
> ...
> Bus: primary=00, secondary=04, subordinate=05, sec-latency=32
> I/O behind bridge: 00001000-00001fff
> Memory behind bridge: d2000000-d40fffff
> Prefetchable memory behind bridge: 00000000d0000000-00000000d1ffffff
>
> 04:06.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev b6)
>
> Iterating over the bus (4) resources used to report just IO 0x1000-0x1ffff,
> MEM d2...-d4..., prefetch d0...-d1..., and that's exactly what we need in
> drivers/pcmcia/rsrc_nonstatic.c . However, the newly added
> pci_bus_for_each_resource() seems to return _also_ additional resources,
> which we need to exclude in drivers/pcmcia/rssrc_nonstatic.c . Any ideas on
> how to fix this issue?
This was probably broken by 2fe2abf896c1 or maybe 89a74ecccd1f7, but
I don't see how yet.
Before those changes, we had this:
#define PCI_BUS_NUM_RESOURCES 16
static int nonstatic_autoadd_resources(struct pcmcia_socket *s)
...
for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) {
struct resource *root = socket->dev->bus->resource[i];
so we used to iterate over all 16 possible bus resources, not just four.
Can you please collect a dmesg log from b16694f70c (just before my
changes) and another from 7bc5e3f2be32 (just after) so we can compare
them?
You can open a kernel bugzilla, assign it to me, and attach the logs
there, if you want.
Bjorn
> > yenta_cardbus 0000:04:06.0: pcmcia: parent PCI bridge I/O window: 0x1000 - 0x1fff
> > yenta_cardbus 0000:04:06.0: pcmcia: parent PCI bridge Memory window: 0xd2000000 - 0xd40fffff
> > yenta_cardbus 0000:04:06.0: pcmcia: parent PCI bridge Memory window: 0xd0000000 - 0xd1ffffff
> > yenta_cardbus 0000:04:06.0: pcmcia: parent PCI bridge I/O window: 0x0 - 0xcf7
> > yenta_cardbus 0000:04:06.0: pcmcia: parent PCI bridge I/O window: 0xd00 - 0xffff
> > yenta_cardbus 0000:04:06.0: pcmcia: parent PCI bridge Memory window: 0xa0000 - 0xbffff
> > yenta_cardbus 0000:04:06.0: pcmcia: parent PCI bridge Memory window: 0xc0000000 - 0xfebfffff
More information about the linux-pcmcia
mailing list