summaryrefslogtreecommitdiff
path: root/drivers/usb/storage
diff options
context:
space:
mode:
authorTom Yan <tom.ty89@gmail.com>2020-09-04 02:17:25 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-09-04 17:00:39 +0200
commit5df7ef7d32fec1d6d1c34dbec019b461a12ce870 (patch)
tree15b4dc69d3b6dc064bf1a4cfe42594867396f6aa /drivers/usb/storage
parent558033c2828f832ab3b68c6f8b8710e0de6faef0 (diff)
uas: bump hw_max_sectors to 2048 blocks for SS or faster drives
There's no reason for uas to use a smaller value of max_sectors than usb-storage. Signed-off-by: Tom Yan <tom.ty89@gmail.com> Reviewed-by: Alan Stern <stern@rowland.harvard.edu> Link: https://lore.kernel.org/r/20200903181725.2931-3-tom.ty89@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/storage')
-rw-r--r--drivers/usb/storage/uas.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index f4beeb8a8adb..c1123da43407 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -839,6 +839,8 @@ static int uas_slave_configure(struct scsi_device *sdev)
blk_queue_max_hw_sectors(sdev->request_queue, 64);
else if (devinfo->flags & US_FL_MAX_SECTORS_240)
blk_queue_max_hw_sectors(sdev->request_queue, 240);
+ else if (devinfo->udev->speed >= USB_SPEED_SUPER)
+ blk_queue_max_hw_sectors(sdev->request_queue, 2048);
blk_queue_max_hw_sectors(sdev->request_queue,
min_t(size_t, queue_max_hw_sectors(sdev->request_queue),