On Tue, May 15, 2012 at 6:18 PM, Richard Yang <weiyang@xxxxxxxxxxxxxxxxxx> wrote: > On Tue, May 15, 2012 at 10:32:46AM -0700, Yinghai Lu wrote: >>>>>>On 04/22/2012 11:52 AM, Richard Yang wrote: >>>>>>>All, >>>>>>> >>>>>>>I am reading the pci_scan_bridge() and not sure what will happen in >>>>>>>following situation. >>>>>>> >>>>>>>Suppose the kernel is not passed the pci=assign-busses. >>>>>>> >>>>>>>Below is a picture about the pci system. >>>>>>> >>>>>>> +-------+ >>>>>>> | | root bridge(0,255) >>>>>>> +---+---+ >>>>>>> | Bus 0 >>>>>>> -----+-----------+------------------------------+-- >>>>>>> | | >>>>>>> | | >>>>>>> | | >>>>>>> +----+----+ +-----+-----+ >>>>>>> | | B1(1,15) | |B2(16,28) >>>>>>> +----+----+ +-----+-----+ >>>>>>> | Bus 1 | Bus 16 >>>>>>> -----+----------------------- ----------+---------------- >>>>>>> | >>>>>>> +----+----+ >>>>>>> | | B3 >>>>>>> +---------+ >>>>>>> >>>>>>>Suppose B1 and B2 works fine with the BIOS, which get the right bus >>>>>>>number and range. >>>>>>> >>>>>>>B3 does not works fine with the BIOS, which doesn't get the bus number. >>>>>>> >>>>> Take my original question. >>>>> >>>>> B3 doesn't get the bus number, which its parent doesn't have free bus >>>>> number and there is no gap between B1 and B2. >>>>> >>>>> So in this case, the probe_resource() can't find bus number for B3. >>>>> Then cause pci_bridge_probe_busn_res() return non-zero. >>>>> >>>>> Then B3 couldn't work fine? >>>> >>>>B3 is on Bus 1? B3 is the one of bridges on Bus1? >>> No, I omit other bridges on Bus#1. >>> They will occupy bus number 2-15, which is calculated by BIOS and set to >>> bridge's configuration space. >> >>with that new condition, probe_resource will return zero. >> >>for those kind of case: >>1. use echo 1 > /sys .../remove to remove devices under Bridge2. >>2. use setpci to change bus register of bridge2 to move high to make >>more space for bridge 1. >>3. rescan bridge 1 and bridge 2. > So these steps is done after boot up and user find B3 doesn't work? yes, after os is booted up. Yinghai -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html