[kernel/f20] UAS: Limit max number of requests over USB-2 to 32 (rhbz#1128472)

Hans de Goede jwrdegoede at fedoraproject.org
Thu Aug 14 13:23:41 UTC 2014


commit 29e3dad5041206bc4e059713b26196196b331304
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Thu Aug 14 15:23:45 2014 +0200

    UAS: Limit max number of requests over USB-2 to 32 (rhbz#1128472)

 ...it-qdepth-to-32-when-connected-over-usb-2.patch |   36 ++++++++++++++++++++
 kernel.spec                                        |    9 +++++
 2 files changed, 45 insertions(+), 0 deletions(-)
---
diff --git a/0001-uas-Limit-qdepth-to-32-when-connected-over-usb-2.patch b/0001-uas-Limit-qdepth-to-32-when-connected-over-usb-2.patch
new file mode 100644
index 0000000..ec2af2a
--- /dev/null
+++ b/0001-uas-Limit-qdepth-to-32-when-connected-over-usb-2.patch
@@ -0,0 +1,36 @@
+From 86da2d12cf6f76b1fa487f7acf3995f058a2e516 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede at redhat.com>
+Date: Fri, 1 Aug 2014 17:27:49 +0200
+Subject: [PATCH v2 1/2] uas: Limit qdepth to 32 when connected over usb-2
+
+Some jmicron uas chipsets act up (they disconnect from the bus) when sending
+more then 32 commands to them at once.
+
+Rather then building an ever growing list with usb-id based quirks for
+devices using this chipset, simply reduce the qdepth to 32 when connected
+over usb-2. 32 should be plenty to keep things close to maximum
+possible throughput on usb-2.
+
+Cc: stable at vger.kernel.org
+Tested-and-reported-by: Laszlo T. <tlacix at gmail.com>
+Signed-off-by: Hans de Goede <hdegoede at redhat.com>
+---
+ drivers/usb/storage/uas.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
+index 511b229..3f42785 100644
+--- a/drivers/usb/storage/uas.c
++++ b/drivers/usb/storage/uas.c
+@@ -1026,7 +1026,7 @@ static int uas_configure_endpoints(struct uas_dev_info *devinfo)
+ 					    usb_endpoint_num(&eps[3]->desc));
+ 
+ 	if (udev->speed != USB_SPEED_SUPER) {
+-		devinfo->qdepth = 256;
++		devinfo->qdepth = 32;
+ 		devinfo->use_streams = 0;
+ 	} else {
+ 		devinfo->qdepth = usb_alloc_streams(devinfo->intf, eps + 1,
+-- 
+2.0.4
+
diff --git a/kernel.spec b/kernel.spec
index 9a64708..dc8864d 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -763,6 +763,9 @@ Patch25129: 0002-ALSA-hda-Add-a-fixup-for-Thinkpad-T540p.patch
 #CVE-2014-{5206,5207} rhbz 1129662 1129669
 Patch25130: namespaces-remount-fixes.patch
 
+#rhbz 1128472
+Patch25131: 0001-uas-Limit-qdepth-to-32-when-connected-over-usb-2.patch
+
 # END OF PATCH DEFINITIONS
 
 %endif
@@ -1485,6 +1488,9 @@ ApplyPatch 0002-ALSA-hda-Add-a-fixup-for-Thinkpad-T540p.patch
 #CVE-2014-{5206,5207} rhbz 1129662 1129669
 ApplyPatch namespaces-remount-fixes.patch
 
+#rhbz 1128472
+ApplyPatch 0001-uas-Limit-qdepth-to-32-when-connected-over-usb-2.patch
+
 # END OF PATCH APPLICATIONS
 
 %endif
@@ -2296,6 +2302,9 @@ fi
 #                 ||----w |
 #                 ||     ||
 %changelog
+* Thu Aug 14 2014 Hans de Goede <hdegoede at redhat.com>
+- UAS: Limit max number of requests over USB-2 to 32 (rhbz#1128472)
+
 * Wed Aug 13 2014 Justin M. Forbes <jforbes at fedoraproject.org> 3.15.9-201
 - Bump for build
 


More information about the scm-commits mailing list