rpms/kernel/FC-6 linux-2.6-default_pci_no_msi.patch, NONE, 1.1 kernel-2.6.spec, 1.3001, 1.3002

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Thu Aug 9 20:36:24 UTC 2007


Author: cebbert

Update of /cvs/dist/rpms/kernel/FC-6
In directory cvs.devel.redhat.com:/tmp/cvs-serv29934

Modified Files:
	kernel-2.6.spec 
Added Files:
	linux-2.6-default_pci_no_msi.patch 
Log Message:
* Thu Aug 09 2007 Chuck Ebbert <cebbert at redhat.com>
- disable PCI MSI by default


linux-2.6-default_pci_no_msi.patch:
 Documentation/kernel-parameters.txt |    3 +++
 drivers/pci/msi.c                   |   12 +++++++++++-
 drivers/pci/pci.c                   |   10 ++++++++++
 drivers/pci/pci.h                   |    4 ++++
 4 files changed, 28 insertions(+), 1 deletion(-)

--- NEW FILE linux-2.6-default_pci_no_msi.patch ---
---
 Documentation/kernel-parameters.txt |    3 +++
 drivers/pci/msi.c                   |   12 +++++++++++-
 drivers/pci/pci.c                   |   10 ++++++++++
 drivers/pci/pci.h                   |    4 ++++
 4 files changed, 28 insertions(+), 1 deletion(-)

--- linux-2.6.22.noarch.orig/Documentation/kernel-parameters.txt
+++ linux-2.6.22.noarch/Documentation/kernel-parameters.txt
@@ -1276,6 +1276,9 @@ and is between 256 and 4096 characters. 
 		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.
+		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.
 		nosort		[IA-32] Don't sort PCI devices according to
 				order given by the PCI BIOS. This sorting is
 				done to get a device order compatible with
--- linux-2.6.22.noarch.orig/drivers/pci/msi.c
+++ linux-2.6.22.noarch/drivers/pci/msi.c
@@ -23,7 +23,7 @@
 #include "pci.h"
 #include "msi.h"
 
-static int pci_msi_enable = 1;
+static int pci_msi_enable = 0;
 
 static void msi_set_enable(struct pci_dev *dev, int enable)
 {
@@ -673,6 +673,16 @@ void pci_no_msi(void)
 	pci_msi_enable = 0;
 }
 
+void pci_yes_msi(void)
+{
+	pci_msi_enable = 1;
+}
+
+int pci_msi_enabled(void)
+{
+	return pci_msi_enable;
+}
+
 void pci_msi_init_pci_dev(struct pci_dev *dev)
 {
 	INIT_LIST_HEAD(&dev->msi_list);
--- linux-2.6.22.noarch.orig/drivers/pci/pci.c
+++ linux-2.6.22.noarch/drivers/pci/pci.c
@@ -1397,13 +1397,18 @@ static int __devinit pci_init(void)
 
 static int __devinit pci_setup(char *str)
 {
+	int msi_disabled_by_user = 0;
+
 	while (str) {
 		char *k = strchr(str, ',');
 		if (k)
 			*k++ = 0;
 		if (*str && (str = pcibios_setup(str)) && *str) {
 			if (!strcmp(str, "nomsi")) {
+				msi_disabled_by_user = 1;
 				pci_no_msi();
+			} else if (!strcmp(str, "msi")) {
+				pci_yes_msi();
 			} else if (!strncmp(str, "cbiosize=", 9)) {
 				pci_cardbus_io_size = memparse(str + 9, &str);
 			} else if (!strncmp(str, "cbmemsize=", 10)) {
@@ -1415,6 +1420,11 @@ static int __devinit pci_setup(char *str
 		}
 		str = k;
 	}
+#ifdef CONFIG_PCI_MSI
+	if (!pci_msi_enabled() && !msi_disabled_by_user)
+		printk(KERN_INFO "PCI Message Signaled Interrupts disabled "
+				 "by default. Enable with \"pci=msi\".\n");
+#endif
 	return 0;
 }
 early_param("pci", pci_setup);
--- linux-2.6.22.noarch.orig/drivers/pci/pci.h
+++ linux-2.6.22.noarch/drivers/pci/pci.h
@@ -47,9 +47,13 @@ extern unsigned int pci_pm_d3_delay;
 
 #ifdef CONFIG_PCI_MSI
 void pci_no_msi(void);
+void pci_yes_msi(void);
+int pci_msi_enabled(void);
 extern void pci_msi_init_pci_dev(struct pci_dev *dev);
 #else
 static inline void pci_no_msi(void) { }
+static inline void pci_yes_msi(void) { }
+static inline int pci_msi_enabled(void) { return 0; }
 static inline void pci_msi_init_pci_dev(struct pci_dev *dev) { }
 #endif
 


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-6/kernel-2.6.spec,v
retrieving revision 1.3001
retrieving revision 1.3002
diff -u -r1.3001 -r1.3002
--- kernel-2.6.spec	8 Aug 2007 18:56:43 -0000	1.3001
+++ kernel-2.6.spec	9 Aug 2007 20:36:22 -0000	1.3002
@@ -583,9 +583,14 @@
 Patch590: linux-2.6-unexport-symbols.patch
 Patch600: linux-2.6-vm-silence-atomic-alloc-failures.patch
 Patch601: linux-2.6-slub-dont-bug-on-too-large-allocation.patch
+
 Patch610: linux-2.6-defaults-fat-utf8.patch
 Patch620: linux-2.6-defaults-unicode-vt.patch
 Patch630: linux-2.6-defaults-nonmi.patch
+Patch635: linux-2.6-usb-autosuspend-default-disable.patch
+Patch636: linux-2.6-nohz-highres-disable.patch
+Patch640: linux-2.6-default_pci_no_msi.patch
+
 Patch660: linux-2.6-libata-ali-atapi-dma.patch
 Patch661: linux-2.6-libata-ich8m-add-pciid.patch
 Patch662: linux-2.6-ata-update-noncq.patch
@@ -608,7 +613,6 @@
 Patch742: linux-2.6-sdhci-clear-error-interrupt.patch
 Patch760: linux-2.6-usb-ftdi_sio-fix-oops.patch
 #Patch780: linux-2.6-clockevents-fix-resume-logic.patch
-Patch781: linux-2.6-nohz-highres-disable.patch
 Patch790: linux-2.6-acpi-dock-oops.patch
 Patch791: linux-2.6-cpufreq-acpi-fix-msr-write.patch
 Patch800: linux-2.6-wakeups-hdaps.patch
@@ -616,7 +620,6 @@
 Patch900: linux-2.6-sched-cfs.patch
 Patch1000: linux-2.6-dmi-based-module-autoloading.patch
 Patch1010: linux-2.6-ondemand-timer.patch
-Patch1020: linux-2.6-usb-autosuspend-default-disable.patch
 Patch1030: linux-2.6-nfs-nosharecache.patch
 Patch1400: linux-2.6-pcspkr-use-the-global-pit-lock.patch
 Patch1420: linux-2.6-seq_operations-leak.patch
@@ -1094,8 +1097,6 @@
 
 ApplyPatch linux-2.6-ondemand-timer.patch
 
-# Some USB devices don't work after auto-suspend, disable by default.
-ApplyPatch linux-2.6-usb-autosuspend-default-disable.patch
 
 # enable sysrq-c on all kernels, not only kexec
 ApplyPatch linux-2.6-sysrq-c.patch
@@ -1258,6 +1259,12 @@
 ApplyPatch linux-2.6-defaults-unicode-vt.patch
 # Disable NMI watchdog by default.
 ApplyPatch linux-2.6-defaults-nonmi.patch
+# disable MSI by default
+ApplyPatch linux-2.6-default_pci_no_msi.patch
+# disable nohz and highres kernel options by default
+ApplyPatch linux-2.6-nohz-highres-disable.patch
+# Some USB devices don't work after auto-suspend, disable by default.
+ApplyPatch linux-2.6-usb-autosuspend-default-disable.patch
 
 # Disable ATAPI DMA on ALI chipsets.
 ApplyPatch linux-2.6-libata-ali-atapi-dma.patch
@@ -1309,8 +1316,6 @@
 ApplyPatch linux-2.6-usb-ftdi_sio-fix-oops.patch
 
 # timers
-# disable nohz and highres kernel options by default
-ApplyPatch linux-2.6-nohz-highres-disable.patch
 
 # ACPI patches
 # Fix ACPI dock oops (#238054)
@@ -2257,6 +2262,9 @@
 %endif
 
 %changelog
+* Thu Aug 09 2007 Chuck Ebbert <cebbert at redhat.com>
+- disable PCI MSI by default
+
 * Wed Aug 08 2007 Chuck Ebbert <cebbert at redhat.com>
 - add xt_statistic.h to header list for iptables
 - detect broken lapic timer on some dual-core AMD systems




More information about the fedora-cvs-commits mailing list