linux/drivers/pci/hotplug
Bjorn Helgaas 40b960831c PCI: pciehp: Compute timeout from hotplug command start time
If we issue a hotplug command, go do something else, then come back and
wait for the command to complete, we don't have to wait the whole timeout
period, because some of it elapsed while we were doing something else.

Keep track of the time we issued the command, and wait only until the
timeout period from that point has elapsed.

For controllers with errata like Intel CF118, we previously timed out
before issuing the second hotplug command:

  At time T1 (during boot):
    - Write DLLSCE, ABPE, PDCE, etc. to Slot Control
  At time T2 (hotplug event):
    - Wait for command completion (CC) in Slot Status
    - Timeout at T2 + 1 second because CC is never set in Slot Status
    - Write PCC, PIC, etc. to Slot Control

With this change, we wait until T1 + 1 second instead of T2 + 1 second.
If the hotplug event is more than 1 second after the boot-time
initialization, we won't wait for the timeout at all.

We still emit a "Timeout on hotplug command" message if it timed out; we
should see this on the first hotplug event on every controller with this
erratum, as well as on real errors on controllers without the erratum.

Link: http://www.intel.com/content/www/us/en/processors/xeon/xeon-e7-v2-spec-update.html
Tested-by: Rajat Jain <rajatxjain@gmail.com>	(IDT 807a controller)
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
2014-06-17 15:26:11 -06:00
..
acpi_pcihp.c ACPI: Eliminate the DEVICE_ACPI_HANDLE() macro 2013-11-14 23:17:21 +01:00
acpiphp_core.c PCI: Move EXPORT_SYMBOL so it immediately follows function/variable 2014-06-10 13:36:10 -06:00
acpiphp_glue.c PCI changes for the v3.16 merge window (part 2): 2014-06-12 13:20:24 -07:00
acpiphp_ibm.c ACPI: Clean up inclusions of ACPI header files 2013-12-07 01:03:14 +01:00
acpiphp.h ACPI / hotplug / PCI: Add hotplug contexts to PCI host bridges 2014-06-11 21:08:49 +02:00
cpci_hotplug_core.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
cpci_hotplug_pci.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
cpci_hotplug.h PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
cpcihp_generic.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
cpcihp_zt5550.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
cpcihp_zt5550.h PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
cpqphp_core.c PCI: Merge multi-line quoted strings 2014-06-10 20:20:42 -06:00
cpqphp_ctrl.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
cpqphp_nvram.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
cpqphp_nvram.h PCI: Remove "extern" from function declarations 2013-04-17 10:21:17 -06:00
cpqphp_pci.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
cpqphp_sysfs.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
cpqphp.h PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
ibmphp_core.c PCI: Merge multi-line quoted strings 2014-06-10 20:20:42 -06:00
ibmphp_ebda.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
ibmphp_hpc.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
ibmphp_pci.c PCI: Merge multi-line quoted strings 2014-06-10 20:20:42 -06:00
ibmphp_res.c PCI: Merge multi-line quoted strings 2014-06-10 20:20:42 -06:00
ibmphp.h PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
Kconfig PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
Makefile PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
pci_hotplug_core.c PCI: Merge multi-line quoted strings 2014-06-10 20:20:42 -06:00
pciehp_acpi.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
pciehp_core.c PCI: Prevent NULL dereference during pciehp probe 2014-06-16 11:47:37 -06:00
pciehp_ctrl.c PCI: Merge multi-line quoted strings 2014-06-10 20:20:42 -06:00
pciehp_hpc.c PCI: pciehp: Compute timeout from hotplug command start time 2014-06-17 15:26:11 -06:00
pciehp_pci.c PCI: Merge multi-line quoted strings 2014-06-10 20:20:42 -06:00
pciehp.h PCI: pciehp: Compute timeout from hotplug command start time 2014-06-17 15:26:11 -06:00
pcihp_skeleton.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
pcihp_slot.c PCI: hotplug: Remove unnecessary "dev->bus" test 2014-04-14 16:06:30 -06:00
rpadlpar_core.c PCI: rpaphp: Use pci_is_bridge() to simplify code 2014-05-27 14:57:55 -06:00
rpadlpar_sysfs.c PCI: introduce pci_slot 2008-06-10 14:37:03 -07:00
rpadlpar.h PCI: Remove "extern" from function declarations 2013-04-17 10:21:17 -06:00
rpaphp_core.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
rpaphp_pci.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
rpaphp_slot.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
rpaphp.h PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
s390_pci_hpc.c PCI: Remove unnecessary includes of <linux/init.h> 2014-04-14 16:12:37 -06:00
sgi_hotplug.c PCI: Merge multi-line quoted strings 2014-06-10 20:20:42 -06:00
shpchp_core.c PCI: Merge multi-line quoted strings 2014-06-10 20:20:42 -06:00
shpchp_ctrl.c PCI changes for the v3.16 merge window (part 2): 2014-06-12 13:20:24 -07:00
shpchp_hpc.c PCI: Merge multi-line quoted strings 2014-06-10 20:20:42 -06:00
shpchp_pci.c PCI: Merge multi-line quoted strings 2014-06-10 20:20:42 -06:00
shpchp_sysfs.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
shpchp.h PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00