@@ -227,6 +227,14 @@ static void msi_set_mask_bit(struct irq_data *data, u32 flag)
{
struct msi_desc *desc = irq_data_get_msi_desc(data);
+ /*
+ * Prevent non-posted IO to the device if it has been removed and is in
+ * the process of removal cleanup, in order to prevent unsupported
+ * requests or completer aborts or other issues.
+ */
+ if (pci_dev_is_disconnected(msi_desc_to_pci_dev(desc)))
+ return;
+
if (desc->msi_attrib.is_msix) {
msix_mask_irq(desc, flag);
readl(desc->mask_base); /* Flush write to device */
A removed device won't be able to accept mmio or config cycles setting or clearing MSI/X mask bits. Shortcut this path by preventing the writes and subsequent reads which may result in unsupported requests or completer abort. Signed-off-by: Jon Derrick <jonathan.derrick@intel.com> --- drivers/pci/msi.c | 8 ++++++++ 1 file changed, 8 insertions(+)