]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI / hotplug / PCI: Avoid doing too much for spurious notifies
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 6 Sep 2013 13:41:32 +0000 (15:41 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 7 Sep 2013 01:43:35 +0000 (03:43 +0200)
commit0f173159004406dea6326d6c07f3de85db8a52bf
treec580ce223a214fde6972bdb5b9778f7e72c72258
parent5ebc805298ff6c787969f38afa6250e6f9bb8cf7
ACPI / hotplug / PCI: Avoid doing too much for spurious notifies

Sometimes we may get a spurious device check or bus check notify for
a hotplug device and in those cases we should avoid doing all of the
configuration work needed when something actually changes.  To that
end, check the return value of pci_scan_slot() in enable_slot() and
bail out early if it is 0.

This turns out to help reduce the amount of diagnostic output from
the ACPIPHP subsystem and speed up boot on at least one system that
generates multiple device check notifies for PCIe devices on the root
bus during boot.

Reported-and-tested-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/pci/hotplug/acpiphp_glue.c