projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ddf9dc0
)
vfio-pci: Disable INTx after MSI/X teardown
author
Alex Williamson
<
[email protected]
>
Mon, 26 Sep 2016 19:52:19 +0000
(13:52 -0600)
committer
Alex Williamson
<
[email protected]
>
Mon, 26 Sep 2016 19:52:19 +0000
(13:52 -0600)
The MSI/X shutdown path can gratuitously enable INTx, which is not
something we want to happen if we're dealing with broken INTx device.
Signed-off-by: Alex Williamson <
[email protected]
>
drivers/vfio/pci/vfio_pci_intrs.c
patch
|
blob
|
history
diff --git
a/drivers/vfio/pci/vfio_pci_intrs.c
b/drivers/vfio/pci/vfio_pci_intrs.c
index 152b43822ef1912c980292f7927286e6df76656c..aa23e9a4a22fd8a16e766ce3428675785e955259 100644
(file)
--- a/
drivers/vfio/pci/vfio_pci_intrs.c
+++ b/
drivers/vfio/pci/vfio_pci_intrs.c
@@
-414,6
+414,13
@@
static void vfio_msi_disable(struct vfio_pci_device *vdev, bool msix)
} else
pci_disable_msi(pdev);
+ /*
+ * Both disable paths above use pci_intx_for_msi() to clear DisINTx
+ * via their shutdown paths. Restore for NoINTx devices.
+ */
+ if (vdev->nointx)
+ pci_intx(pdev, 0);
+
vdev->irq_type = VFIO_PCI_NUM_IRQS;
vdev->num_ctx = 0;
kfree(vdev->ctx);