]> 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)
commit9b2b638ab7f40c891a5c1b3861f0c9cabdb3674e
treed729a71585394de0ebe2d952ad8f72e8b01adcda
parent1e9865da56d39bf3211d803676d051d9bcfaca0b
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