* Should pci driver probe behind a cardbus bridge at boot up ?
@ 2004-07-20 16:23 Wayne Gowcher
2004-07-21 18:57 ` Jun Sun
0 siblings, 1 reply; 4+ messages in thread
From: Wayne Gowcher @ 2004-07-20 16:23 UTC (permalink / raw)
To: linux-mips
I am having a problem with a Ti cardbus chip and yenta
on the 2.6.4 mips kernel whereby when yenta tries to
configure the cardbus chip, it finds all the resources
busy ( because they have already been allocated in the
pci driver ) and so starts allocating new ones.
Here's the output of the PCI driver
PCI: Bus 1, cardbus bridge: 0000:00:0c.0
IO window: 00001000-00001fff
IO window: 00002000-00002fff
PREFETCH window: 40000000-41ffffff
MEM window: 42000000-43ffffff
PCI: Bus 5, cardbus bridge: 0000:00:0c.1
IO window: 00003000-00003fff
IO window: 00004000-00004fff
PREFETCH window: 44000000-45ffffff
MEM window: 46000000-47ffffff
and here's what yenta reports:
Yenta: CardBus bridge found at 0000:00:0c.0
[0000:0000]
yenta 0000:00:0c.0: Preassigned resource 1 busy,
reconfiguring...
Yenta: CardBus bridge found at 0000:00:0c.1
[0000:0000]
When I run the same 2.6.4 kernel compiled for x86 on a
x86 laptop, the x86 kernel finds the bar 0 registers
of the cardbus chip and adds them to it's resource
space, but probes no further. So that later when yenta
probes the cardbus chip, it can allocate the resources
without conflict.
I also found the following comment in
drivers/pci/probe.c pci_scan_bridge :
* If it's a bridge, configure it and scan the bus
behind it.
* For CardBus bridges, we don't scan behind as the
devices will
* be handled by the bridge driver itself.
But the code does scan behind teh cardbus bridge and
add resources to iomem_resources and ioport_resources.
So as I wrote in my title, does anyone know if :
the pci driver should probe behind a cardbus bridge at
boot up or if it should be left to the yenta cardbus ?
__________________________________
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Should pci driver probe behind a cardbus bridge at boot up ?
2004-07-20 16:23 Should pci driver probe behind a cardbus bridge at boot up ? Wayne Gowcher
@ 2004-07-21 18:57 ` Jun Sun
2004-07-22 16:52 ` Wayne Gowcher
0 siblings, 1 reply; 4+ messages in thread
From: Jun Sun @ 2004-07-21 18:57 UTC (permalink / raw)
To: Wayne Gowcher; +Cc: linux-mips, jsun
On Tue, Jul 20, 2004 at 09:23:49AM -0700, Wayne Gowcher wrote:
> I am having a problem with a Ti cardbus chip and yenta
> on the 2.6.4 mips kernel whereby when yenta tries to
> configure the cardbus chip, it finds all the resources
> busy ( because they have already been allocated in the
> pci driver ) and so starts allocating new ones.
>
> Here's the output of the PCI driver
>
> PCI: Bus 1, cardbus bridge: 0000:00:0c.0
> IO window: 00001000-00001fff
> IO window: 00002000-00002fff
> PREFETCH window: 40000000-41ffffff
> MEM window: 42000000-43ffffff
> PCI: Bus 5, cardbus bridge: 0000:00:0c.1
> IO window: 00003000-00003fff
> IO window: 00004000-00004fff
> PREFETCH window: 44000000-45ffffff
> MEM window: 46000000-47ffffff
>
> and here's what yenta reports:
>
> Yenta: CardBus bridge found at 0000:00:0c.0
> [0000:0000]
> yenta 0000:00:0c.0: Preassigned resource 1 busy,
> reconfiguring...
> Yenta: CardBus bridge found at 0000:00:0c.1
> [0000:0000]
>
>
> When I run the same 2.6.4 kernel compiled for x86 on a
> x86 laptop, the x86 kernel finds the bar 0 registers
> of the cardbus chip and adds them to it's resource
> space, but probes no further. So that later when yenta
> probes the cardbus chip, it can allocate the resources
> without conflict.
>
> I also found the following comment in
> drivers/pci/probe.c pci_scan_bridge :
>
> * If it's a bridge, configure it and scan the bus
> behind it.
> * For CardBus bridges, we don't scan behind as the
> devices will
> * be handled by the bridge driver itself.
>
> But the code does scan behind teh cardbus bridge and
> add resources to iomem_resources and ioport_resources.
>
> So as I wrote in my title, does anyone know if :
>
> the pci driver should probe behind a cardbus bridge at
> boot up or if it should be left to the yenta cardbus ?
>
It should not - me think anyway.
Maybe you can tell us _why_, given the same code, i386 does
not scan behind yenta.
Jun
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Should pci driver probe behind a cardbus bridge at boot up ?
@ 2004-07-22 16:52 ` Wayne Gowcher
0 siblings, 0 replies; 4+ messages in thread
From: Wayne Gowcher @ 2004-07-22 16:52 UTC (permalink / raw)
To: Jun Sun; +Cc: linux-mips, jsun
> > So as I wrote in my title, does anyone know if :
> >
> > the pci driver should probe behind a cardbus
> bridge at
> > boot up or if it should be left to the yenta
> cardbus ?
> >
>
> It should not - me think anyway.
>
> Maybe you can tell us _why_, given the same code,
> i386 does
> not scan behind yenta.
>
> Jun
I believe for x86 targets, the PC bios has already
scanned and programmed the memory / io bar registers
of the PCI devices. So for an x86 target linux merely
reads the bar registers - it does not try to reprogram
them, and so does not go behind the cardbus bridge.
For mips and any other architecture which does not
have a bios to set up the pci bus like this, linux has
to scan and allocate io and memory, but as it is doing
so it is adding those resources to it's resource list.
- Effectively reserving those io / memory regions.
Then when yenta comes along, it also scans the cardbus
and tries to REALLOCATE the same resources, but finds
the pci probed resources, returns the "busy" and so
then tries to reallocate the already allocated
resources to a new memory region.
Unfortunately in my case ( and I would like to know if
this true for other people's platforms ), when yenta
does this it seems to corrupt the proc/iomem and
proc/ioport list such that if I do "cat /proc/xx" on
either of these the kernel throws an oops.
Can anyone else do a cat /proc/iomem or ioports with
yenta configured and a cardbus chip on board ??
If yes then I have a problem with my setup, if not
then I suspect the code.
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Should pci driver probe behind a cardbus bridge at boot up ?
@ 2004-07-22 16:52 ` Wayne Gowcher
0 siblings, 0 replies; 4+ messages in thread
From: Wayne Gowcher @ 2004-07-22 16:52 UTC (permalink / raw)
To: Jun Sun; +Cc: linux-mips
> > So as I wrote in my title, does anyone know if :
> >
> > the pci driver should probe behind a cardbus
> bridge at
> > boot up or if it should be left to the yenta
> cardbus ?
> >
>
> It should not - me think anyway.
>
> Maybe you can tell us _why_, given the same code,
> i386 does
> not scan behind yenta.
>
> Jun
I believe for x86 targets, the PC bios has already
scanned and programmed the memory / io bar registers
of the PCI devices. So for an x86 target linux merely
reads the bar registers - it does not try to reprogram
them, and so does not go behind the cardbus bridge.
For mips and any other architecture which does not
have a bios to set up the pci bus like this, linux has
to scan and allocate io and memory, but as it is doing
so it is adding those resources to it's resource list.
- Effectively reserving those io / memory regions.
Then when yenta comes along, it also scans the cardbus
and tries to REALLOCATE the same resources, but finds
the pci probed resources, returns the "busy" and so
then tries to reallocate the already allocated
resources to a new memory region.
Unfortunately in my case ( and I would like to know if
this true for other people's platforms ), when yenta
does this it seems to corrupt the proc/iomem and
proc/ioport list such that if I do "cat /proc/xx" on
either of these the kernel throws an oops.
Can anyone else do a cat /proc/iomem or ioports with
yenta configured and a cardbus chip on board ??
If yes then I have a problem with my setup, if not
then I suspect the code.
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-07-22 16:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-20 16:23 Should pci driver probe behind a cardbus bridge at boot up ? Wayne Gowcher
2004-07-21 18:57 ` Jun Sun
2004-07-22 16:52 ` Wayne Gowcher
2004-07-22 16:52 ` Wayne Gowcher
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.