Hi,

Greg KH <[email protected]> writes:
> On Wed, Nov 04, 2015 at 02:48:32PM -0600, Felipe Balbi wrote:
>> 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: Felipe Balbi <[email protected]>
>> ---
>>  drivers/usb/storage/scsiglue.c | 16 +++++++++++-----
>>  drivers/usb/storage/usb.c      |  4 ++++
>>  include/linux/usb_usual.h      |  2 ++
>>  3 files changed, 17 insertions(+), 5 deletions(-)
>> 
>> diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
>> index 00aadf3a3857..bda2b3c9ae42 100644
>> --- a/drivers/usb/storage/scsiglue.c
>> +++ b/drivers/usb/storage/scsiglue.c
>> @@ -115,13 +115,19 @@ static int slave_configure(struct scsi_device *sdev)
>>  {
>>      struct us_data *us = host_to_us(sdev->host);
>>  
>> -    /* Many devices have trouble transferring more than 32KB at a time,
>> -     * while others have trouble with more than 64K. At this time we
>> -     * are limiting both to 32K (64 sectores).
>> -     */
>> -    if (us->fflags & (US_FL_MAX_SECTORS_64 | US_FL_MAX_SECTORS_MIN)) {
>> +    if (us->fflags & US_FL_USB3) {
>> +            /* USB3 devices will be limitted at 2048 sectors. This gives us
>
> "limited"?

hehe, that was bad :-p

> Other than that, this looks good to me, did you have a chance to test a
> Windows machine to see what it does?

yeah, it always does 128 sectors no matter if it's usb2 or usb3. Mac OS
X will do 256 sectors for USB2 and 2048 for USB3. Tested both by copying
formatting and copying large files over.

-- 
balbi

Attachment: signature.asc
Description: PGP signature

Reply via email to