]> 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)
commitda003b8d549cb029bd5f5151b299640dbc692e4b
treec580ce223a214fde6972bdb5b9778f7e72c72258
parentcbc797269f1345577ebd9c2ee5218940a2d1130d
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