Commit 5df7ef7d authored by Tom Yan's avatar Tom Yan Committed by Greg Kroah-Hartman

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: default avatarTom Yan <tom.ty89@gmail.com>
Reviewed-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20200903181725.2931-3-tom.ty89@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 558033c2
...@@ -839,6 +839,8 @@ static int uas_slave_configure(struct scsi_device *sdev) ...@@ -839,6 +839,8 @@ static int uas_slave_configure(struct scsi_device *sdev)
blk_queue_max_hw_sectors(sdev->request_queue, 64); blk_queue_max_hw_sectors(sdev->request_queue, 64);
else if (devinfo->flags & US_FL_MAX_SECTORS_240) else if (devinfo->flags & US_FL_MAX_SECTORS_240)
blk_queue_max_hw_sectors(sdev->request_queue, 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, blk_queue_max_hw_sectors(sdev->request_queue,
min_t(size_t, queue_max_hw_sectors(sdev->request_queue), min_t(size_t, queue_max_hw_sectors(sdev->request_queue),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment