[PATCH 6/8] Disable MSI by default on non-PCI-E chipset
Most PCI-E chipsets support MSI while several non-PCI-E don't.
Disable MSI when the associated root chipset is not a PCI-E one
and does not have the PCI_BUS_FLAGS_MSI flag.
On PCI-E chipset, MSI are enabled unless PCI_BUS_FLAGS_NO_MSI
is not set.
Signed-off-by: Brice Goglin <[email protected]>
---
drivers/pci/msi.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
Index: linux-mm/drivers/pci/msi.c
===================================================================
--- linux-mm.orig/drivers/pci/msi.c 2006-06-17 23:07:43.000000000 -0400
+++ linux-mm/drivers/pci/msi.c 2006-06-17 23:11:00.000000000 -0400
@@ -921,11 +921,17 @@
while (pdev->bus && pdev->bus->self)
pdev = pdev->bus->self;
- /* check its bus flags */
- if (pdev->subordinate->bus_flags & PCI_BUS_FLAGS_NO_MSI)
+ if (pci_find_capability(pdev, PCI_CAP_ID_EXP)) {
+ /* PCI Express bridge, enable MSI, except when blacklisted */
+ if (pdev->subordinate->bus_flags & PCI_BUS_FLAGS_NO_MSI)
+ return -1;
+ return 0;
+ } else {
+ /* non PCI Express, disable MSI, except when whitelisted */
+ if (pdev->subordinate->bus_flags & PCI_BUS_FLAGS_MSI)
+ return 0;
return -1;
-
- return 0;
+ }
}
/**
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]