summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2014-10-21 01:48:19 +0000
committeryongari <yongari@FreeBSD.org>2014-10-21 01:48:19 +0000
commitb882f9e15fae9b0ac631910c92343f21c0fa6b72 (patch)
tree34fd935662daa1f0a608859ab3a9636fe431b983 /sys/dev/pci
parentb037cdf3edae39499298835319250b3abfab76c4 (diff)
downloadFreeBSD-src-b882f9e15fae9b0ac631910c92343f21c0fa6b72.zip
FreeBSD-src-b882f9e15fae9b0ac631910c92343f21c0fa6b72.tar.gz
MFC r272729,272732:
Add new quirk PCI_QUIRK_MSI_INTX_BUG to pci(4). QAC AR816x/E2200 controller has a silicon bug that MSI interrupt does not assert if PCIM_CMD_INTxDIS bit of command register is set.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/pci.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index a180006..93f3a4c 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -196,6 +196,7 @@ struct pci_quirk {
#define PCI_QUIRK_ENABLE_MSI_VM 3 /* Older chipset in VM where MSI works */
#define PCI_QUIRK_UNMAP_REG 4 /* Ignore PCI map register */
#define PCI_QUIRK_DISABLE_MSIX 5 /* MSI-X doesn't work */
+#define PCI_QUIRK_MSI_INTX_BUG 6 /* PCIM_CMD_INTxDIS disables MSI */
int arg1;
int arg2;
};
@@ -255,6 +256,15 @@ static const struct pci_quirk pci_quirks[] = {
*/
{ 0x43851002, PCI_QUIRK_UNMAP_REG, 0x14, 0 },
+ /*
+ * Atheros AR8161/AR8162/E2200 ethernet controller has a bug that
+ * MSI interrupt does not assert if PCIM_CMD_INTxDIS bit of the
+ * command register is set.
+ */
+ { 0x10911969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 },
+ { 0xE0911969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 },
+ { 0x10901969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 },
+
{ 0 }
};
@@ -3624,8 +3634,14 @@ pci_setup_intr(device_t dev, device_t child, struct resource *irq, int flags,
mte->mte_handlers++;
}
- /* Make sure that INTx is disabled if we are using MSI/MSIX */
- pci_set_command_bit(dev, child, PCIM_CMD_INTxDIS);
+ if (!pci_has_quirk(pci_get_devid(dev),
+ PCI_QUIRK_MSI_INTX_BUG)) {
+ /*
+ * Make sure that INTx is disabled 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,
OpenPOWER on IntegriCloud