RE: [PATCH v2 2/6] ACPI, PCI: Notify acpi_pci_drivers when hot-plugging PCI root bridges

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

 



> -----Original Message-----
> From: Taku Izumi [mailto:izumi.taku@xxxxxxxxxxxxxx]
> Sent: Monday, September 03, 2012 5:05 PM
> To: Izumi, Taku/泉 拓
> Cc: linux-pci@xxxxxxxxxxxxxxx; bhelgaas@xxxxxxxxxx;
> linux-acpi@xxxxxxxxxxxxxxx; Kaneshige, Kenji/金重 憲治;
> yinghai@xxxxxxxxxx; jiang.liu@xxxxxxxxxx
> Subject: [PATCH v2 2/6] ACPI, PCI: Notify acpi_pci_drivers when
> hot-plugging PCI root bridges
> 
> From: Jiang Liu <jiang.liu@xxxxxxxxxx>
> 
>   ACPI, PCI: Notify acpi_pci_drivers when hot-plugging PCI root bridges
> 
>   When hot-plugging PCI root bridge, acpi_pci_drivers' add()/remove()
>   methods should be invoked to notify registered drivers.
> 
>   -v2: Move add calling to acpi_pci_root_start by Yinghai
> 
> Signed-off-by: Jiang Liu <jiang.liu@xxxxxxxxxx>
> Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>
> Signed-off-by: Taku Izumi <izumi.taku@xxxxxxxxxxxxxx>
> ---
>  drivers/acpi/pci_root.c |   11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> Index: Bjorn-next-0808/drivers/acpi/pci_root.c
> ===================================================================
> --- Bjorn-next-0808.orig/drivers/acpi/pci_root.c
> +++ Bjorn-next-0808/drivers/acpi/pci_root.c
> @@ -626,14 +626,25 @@ end:
>  static int acpi_pci_root_start(struct acpi_device *device)
>  {
>  	struct acpi_pci_root *root = acpi_driver_data(device);
> +	struct acpi_pci_driver *driver;
> +
> +	list_for_each_entry(driver, &acpi_pci_drivers, node)
> +		if (driver->add)
> +			driver->add(device->handle);
> 

I think this (invoke .add callback for each acpi pci driver) should be done
after pci_bus_add_devices().

It seems ACPI pci drivers run *after* pci_bus_add_devices() at the boot time
(because no acpi pci drivers is loaded at that time). On the other hand, it
seems that ACPI pci drivers run *before* pci_bus_add_devices() at the hotadd
time. Those should be the same.

Regards,
Kenji Kaneshige

>  	pci_bus_add_devices(root->bus);
> +

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