Skip to content

PCI/hotplug: Fix interrupt / event handling problems

Ilpo Järvinen linux-pci lkml stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4PCI/hotplug: Disable HPIE over resetdrivers/pci/hotplug/pciehp_hpc.c+24 -43 replies
2/4PCI/hotplug: Clearing HPIE for the duration of reset is enoughdrivers/pci/hotplug/pciehp_hpc.c+1 -40 replies
3/4PCI/hotplug: reset_lock is not required synchronizing with irq threaddrivers/pci/hotplug/pciehp_hpc.c+0 -22 replies
4/4PCI/hotplug: Don't enabled HPIE in poll modedrivers/pci/hotplug/pciehp_hpc.c+3 -11 reply

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchLukas Wunner
1/4
2/4
3/4
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] PCI/hotplug: Fix interrupt / event handling problems

Hi all,

It was reported introducing bwctrl broke attaching a PCI device into VM. I tracked this down to problems in hotplug interrupt and event handling where hotplug code assumed all events are for it without proper checking. As a result, the extra interrupts that occurred due to bwctrl caused hotplug pick events during slot reset due to shared irq and eventually hotplug unconfigured the card spuriously.

This series fixes the hotplug slot reset so that no hotplug events can be picked up during slot reset which was the original intention of the reset code but it failed to synchronize its intention with the interrupt and event handling.

I've intentionally split the three patches because to be careful and allow bisect to detect if the two follow up changes make assumptions that do not hold water, but logically they belong to the same single change altering the synchronization between the reset slot and hotplug event handling. It should be technically possible to fold them into the same change, but I feel there are benefits of keeping them as separate so bisect can see them as separate changes.

The fourth patch fixes an oversight I found while reading the HPIE related code and is unrelated to the other three patches.

As there were small changes into the first patch since Joel's test to address Lukas' comments in the bugzilla thread. I'd prefer him to test it again, just in case, so I dropped the tested-by tag until that happens.

Ilpo Järvinen (4):
PCI/hotplug: Disable HPIE over reset
PCI/hotplug: Clearing HPIE for the duration of reset is enough PCI/hotplug: reset_lock is not required synchronizing with irq thread PCI/hotplug: Don't enabled HPIE in poll mode

 drivers/pci/hotplug/pciehp_hpc.c | 39 +++++++++++++++++++++++---------
 1 file changed, 28 insertions(+), 11 deletions(-)

base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b

Signature · 1 line
2.39.5