提交 5b91dfe1 编写于 作者: F Felipe Balbi 提交者: Greg Kroah-Hartman

usb: storage: scsiglue: limit USB3 devices to 2048 sectors

USB3 devices, because they are much newer, have much
less chance of having issues with larger transfers.

We still keep a limit because anything above 2048
sectors really rendered negligible speed
improvements, so we will simply ignore
that. Transferring 1MiB should already give us
pretty good performance.
Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
Acked-by: NAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 779b457f
......@@ -133,6 +133,11 @@ static int slave_configure(struct scsi_device *sdev)
* let the queue segment size sort out the real limit.
*/
blk_queue_max_hw_sectors(sdev->request_queue, 0x7FFFFF);
} else if (us->pusb_dev->speed >= USB_SPEED_SUPER) {
/* USB3 devices will be limited to 2048 sectors. This gives us
* better throughput on most devices.
*/
blk_queue_max_hw_sectors(sdev->request_queue, 2048);
}
/* Some USB host controllers can't do DMA; they have to use PIO.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册