Messages in this thread Patch in this message | | | Date | Sun, 18 Jun 2006 21:09:34 -0400 | From | Brice Goglin <> | Subject | [PATCH 6/8] Disable MSI by default on non-PCI-E chipset |
| |
[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 <brice@myri.com> --- 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |