Re: [PATCH] pci hotplug: rescan bridge after device hotplug

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

 



On Tue, May 22, 2012 at 1:11 PM, Jason Baron <jbaron@xxxxxxxxxx> wrote:
> I'm tyring to support bridge hotplug and devices below it in qemu via acpi
> hotplug. Currently only 1 level or 32 slots are supported. By allowing for a
> second level, we will be able to support 32^2 devices.
>
> If I first hotplug the bridge with no devices intially below it, the hotplug
> code sets the bridge memory window to 0 and does not increase it when
> subsequent devices are added below it.
>
> Fix this, by calling pci_rescan_bus_bridge_resize(), on the bridge directly
> below the root to re-size all the birdge windows that may have changed.
>
> Signed-off-by: Jason Baron <jbaron@xxxxxxxxxx>

can you check patch in

http://git.kernel.org/?p=linux/kernel/git/yinghai/linux-yinghai.git;a=patch;h=174dfefc6066bf0af21e0989ad3aa7b1cc3cd46a

During checking acpiphp code, found following sequence:
        pci_bus_size_bridges(bus);
        pci_bus_assign_resources(bus);
	pci_enable_bridges(bus);

The problem is that when bus is not root bus, pci_bus_size_bridges
would also size
own pci bridge bus->self if that bridge resource is not inserted before.
but later pci_bus_assign_resources will not allocate those size bridge res.

So try make it less confusing, let it does not include self sizing.
and add with_self parameter info __pci_bus_size_bridge()

Fixes caller in pci hotplug componets.

Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>
---
 drivers/pci/hotplug/acpiphp_glue.c |    3 ++-
 drivers/pci/setup-bus.c            |   24 +++++++++++++++---------
 include/linux/pci.h                |    1 +
 3 files changed, 18 insertions(+), 10 deletions(-)
..

it should address your problem.

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


[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