]> git.baikalelectronics.ru Git - kernel.git/commit
PCI/LINK: Supply IRQ handler so level-triggered IRQs are acked
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>
Sat, 23 Mar 2019 00:36:51 +0000 (19:36 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 25 Mar 2019 22:58:50 +0000 (17:58 -0500)
commit95bb60d6bffdb499e3ad13af9d7fb37263c65084
tree9577657dc21dde77eb92b9e96d5e3e99f8ebec72
parent805099b2fb57eba3d69bc38aeb447dfe76b0ebb9
PCI/LINK: Supply IRQ handler so level-triggered IRQs are acked

A threaded IRQ with a NULL handler does not work with level-triggered
interrupts.  request_threaded_irq() will return an error:

  genirq: Threaded irq requested with handler=NULL and !ONESHOT for irq 16
  pcie_bw_notification: probe of 0000:00:1b.0:pcie010 failed with error -22

For level interrupts we need to silence the interrupt before exiting the
IRQ handler, so just clear the PCI_EXP_LNKSTA_LBMS bit there.

Fixes: c82c298fe1dc ("PCI/LINK: Report degraded links via link bandwidth notification")
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Reported-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pcie/bw_notification.c