PCI: pciehp: Add hotplug_lock to serialize hotplug events
authorRajat Jain <rajatxjain@gmail.com>
Wed, 5 Feb 2014 02:31:11 +0000 (18:31 -0800)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 11 Feb 2014 23:13:16 +0000 (16:13 -0700)
commit50b52fdee050745935d92e7026373edea2647e60
tree0739f5a0135b070c7626542ffd593074341d950b
parentc4f2f5e4981073a5aa0739f93b6733060cd37648
PCI: pciehp: Add hotplug_lock to serialize hotplug events

Today it is there is no protection around pciehp_enable_slot() and
pciehp_disable_slot() to ensure that they complete before another
hot-plug operation can be done on that particular slot.

This patch introduces the slot->hotplug_lock to ensure that any hotplug
operations (add / remove) complete before another hotplug event can begin
processing on that particular slot.

Signed-off-by: Rajat Jain <rajatxjain@gmail.com>
Signed-off-by: Rajat Jain <rajatjain@juniper.net>
Signed-off-by: Guenter Roeck <groeck@juniper.net>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/hotplug/pciehp.h
drivers/pci/hotplug/pciehp_core.c
drivers/pci/hotplug/pciehp_ctrl.c
drivers/pci/hotplug/pciehp_hpc.c