From: Hans de Goede Date: Fri, 1 Aug 2014 15:33:08 +0000 (+0200) Subject: uas: Limit qdepth to 32 when connected over usb-2 X-Git-Tag: firefly_0821_release~176^2~3489^2~6 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e2875c33787ebda21aeecc1a9d3ff52b3aa413ec;p=firefly-linux-kernel-4.4.55.git 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@vger.kernel.org Tested-and-reported-by: Laszlo T. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 511b22953167..3f42785f653c 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,