]> Pileus Git - ~andy/linux/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)
commit2dc41281b1d1178befe4b76adf817570a7f45ec1
treec580ce223a214fde6972bdb5b9778f7e72c72258
parent89ec2f2ee104970329139e6526a075113c92f650
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