[kernel/f14/master] disable xhci by default

Kyle McMartin kyle at fedoraproject.org
Wed Oct 13 04:01:19 UTC 2010


commit c19187e334cc83bad2cc313efadf0814524e56fa
Author: Kyle McMartin <kyle at dreadnought.i.jkkm.org>
Date:   Wed Oct 13 00:01:19 2010 -0400

    disable xhci by default
    
    see spec %changelog for rationale.

 disable-xhci-by-default.patch |   31 +++++++++++++++++++++++++++++++
 kernel.spec                   |   15 +++++++++++++++
 2 files changed, 46 insertions(+), 0 deletions(-)
---
diff --git a/disable-xhci-by-default.patch b/disable-xhci-by-default.patch
new file mode 100644
index 0000000..dd1c808
--- /dev/null
+++ b/disable-xhci-by-default.patch
@@ -0,0 +1,31 @@
+diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
+index 11482b6..b05ff9c 100644
+--- a/drivers/usb/host/xhci-pci.c
++++ b/drivers/usb/host/xhci-pci.c
+@@ -179,9 +179,25 @@ static struct pci_driver xhci_pci_driver = {
+ 	.shutdown = 	usb_hcd_pci_shutdown,
+ };
+ 
++
++static int enable;
++module_param(enable, int, S_IRUGO);
++MODULE_PARM_DESC(enable, "Enable XHCI host controller");
++
+ int xhci_register_pci(void)
+ {
+-	return pci_register_driver(&xhci_pci_driver);
++	/* xhci will prevent suspend/resume if it's loaded.
++	 * force user to pass xhci.enable=1 to the kernel in order
++	 * to get usb3.0 support for the time being.
++	 *
++	 * ugly yes, but there's few enough users out there using
++	 * usb3.0, and a lot who just have the hardware breaking
++	 * their suspend.
++	 */
++	if (enable)
++		return pci_register_driver(&xhci_pci_driver);
++	else
++		return 0;
+ }
+ 
+ void xhci_unregister_pci(void)
diff --git a/kernel.spec b/kernel.spec
index b578af9..a9ad61b 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -619,6 +619,8 @@ Patch204: linux-2.6-debug-always-inline-kzalloc.patch
 
 Patch300: create-sys-fs-cgroup-to-mount-cgroupfs-on.patch
 
+Patch360: disable-xhci-by-default.patch
+
 Patch380: linux-2.6-defaults-pci_no_msi.patch
 Patch381: linux-2.6-defaults-pci_use_crs.patch
 Patch382: linux-2.6-defaults-no-pm-async.patch
@@ -1217,6 +1219,7 @@ ApplyPatch linux-2.6-32bit-mmap-exec-randomization.patch
 # NFSv4
 
 # USB
+ApplyPatch disable-xhci-by-default.patch
 
 # WMI
 
@@ -1989,6 +1992,18 @@ fi
 # and build.
 
 %changelog
+* Wed Oct 13 2010 Kyle McMartin <kyle at redhat.com>
+- Disable XHCI registration by default. Passing xhci.enable=1 to the
+  kernel will enable it, as will
+  echo "options xhci-hcd enable=1" >/etc/modprobe.d/xhci.conf
+  This is necessary, because it is beginning to turn up on more and
+  more boards, and prevents suspend if the device is probed (since it
+  does not implement suspend handlers.)
+  Simply removing the module alias would work (and require you to
+  manually load the driver, like for floppy) however, there's a chance
+  people would like to install onto usb3 drives, so let's provide them
+  with an easy means to enable it (the grub cmdline.)
+
 * Tue Oct 12 2010 Kyle McMartin <kyle at redhat.com> 2.6.35.6-42
 - Fix  devicemapper UUID field cannot be assigned after map creation
   (rhbz#641476) thanks pjones at .


More information about the scm-commits mailing list