Chuck Ebbert wrote:
> Dave Jones wrote:
>> Gets my vote too.
>> I've turned off CONFIG_PCI_MSI and turned it back on about 2-3 times
>> now for FC5/FC6, because each time it starts to look more promising,
>> it seems to find new ways to regress.
>>
>> I might do a build next week in rawhide with it off again too,
>> to see if any oddball bugs fall out.
> 
> I was thinking of leaving MSI enabled and applying this patch.
> 

Ended up applying the attached patch.


Disable PCI MSI and MMCONFIG by default, add kernel parameters
to enable them.

Original mmconfig patch by Kyle McMartin <[EMAIL PROTECTED]>

Signed-off-by: Chuck Ebbert <[EMAIL PROTECTED]>

---
 Documentation/kernel-parameters.txt |    5 +++++
 arch/i386/pci/common.c              |    6 +++++-
 drivers/pci/msi.c                   |    6 +++++-
 drivers/pci/pci.c                   |    2 ++
 drivers/pci/pci.h                   |    2 ++
 5 files changed, 19 insertions(+), 2 deletions(-)

--- linux-2.6.20.noarch.orig/drivers/pci/msi.c
+++ linux-2.6.20.noarch/drivers/pci/msi.c
@@ -28,7 +28,7 @@ static DEFINE_SPINLOCK(msi_lock);
 static struct msi_desc* msi_desc[NR_IRQS] = { [0 ... NR_IRQS-1] = NULL };
 static struct kmem_cache* msi_cachep;
 
-static int pci_msi_enable = 1;
+static int pci_msi_enable = 0;
 
 static int msi_cache_init(void)
 {
@@ -977,6 +977,10 @@ void pci_no_msi(void)
 {
        pci_msi_enable = 0;
 }
+void pci_yes_msi(void)
+{
+       pci_msi_enable = 1;
+}
 
 EXPORT_SYMBOL(pci_enable_msi);
 EXPORT_SYMBOL(pci_disable_msi);
--- linux-2.6.20.noarch.orig/drivers/pci/pci.c
+++ linux-2.6.20.noarch/drivers/pci/pci.c
@@ -1168,6 +1168,8 @@ static int __devinit pci_setup(char *str
                if (*str && (str = pcibios_setup(str)) && *str) {
                        if (!strcmp(str, "nomsi")) {
                                pci_no_msi();
+                       } else if (!strcmp(str, "msi")) {
+                               pci_yes_msi();
                        } else {
                                printk(KERN_ERR "PCI: Unknown option `%s'\n",
                                                str);
--- linux-2.6.20.noarch.orig/Documentation/kernel-parameters.txt
+++ linux-2.6.20.noarch/Documentation/kernel-parameters.txt
@@ -1197,8 +1197,13 @@ and is between 256 and 4096 characters. 
                                Mechanism 1.
                conf2           [IA-32] Force use of PCI Configuration
                                Mechanism 2.
+               mmconf          [IA-32,X86_64] Enable use of MMCONFIG for PCI
+                               Configuration
                nommconf        [IA-32,X86_64] Disable use of MMCONFIG for PCI
                                Configuration
+               msi             [MSI] If the PCI_MSI kernel config parameter is
+                               enabled, this kernel boot option can be used to
+                               enable the use of MSI interrupts system-wide.
                nomsi           [MSI] If the PCI_MSI kernel config parameter is
                                enabled, this kernel boot option can be used to
                                disable the use of MSI interrupts system-wide.
--- linux-2.6.20.noarch.orig/arch/i386/pci/common.c
+++ linux-2.6.20.noarch/arch/i386/pci/common.c
@@ -18,7 +18,7 @@
 #include "pci.h"
 
 unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2 |
-                               PCI_PROBE_MMCONF;
+                               0; /* PCI_PROBE_MMCONF */
 
 static int pci_bf_sort;
 int pci_routeirq;
@@ -292,6 +292,10 @@ char * __devinit  pcibios_setup(char *st
                pci_probe &= ~PCI_PROBE_MMCONF;
                return NULL;
        }
+       else if (!strcmp(str, "mmconf")) {
+               pci_probe |= PCI_PROBE_MMCONF;
+               return NULL;
+       }
 #endif
        else if (!strcmp(str, "noacpi")) {
                acpi_noirq_set();
--- linux-2.6.20.noarch.orig/drivers/pci/pci.h
+++ linux-2.6.20.noarch/drivers/pci/pci.h
@@ -52,9 +52,11 @@ extern unsigned int pci_pm_d3_delay;
 #ifdef CONFIG_PCI_MSI
 void disable_msi_mode(struct pci_dev *dev, int pos, int type);
 void pci_no_msi(void);
+void pci_yes_msi(void);
 #else
 static inline void disable_msi_mode(struct pci_dev *dev, int pos, int type) { }
 static inline void pci_no_msi(void) { }
+static inline void pci_yes_msi(void) { }
 #endif
 #if defined(CONFIG_PCI_MSI) && defined(CONFIG_PM)
 int pci_save_msi_state(struct pci_dev *dev);
_______________________________________________
Fedora-kernel-list mailing list
Fedora-kernel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-kernel-list

Reply via email to