diff options
author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-04-18 13:09:09 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-04-26 15:04:38 -0700 |
commit | 779b457f66e10de3471479373463b27fd308dc85 (patch) | |
tree | bec1b2567d9f51ed93d49e19a411f9ba37efcf7a /drivers/usb/storage | |
parent | d64aab0c6fdc67113f2332a295d244b53bf694d6 (diff) | |
download | linux-stable-779b457f66e10de3471479373463b27fd308dc85.tar.gz linux-stable-779b457f66e10de3471479373463b27fd308dc85.tar.bz2 linux-stable-779b457f66e10de3471479373463b27fd308dc85.zip |
usb: storage: scsiglue: further describe our 240 sector limit
Just so we have some sort of documentation as to why
we limit our Mass Storage transfers to 240 sectors,
let's update the comment to make clearer that
devices were found that would choke with larger
transfers.
While at that, also make sure to clarify that other
operating systems have similar, albeit different,
limits on mass storage transfers.
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/storage')
-rw-r--r-- | drivers/usb/storage/scsiglue.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c index 90901861bfc0..9da1fb3d0ff4 100644 --- a/drivers/usb/storage/scsiglue.c +++ b/drivers/usb/storage/scsiglue.c @@ -565,7 +565,24 @@ static const struct scsi_host_template usb_stor_host_template = { /* lots of sg segments can be handled */ .sg_tablesize = SCSI_MAX_SG_CHAIN_SEGMENTS, - /* limit the total size of a transfer to 120 KB */ + + /* + * Limit the total size of a transfer to 120 KB. + * + * Some devices are known to choke with anything larger. It seems like + * the problem stems from the fact that original IDE controllers had + * only an 8-bit register to hold the number of sectors in one transfer + * and even those couldn't handle a full 256 sectors. + * + * Because we want to make sure we interoperate with as many devices as + * possible, we will maintain a 240 sector transfer size limit for USB + * Mass Storage devices. + * + * Tests show that other operating have similar limits with Microsoft + * Windows 7 limiting transfers to 128 sectors for both USB2 and USB3 + * and Apple Mac OS X 10.11 limiting transfers to 256 sectors for USB2 + * and 2048 for USB3 devices. + */ .max_sectors = 240, /* merge commands... this seems to help performance, but |