linux_dsm_epyc7002/drivers/pci/hotplug
Mika Westerberg 499022396a PCI: pciehp: Fix race condition handling surprise link down
A surprise link down may retrain very quickly causing the same slot
generate a link up event before handling the link down event completes.

Since the link is active, the power off work queued from the first link
down will cause a second down event when power is disabled. However, the
link up event sets the slot state to POWERON_STATE before the event to
handle this is enqueued, making the second down event believe it needs to
do something.

This creates constant link up and down event cycle.

To prevent this it is better to handle each event at the time in order it
occurred, so change the driver to use ordered workqueue instead.

A normal device hotplug triggers two events (presense detect and link up)
that are already handled properly in the driver but we currently log an
error if we find an existing device in the slot. Since this is not an error
change the log level to be debug instead to avoid scaring users.

This is based on the original work by Ashok Raj.

Link: https://patchwork.kernel.org/patch/9469023
Suggested-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2017-11-06 18:49:00 -06:00
..
acpi_pcihp.c PCI: Fix all whitespace issues 2016-01-08 10:35:24 -06:00
acpiphp_core.c PCI: Fix all whitespace issues 2016-01-08 10:35:24 -06:00
acpiphp_glue.c PCI: Add for_each_pci_bridge() helper 2017-11-06 18:48:58 -06:00
acpiphp_ibm.c PCI: acpiphp_ibm: Make ibm_apci_table_attr __ro_after_init 2017-01-11 14:56:02 -06:00
acpiphp.h PCI: Fix all whitespace issues 2016-01-08 10:35:24 -06:00
cpci_hotplug_core.c sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
cpci_hotplug_pci.c PCI: Add for_each_pci_bridge() helper 2017-11-06 18:48:58 -06:00
cpci_hotplug.h PCI: hotplug: Make core explicitly non-modular 2016-08-24 17:20:14 -05:00
cpcihp_generic.c Annotate hardware config module parameters in drivers/pci/hotplug/ 2017-04-20 12:02:32 +01:00
cpcihp_zt5550.c PCI: Constify hotplug pci_device_id structures 2017-08-10 15:21:42 -05:00
cpcihp_zt5550.h PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
cpqphp_core.c PCI: cpqphp: Convert timers to use timer_setup() 2017-11-06 18:48:57 -06:00
cpqphp_ctrl.c PCI: cpqphp: Convert timers to use timer_setup() 2017-11-06 18:48:57 -06:00
cpqphp_nvram.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
cpqphp_nvram.h PCI: Remove "extern" from function declarations 2013-04-17 10:21:17 -06:00
cpqphp_pci.c PCI: Fix all whitespace issues 2016-01-08 10:35:24 -06:00
cpqphp_sysfs.c PCI: Fix all whitespace issues 2016-01-08 10:35:24 -06:00
cpqphp.h PCI: cpqphp: Convert timers to use timer_setup() 2017-11-06 18:48:57 -06:00
ibmphp_core.c PCI: Constify hotplug pci_device_id structures 2017-08-10 15:21:42 -05:00
ibmphp_ebda.c PCI: Constify hotplug pci_device_id structures 2017-08-10 15:21:42 -05:00
ibmphp_hpc.c Merge branch 'pci/trivial' into next 2016-01-20 11:48:25 -06:00
ibmphp_pci.c PCI: ibmphp: Use common error handling code in unconfigure_boot_device() 2017-11-06 18:47:15 -06:00
ibmphp_res.c Merge branch 'pci/trivial' into next 2016-01-20 11:48:25 -06:00
ibmphp.h PCI: Fix all whitespace issues 2016-01-08 10:35:24 -06:00
Kconfig PCI/hotplug: PowerPC PowerNV PCI hotplug driver 2016-06-21 15:30:58 +10:00
Makefile PCI/hotplug: PowerPC PowerNV PCI hotplug driver 2016-06-21 15:30:58 +10:00
pci_hotplug_core.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
pciehp_core.c PCI: pciehp: Remove loading message 2016-12-12 10:05:24 -06:00
pciehp_ctrl.c PCI: pciehp: Fix race condition handling surprise link down 2017-11-06 18:49:00 -06:00
pciehp_hpc.c PCI: pciehp: Fix race condition handling surprise link down 2017-11-06 18:49:00 -06:00
pciehp_pci.c PCI: pciehp: Fix race condition handling surprise link down 2017-11-06 18:49:00 -06:00
pciehp.h sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
pcihp_skeleton.c Merge branch 'pci/trivial' into next 2016-01-20 11:48:25 -06:00
pnv_php.c PCI: Convert to using %pOF instead of full_name() 2017-08-24 11:24:59 -05:00
rpadlpar_core.c PCI: Convert to using %pOF instead of full_name() 2017-08-24 11:24:59 -05:00
rpadlpar_sysfs.c PCI: Constify hotplug attribute_group structures 2017-08-10 15:21:41 -05:00
rpadlpar.h PCI: Remove "extern" from function declarations 2013-04-17 10:21:17 -06:00
rpaphp_core.c PCI: Convert to using %pOF instead of full_name() 2017-08-24 11:24:59 -05:00
rpaphp_pci.c PCI: Convert to using %pOF instead of full_name() 2017-08-24 11:24:59 -05:00
rpaphp_slot.c PCI: Convert to using %pOF instead of full_name() 2017-08-24 11:24:59 -05:00
rpaphp.h PCI: Fix all whitespace issues 2016-01-08 10:35:24 -06:00
s390_pci_hpc.c s390: hotplug: make pci_hpc explicitly non-modular 2016-10-31 17:55:44 +01:00
sgi_hotplug.c PCI: Fix all whitespace issues 2016-01-08 10:35:24 -06:00
shpchp_core.c PCI: Constify hotplug pci_device_id structures 2017-08-10 15:21:42 -05:00
shpchp_ctrl.c PCI: Remove assignment from "if" conditions 2014-09-24 07:50:53 -06:00
shpchp_hpc.c PCI: shpchp: Convert timers to use timer_setup() 2017-11-06 18:48:57 -06:00
shpchp_pci.c PCI: Add for_each_pci_bridge() helper 2017-11-06 18:48:58 -06:00
shpchp_sysfs.c PCI: Use to_pci_dev() instead of open-coding it 2016-01-08 12:05:39 -06:00
shpchp.h sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00