]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: pciehp: Handle events synchronously
authorLukas Wunner <lukas@wunner.de>
Thu, 19 Jul 2018 22:27:41 +0000 (17:27 -0500)
committerBjorn Helgaas <helgaas@kernel.org>
Mon, 23 Jul 2018 22:04:12 +0000 (17:04 -0500)
commit519e03dad154b01769396719ad05c5a171fb21a3
treed729a71585394de0ebe2d952ad8f72e8b01adcda
parentf25668c75e38b6fd38bdc707c3ca85217bd42867
PCI: pciehp: Handle events synchronously

Up until now, pciehp's IRQ handler schedules a work item for each event,
which in turn schedules a work item to enable or disable the slot.  This
double indirection was necessary because sleeping wasn't allowed in the
IRQ handler.

However it is now that pciehp has been converted to threaded IRQ handling
and polling, so handle events synchronously in pciehp_ist() and remove
the work item infrastructure (with the exception of work items to handle
a button press after the 5 second delay).

For link or presence change events, move the register read to determine
the current link or presence state behind acquisition of the slot lock
to prevent it from becoming stale while the lock is contended.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/hotplug/pciehp.h
drivers/pci/hotplug/pciehp_ctrl.c
drivers/pci/hotplug/pciehp_hpc.c