linux/drivers/pci/hotplug
Yinghai Lu d433889cd5 PCI: pciehp: Fix wait time in timeout message
When we warned about a timeout on a hotplug command, we previously printed
the time between calls to pcie_write_cmd(), without accounting for any time
spent actually waiting.  Consider this sequence:

  pcie_write_cmd
    write SLTCTL
    cmd_started = jiffies          # T1

  pcie_write_cmd
    pcie_wait_cmd
      now = jiffies                # T2
      wait_event_timeout           # we may wait here
      if (timeout)
        ctrl_info("Timeout on command issued %u msec ago",
                  jiffies_to_msecs(now - cmd_started))

We previously printed (T2 - T1), but that doesn't include the time spent in
wait_event_timeout().

Fix this by using the current jiffies value, not the one cached before
calling wait_event_timeout().

[bhelgaas: changelog, use current jiffies instead of adding timeout]
Fixes: 40b960831c ("PCI: pciehp: Compute timeout from hotplug command start time")
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2014-09-23 10:03:54 -06:00
..
Kconfig PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
Makefile PCI: Move pci_configure_slot() to drivers/pci/probe.c 2014-09-12 20:02:00 -06:00
acpi_pcihp.c PCI: Move pci_get_hp_params() to drivers/pci/pci-acpi.c 2014-09-12 20:01:27 -06:00
acpiphp.h ACPI / hotplug / PCI: Add hotplug contexts to PCI host bridges 2014-06-11 21:08:49 +02: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 ACPI / hotplug / PCI: Remove pci_configure_slot() usage 2014-09-12 20:09:50 -06:00
acpiphp_ibm.c ACPI: Clean up inclusions of ACPI header files 2013-12-07 01:03:14 +01:00
cpci_hotplug.h PCI: Whitespace cleanup 2014-06-10 20:20:19 -06: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
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.h PCI: Whitespace cleanup 2014-06-10 20:20:19 -06: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: cpqphp: Remove unnecessary null test before debugfs_remove() 2014-07-07 14:53:44 -06:00
ibmphp.h PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07: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
pci_hotplug_core.c PCI: Merge multi-line quoted strings 2014-06-10 20:20:42 -06:00
pciehp.h PCI: pciehp: Reduce PCIe slot_ctrl to 16 bits 2014-09-12 20:12:29 -06:00
pciehp_acpi.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
pciehp_core.c PCI: pciehp: Prevent NULL dereference during probe 2014-09-16 15:16:02 -06:00
pciehp_ctrl.c PCI: Merge multi-line quoted strings 2014-06-10 20:20:42 -06:00
pciehp_hpc.c PCI: pciehp: Fix wait time in timeout message 2014-09-23 10:03:54 -06:00
pciehp_pci.c PCI: pciehp: Remove pci_configure_slot() usage 2014-09-12 20:09:47 -06:00
pcihp_skeleton.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
rpadlpar.h PCI: Remove "extern" from function declarations 2013-04-17 10:21:17 -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
rpaphp.h PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
rpaphp_core.c of: Migrate of_find_node_by_name() users to for_each_node_by_name() 2014-06-26 17:12:24 +01: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
s390_pci_hpc.c s390/pci: fix kmsg component 2014-07-22 09:26:21 +02:00
sgi_hotplug.c PCI: Merge multi-line quoted strings 2014-06-10 20:20:42 -06:00
shpchp.h PCI: Whitespace cleanup 2014-06-10 20:20:19 -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: shpchp: Remove pci_configure_slot() usage 2014-09-12 20:09:49 -06:00
shpchp_sysfs.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00