Index: dev/pci/pci.c =================================================================== --- dev/pci/pci.c (revision 189044) +++ dev/pci/pci.c (working copy) @@ -2864,6 +2864,8 @@ } mte->mte_handlers++; } + /* Disable INTx if we are using MSI/MSIX */ + pci_set_command_bit(dev, child, PCIM_CMD_INTxDIS); bad: if (error) { (void)bus_generic_teardown_intr(dev, child, irq, @@ -2918,6 +2920,8 @@ if (mte->mte_handlers == 0) pci_mask_msix(child, rid - 1); } + /* Restore INTx capability for MSI/MSIX */ + pci_clear_command_bit(dev, child, PCIM_CMD_INTxDIS); } error = bus_generic_teardown_intr(dev, child, irq, cookie); if (device_get_parent(child) == dev && rid > 0) Index: dev/pci/pcireg.h =================================================================== --- dev/pci/pcireg.h (revision 189044) +++ dev/pci/pcireg.h (working copy) @@ -60,6 +60,7 @@ #define PCIM_CMD_PERRESPEN 0x0040 #define PCIM_CMD_SERRESPEN 0x0100 #define PCIM_CMD_BACKTOBACK 0x0200 +#define PCIM_CMD_INTxDIS 0x0400 #define PCIR_STATUS 0x06 #define PCIM_STATUS_CAPPRESENT 0x0010 #define PCIM_STATUS_66CAPABLE 0x0020