aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2007-01-25 03:34:07 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2007-02-07 18:50:06 -0500
commit88187dfa4d8bb565df762f272511d2c91e427e0d (patch)
tree451f53265c52ea50bcb43bb4e5854fe9c3359182 /drivers/pci
parent89298c7a41e71ecb1e0c3f793655e9ce09662ce0 (diff)
MSI: Replace pci_msi_quirk with calls to pci_no_msi()
I don't see any reason why we need pci_msi_quirk, quirk code can just call pci_no_msi() instead. Remove the check of pci_msi_quirk in msi_init(). This is safe as all calls to msi_init() are protected by calls to pci_msi_supported(), which checks pci_msi_enable, which is disabled by pci_no_msi(). The pci_disable_msi routines didn't check pci_msi_quirk, only pci_msi_enable, but as far as I can see that was a bug not a feature. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/msi.c7
-rw-r--r--drivers/pci/pci.h6
-rw-r--r--drivers/pci/quirks.c7
3 files changed, 3 insertions, 17 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index e87e8efb9bb4..3776531586d1 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -170,13 +170,6 @@ static int msi_init(void)
170 if (!status) 170 if (!status)
171 return status; 171 return status;
172 172
173 if (pci_msi_quirk) {
174 pci_msi_enable = 0;
175 printk(KERN_WARNING "PCI: MSI quirk detected. MSI disabled.\n");
176 status = -EINVAL;
177 return status;
178 }
179
180 status = msi_cache_init(); 173 status = msi_cache_init();
181 if (status < 0) { 174 if (status < 0) {
182 pci_msi_enable = 0; 175 pci_msi_enable = 0;
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index 783e81f81f58..4948db0f8100 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -43,12 +43,8 @@ extern void pci_remove_legacy_files(struct pci_bus *bus);
43/* Lock for read/write access to pci device and bus lists */ 43/* Lock for read/write access to pci device and bus lists */
44extern struct rw_semaphore pci_bus_sem; 44extern struct rw_semaphore pci_bus_sem;
45 45
46#ifdef CONFIG_PCI_MSI
47extern int pci_msi_quirk;
48#else
49#define pci_msi_quirk 0
50#endif
51extern unsigned int pci_pm_d3_delay; 46extern unsigned int pci_pm_d3_delay;
47
52#ifdef CONFIG_PCI_MSI 48#ifdef CONFIG_PCI_MSI
53void disable_msi_mode(struct pci_dev *dev, int pos, int type); 49void disable_msi_mode(struct pci_dev *dev, int pos, int type);
54void pci_no_msi(void); 50void pci_no_msi(void);
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index d0c359335077..0d0ba2fad5fc 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1700,9 +1700,6 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_PCIE,
1700 quirk_nvidia_ck804_pcie_aer_ext_cap); 1700 quirk_nvidia_ck804_pcie_aer_ext_cap);
1701 1701
1702#ifdef CONFIG_PCI_MSI 1702#ifdef CONFIG_PCI_MSI
1703/* To disable MSI globally */
1704int pci_msi_quirk;
1705
1706/* The Serverworks PCI-X chipset does not support MSI. We cannot easily rely 1703/* The Serverworks PCI-X chipset does not support MSI. We cannot easily rely
1707 * on setting PCI_BUS_FLAGS_NO_MSI in its bus flags because there are actually 1704 * on setting PCI_BUS_FLAGS_NO_MSI in its bus flags because there are actually
1708 * some other busses controlled by the chipset even if Linux is not aware of it. 1705 * some other busses controlled by the chipset even if Linux is not aware of it.
@@ -1711,8 +1708,8 @@ int pci_msi_quirk;
1711 */ 1708 */
1712static void __init quirk_svw_msi(struct pci_dev *dev) 1709static void __init quirk_svw_msi(struct pci_dev *dev)
1713{ 1710{
1714 pci_msi_quirk = 1; 1711 pci_no_msi();
1715 printk(KERN_WARNING "PCI: MSI quirk detected. pci_msi_quirk set.\n"); 1712 printk(KERN_WARNING "PCI: MSI quirk detected. MSI deactivated.\n");
1716} 1713}
1717DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_GCNB_LE, quirk_svw_msi); 1714DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_GCNB_LE, quirk_svw_msi);
1718 1715