Re: [PATCH v1 3/7] PCI: Let kcmdline reserve bus numbers for hotplug bridges

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Sep 19, 2015 at 3:58 PM, Yinghai Lu <yinghai@xxxxxxxxxx> wrote:
> On Thu, Sep 17, 2015 at 2:11 PM, Tang, Jason (ES) <Jason.Tang2@xxxxxxx> wrote:
>> This introduces a new kernel command line parameter, "hpbuses", that
>> allows the user to set how many bus numbers to reserve for hotplug
>> bridges.  The default value is 0, which means do not reserve any bus
>> numbers for bridges that are hot-added after enumeration completes.
>>
>> During device probing, increment a hotplug bridge's subordinate bus
>> number by the amount set by "hpbuses".  This way, bridges that are
>> hot-added after enumeration can have buses reserved for them.
>
>> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
>> index 58ae892..553b345 100644
>> --- a/drivers/pci/probe.c
>> +++ b/drivers/pci/probe.c
>> @@ -930,6 +930,8 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, int pass)
>>                 /*
>>                  * Set the subordinate bus number to its real value.
>>                  */
>> +               if (child->self->is_hotplug_bridge)
>> +                       max += pci_hotplug_buses;
>>                 child->subordinate = max;
>>                 pci_bus_update_busn_res_end(child, child->subordinate);
>>                 pci_write_config_byte(dev, PCI_SUBORDINATE_BUS,
>
> No, you can not increase the max blindly.

It would be really useful if you could explain *why* this doesn't
work.  Then Jason might be able to rework it so it would work.

Bjorn
--
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



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux