Re: installing handle_hotplug_event_bridge() during acpiphp init only?

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

 



On Tue, 23 Jun 2009 16:49:39 +0900,
Kenji Kaneshige <kaneshige.kenji@xxxxxxxxxxxxxx> wrote:

Alex Chiang wrote:

I don't have any machines with hotpluggable PCI root bridges, so
I was hoping you could answer a question for me.

It looks like we install handle_hotplug_event_bridge() as a
notify handler on PCI root bridges only when acpiphp is first
loaded.

We later install the same handler on P2P bridges (in
init_bridge_misc()).

But what happens if you hotplug a new PCI root bridge during
runtime?

The way I read the code is:

handle_hotplug_event_bridge
  handle_bridge_insertion
    add_bridge
      add_host_bridge
        init_bridge_misc
	  if (bridge->type != BRIDGE_TYPE_HOST)
            acpi_install_notify_handler(handle_hotplug_event_bridge)

So, now what happens if this new root bridge gets a hotplug
event? Seems like it doesn't have a handler and will never get
it?

Hello Alex-san,
(CC: Takahiro Muneda who knows acpiphp much more than me)

Sorry for the delay.

IIRC, notify handlers (handle_hotplug_event_bridge()) are already
installed for all the root bridges regardless the device status
(_STA) at the driver initialization. So I think we don't need
to install the notify handler to hot-added root bridge again.

My understanding is the same as yours, Kenji-san.

I read through commit 8e7561cf and I must say that I don't
understand the point of modifying init_bridge_misc() so that it
does not install a handler on a new root bridge.

init_bridge_misc() tries to replace a notify handler only if the bridge is P2P bridge. Notify handlers for root bridges are still installed.

Thanks,
MUNE

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