RE: Problems with PCI-E devices not being detected with switch

2008-10-20 Thread Benjamin Herrenschmidt
> The part that didn't look correct is this line (note the operators) > >((buses >> 8) & 0xff) != <= bus->number) { > >Operators ^^ ^^ Ooohhh ... nice typo :-) The right one is <=, thanks for catching this ! > >From reading through the code and your textual description of w

RE: Problems with PCI-E devices not being detected with switch

2008-10-20 Thread Ayman El-Khashab
Benjamin Herrenschmidt wrote: >>> >>> + /* Check if setup is sensible at all */ >>> + if ((buses & 0xff) != bus->number || >>> + ((buses >> 8) & 0xff) != <= bus->number) { >> >> Note that I removed the <= from the above line -- I did not think it >> was correct. Please let me know if

RE: Problems with PCI-E devices not being detected with switch

2008-10-20 Thread Benjamin Herrenschmidt
On Mon, 2008-10-20 at 16:03 -0500, Ayman El-Khashab wrote: > Thank you Ben, I've had success with the patch, details below ... > > Benjamin Herrenschmidt wrote: > > > Can you try this (untested) patch and send me the resulting dmesg log > > (along with whether it helps). > > > > Index: linux-wo

RE: Problems with PCI-E devices not being detected with switch

2008-10-20 Thread Ayman El-Khashab
Thank you Ben, I've had success with the patch, details below ... Benjamin Herrenschmidt wrote: > Can you try this (untested) patch and send me the resulting dmesg log > (along with whether it helps). > > Index: linux-work/drivers/pci/probe.c > ==

RE: Problems with PCI-E devices not being detected with switch

2008-10-17 Thread Benjamin Herrenschmidt
On Fri, 2008-10-17 at 09:54 -0500, Ayman El-Khashab wrote: > Benjamin Herrenschmidt wrote: > > On Thu, 2008-10-16 at 10:01 -0500, Ayman El-Khashab wrote: > >> Benjamin Herrenschmidt wrote: > >>> On Wed, 2008-10-15 at 10:47 -0500, Ayman El-Khashab wrote: > >>> > >>> Note for people on CC: This is a

RE: Problems with PCI-E devices not being detected with switch

2008-10-17 Thread Benjamin Herrenschmidt
On Fri, 2008-10-17 at 09:54 -0500, Ayman El-Khashab wrote: > Benjamin Herrenschmidt wrote: > > On Thu, 2008-10-16 at 10:01 -0500, Ayman El-Khashab wrote: > >> Benjamin Herrenschmidt wrote: > >>> On Wed, 2008-10-15 at 10:47 -0500, Ayman El-Khashab wrote: > >>> > >>> Note for people on CC: This is a

RE: Problems with PCI-E devices not being detected with switch

2008-10-17 Thread Ayman El-Khashab
Benjamin Herrenschmidt wrote: > On Thu, 2008-10-16 at 10:01 -0500, Ayman El-Khashab wrote: >> Benjamin Herrenschmidt wrote: >>> On Wed, 2008-10-15 at 10:47 -0500, Ayman El-Khashab wrote: >>> >>> Note for people on CC: This is a problem on 460EX on a canyonland >>> using the 4x port. >>> > > Ok,

Re: Problems with PCI-E devices not being detected with switch

2008-10-17 Thread Stefan Roese
On Friday 17 October 2008, Benjamin Herrenschmidt wrote: > Ok, can you send me a full dmesg log with "debug" on the kernel command > line after adding a #define DEBUG 1 to the top of drivers/pci/probe.c > please ? (before the batch of #include). > > The generic code is _supposed_ to somewhat figure

RE: Problems with PCI-E devices not being detected with switch

2008-10-16 Thread Benjamin Herrenschmidt
On Thu, 2008-10-16 at 10:01 -0500, Ayman El-Khashab wrote: > Benjamin Herrenschmidt wrote: > > On Wed, 2008-10-15 at 10:47 -0500, Ayman El-Khashab wrote: > > > > Note for people on CC: This is a problem on 460EX on a canyonland > > using the 4x port. > > > >> The problem occurs when Linux boots.

RE: Problems with PCI-E devices not being detected with switch

2008-10-16 Thread Benjamin Herrenschmidt
On Thu, 2008-10-16 at 10:01 -0500, Ayman El-Khashab wrote: > > Thanks for your help. I did try a 5s delay and other than the boot > taking an extra couple of seconds, there was no change. The messages > above "unknown header" still showed up. Downstream devices were not > found. > BTW, this is

RE: Problems with PCI-E devices not being detected with switch

2008-10-16 Thread Ayman El-Khashab
Benjamin Herrenschmidt wrote: > On Wed, 2008-10-15 at 10:47 -0500, Ayman El-Khashab wrote: > > Note for people on CC: This is a problem on 460EX on a canyonland > using the 4x port. > >> The problem occurs when Linux boots. It sees the switch (and looking >> in /sys/bus/... confirms it), but not

Re: Problems with PCI-E devices not being detected with switch

2008-10-16 Thread Benjamin Herrenschmidt
On Thu, 2008-10-16 at 10:48 +0200, Stefan Roese wrote: > Yeah. I could add this "configured" property to the current U-Boot version. > Perhaps we should add some version information to it so that Linux could > eventually decide to re-configure when the "configured" version is known to > be buggy

Re: Problems with PCI-E devices not being detected with switch

2008-10-16 Thread Stefan Roese
On Thursday 16 October 2008, Benjamin Herrenschmidt wrote: > On Thu, 2008-10-16 at 10:03 +0200, Stefan Roese wrote: > > Doing this unconditionally is not a good idea since we could have an old > > (buggy) firmware which didn't configure the PCIe controller correctly. > > But I really like your idea

Re: Problems with PCI-E devices not being detected with switch

2008-10-16 Thread Benjamin Herrenschmidt
On Thu, 2008-10-16 at 10:03 +0200, Stefan Roese wrote: > Doing this unconditionally is not a good idea since we could have an old > (buggy) firmware which didn't configure the PCIe controller correctly. But I > really like your idea with the device-tree property to optionally skip this > re-conf

Re: Problems with PCI-E devices not being detected with switch

2008-10-16 Thread Stefan Roese
On Thursday 16 October 2008, Benjamin Herrenschmidt wrote: > > pci 0001:02:1c.0: ignoring class 5d01 (doesn't match header type 02) > > pci 0001:02:1d.0: unknown header type 41, ignoring device > > pci 0001:02:1e.0: unknown header type 03, ignoring device > > pci 0001:02:1f.0: unknown header type 4

Re: Problems with PCI-E devices not being detected with switch

2008-10-15 Thread Benjamin Herrenschmidt
On Wed, 2008-10-15 at 10:47 -0500, Ayman El-Khashab wrote: Note for people on CC: This is a problem on 460EX on a canyonland using the 4x port. > The problem occurs when Linux boots. It sees the switch (and looking > in /sys/bus/... confirms it), but nothing on the downstream sides of > the switc