From ba698ad4b7e466cbb4a8bde6b9da8080ab06808d Mon Sep 17 00:00:00 2001 From: David Miller Date: Thu, 25 Oct 2007 01:16:30 -0700 Subject: PCI: Add quirk for devices which disable MSI when INTX_DISABLE is set. A reasonably common problem with some devices is that they will disable MSI generation when the INTX_DISABLE bit is set in the PCI_COMMAND register. Quirk this explicitly, guarding the pci_intx() calls in msi.c with this quirk indication. The first entries for this quirk are for 5714 and 5780 Tigon3 chips, and thus we can remove the workaround code from the tg3.c driver. Signed-off-by: David S. Miller Acked-by: Michael Chan Acked-by: Jeff Garzik Signed-off-by: Greg Kroah-Hartman --- include/linux/pci.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/linux/pci.h b/include/linux/pci.h index 5d2281f661f7..7c04f38e6ac3 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -109,6 +109,14 @@ enum pcie_reset_state { pcie_hot_reset = (__force pcie_reset_state_t) 3 }; +typedef unsigned short __bitwise pci_dev_flags_t; +enum pci_dev_flags { + /* INTX_DISABLE in PCI_COMMAND register disables MSI + * generation too. + */ + PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG = (__force pci_dev_flags_t) 1, +}; + typedef unsigned short __bitwise pci_bus_flags_t; enum pci_bus_flags { PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1, @@ -185,6 +193,7 @@ struct pci_dev { unsigned int msix_enabled:1; unsigned int is_managed:1; unsigned int is_pcie:1; + pci_dev_flags_t dev_flags; atomic_t enable_cnt; /* pci_enable_device has been called */ u32 saved_config_space[16]; /* config space saved at suspend time */ -- cgit v1.2.3