From 2cc31879f8cfa0efc74fe7e58ab4e01ef5908730 Mon Sep 17 00:00:00 2001 From: David Miller Date: Thu, 25 Oct 2007 01:15:24 -0700 Subject: PCI: Revert "PCI: disable MSI by default on systems with Serverworks HT1000 chips" This reverts commit e3008dedff4bdc96a5f67224cd3d8d12237082a0. The real bug was an INTX issue in the tg3 ethernet chip, and cured by commit c129d962a66c76964954a98b38586ada82cf9381 Signed-off-by: David S. Miller Acked-by: Jeff Garzik Signed-off-by: Greg Kroah-Hartman --- include/linux/pci_ids.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index e44aac8cf5ff..ab6edec13f68 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -1437,7 +1437,6 @@ #define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009 #define PCI_DEVICE_ID_SERVERWORKS_GCNB_LE 0x0017 #define PCI_DEVICE_ID_SERVERWORKS_EPB 0x0103 -#define PCI_DEVICE_ID_SERVERWORKS_HT1000_PCIX 0x0104 #define PCI_DEVICE_ID_SERVERWORKS_HT2000_PCIE 0x0132 #define PCI_DEVICE_ID_SERVERWORKS_OSB4 0x0200 #define PCI_DEVICE_ID_SERVERWORKS_CSB5 0x0201 -- cgit v1.2.3 From 1d84b5424efbcce69a1c955ba181147d23d43a14 Mon Sep 17 00:00:00 2001 From: David Miller Date: Thu, 25 Oct 2007 01:15:53 -0700 Subject: PCI: Add MSI quirk for ServerWorks HT1000 PCIX bridge. This is the fix for the following problem: https://bugzilla.redhat.com/show_bug.cgi?id=227657 The bnx2 device 5706 complains about MSI not working behind a ServerWorks HT1000 PCIX bridge. An earlier commit to fix the problem: e3008dedff4bdc96a5f67224cd3d8d12237082a0: "PCI: disable MSI by default on systems with Serverworks HT1000 chips" was not entirely correct, and has been reverted. MSI does not work on the PCIX bus because the BIOS did not set the HT_MSI_FLAGS_ENABLE bit in the HyperTransport MSI capability on the bridge. We use the existing quirk_msi_ht_cap() to detect the problem and disable MSI in all buses behind it. Signed-off-by: Michael Chan Cc: Anantha Subramanyam Cc: Naren Sankar Signed-off-by: David S. Miller Acked-by: Jeff Garzik Signed-off-by: Greg Kroah-Hartman --- include/linux/pci_ids.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index ab6edec13f68..7a347dcad06e 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -1436,6 +1436,7 @@ #define PCI_DEVICE_ID_SERVERWORKS_HE 0x0008 #define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009 #define PCI_DEVICE_ID_SERVERWORKS_GCNB_LE 0x0017 +#define PCI_DEVICE_ID_SERVERWORKS_HT1000_PXB 0x0036 #define PCI_DEVICE_ID_SERVERWORKS_EPB 0x0103 #define PCI_DEVICE_ID_SERVERWORKS_HT2000_PCIE 0x0132 #define PCI_DEVICE_ID_SERVERWORKS_OSB4 0x0200 -- cgit v1.2.3 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 From 5257dca0bdc36027a4bfc1002264bd465e86ab7a Mon Sep 17 00:00:00 2001 From: David Miller Date: Thu, 25 Oct 2007 01:17:16 -0700 Subject: PCI: Remove 3 incorrect MSI quirks. Now that we have dealt with the real issue, in that some ATI SATA and USB controllers needed the INTX_DISABLE quirk, we can remove these AMD chipset global MSI disabling quirks. This reverts three changesets: 4be8f906435a6af241821ab5b94b2b12cb7d57d8 (PCI: disable MSI on RS690) aea6a433f50cd89b9cbd10850fd0b32f961f9883 (PCI: disable MSI on RD580) f122392f679ebed39db08074f935d770504623eb (PCI: disable MSI on RX790) This is based upon testing and feedback from Shane Huang . Cc: Shane Huang Signed-off-by: David S. Miller Acked-by: Jeff Garzik Signed-off-by: Greg Kroah-Hartman --- include/linux/pci_ids.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include') diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 7a347dcad06e..fbe19648bf91 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -360,9 +360,6 @@ #define PCI_DEVICE_ID_ATI_RS400_166 0x5a32 #define PCI_DEVICE_ID_ATI_RS400_200 0x5a33 #define PCI_DEVICE_ID_ATI_RS480 0x5950 -#define PCI_DEVICE_ID_ATI_RD580 0x5952 -#define PCI_DEVICE_ID_ATI_RX790 0x5957 -#define PCI_DEVICE_ID_ATI_RS690 0x7910 /* ATI IXP Chipset */ #define PCI_DEVICE_ID_ATI_IXP200_IDE 0x4349 #define PCI_DEVICE_ID_ATI_IXP200_SMBUS 0x4353 -- cgit v1.2.3 From d73460d79bc88de74221d73723ed61a0081b7a36 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Wed, 24 Oct 2007 18:27:18 +0200 Subject: PCI: make pci_match_device() static pci_match_device() no longer has any other users. Signed-off-by: Adrian Bunk Signed-off-by: Greg Kroah-Hartman --- include/linux/pci.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include') diff --git a/include/linux/pci.h b/include/linux/pci.h index 7c04f38e6ac3..5b23ec7f6cd9 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -631,7 +631,6 @@ static inline int __must_check pci_register_driver(struct pci_driver *driver) void pci_unregister_driver(struct pci_driver *); void pci_remove_behind_bridge(struct pci_dev *); struct pci_driver *pci_dev_driver(const struct pci_dev *); -const struct pci_device_id *pci_match_device(struct pci_driver *drv, struct pci_dev *dev); const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, struct pci_dev *dev); int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass); @@ -760,7 +759,6 @@ static inline void pci_unregister_driver(struct pci_driver *drv) { } static inline int pci_find_capability (struct pci_dev *dev, int cap) {return 0; } static inline int pci_find_next_capability (struct pci_dev *dev, u8 post, int cap) { return 0; } static inline int pci_find_ext_capability (struct pci_dev *dev, int cap) {return 0; } -static inline const struct pci_device_id *pci_match_device(const struct pci_device_id *ids, const struct pci_dev *dev) { return NULL; } /* Power management related routines */ static inline int pci_save_state(struct pci_dev *dev) { return 0; } -- cgit v1.2.3 From bd3989e006ed1c88d47c3308746ae0330fc1bcf4 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Mon, 29 Oct 2007 09:48:09 -0400 Subject: PCI: Add Kconfig option to disable deprecated pci_find_* API Signed-off-by: Jeff Garzik Signed-off-by: Greg Kroah-Hartman --- include/linux/pci.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/linux/pci.h b/include/linux/pci.h index 5b23ec7f6cd9..0dd93bb62fbe 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -488,8 +488,11 @@ extern void pci_sort_breadthfirst(void); /* Generic PCI functions exported to card drivers */ +#ifdef CONFIG_PCI_LEGACY struct pci_dev __deprecated *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from); struct pci_dev __deprecated *pci_find_slot (unsigned int bus, unsigned int devfn); +#endif /* CONFIG_PCI_LEGACY */ + int pci_find_capability (struct pci_dev *dev, int cap); int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); int pci_find_ext_capability (struct pci_dev *dev, int cap); -- cgit v1.2.3