Re: [RFC PATCH 1/2] usb: storage: scsiglue: further describe our 240 sector limit

2015-11-05 Thread Felipe Balbi

Hi,

Alan Stern  writes:
> On Wed, 4 Nov 2015, Felipe Balbi wrote:
>
>> >> +  * Tests show that other operating have similar limits with Microsoft
>> >> +  * Windows™ 7 limitting transfers to 128 sectors for both USB2 and USB3
>> >> +  * and Apple Mac OS X™ 10.11 limitting transfers to 256 sectors for USB2
>> >> +  * and 2048 for USB3 devices.
>> >
>> > Do we try to avoid non-ASCII characters in comments, or are they 
>> > accepted?  Documentation/CodingStyle doesn't say anything about it.
>> 
>> I can remove, no problems. Just remove it or add (TM) ?
>
> Up to you.  I wouldn't bother.  If there are any legal requirements, 
> I'm not aware of them.

all right, removed.

-- 
balbi


signature.asc
Description: PGP signature


Re: [RFC PATCH 1/2] usb: storage: scsiglue: further describe our 240 sector limit

2015-11-05 Thread Alan Stern
On Wed, 4 Nov 2015, Felipe Balbi wrote:

> >> +   * Tests show that other operating have similar limits with Microsoft
> >> +   * Windows™ 7 limitting transfers to 128 sectors for both USB2 and USB3
> >> +   * and Apple Mac OS X™ 10.11 limitting transfers to 256 sectors for USB2
> >> +   * and 2048 for USB3 devices.
> >
> > Do we try to avoid non-ASCII characters in comments, or are they 
> > accepted?  Documentation/CodingStyle doesn't say anything about it.
> 
> I can remove, no problems. Just remove it or add (TM) ?

Up to you.  I wouldn't bother.  If there are any legal requirements, 
I'm not aware of them.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH 1/2] usb: storage: scsiglue: further describe our 240 sector limit

2015-11-04 Thread Felipe Balbi

Hi,

Sergei Shtylyov  writes:
> Hello.
>
> On 11/4/2015 11:48 PM, Felipe Balbi wrote:
>
>> 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 
>> ---
>>
>> Guys, how about this version ? First we update comments then,
>> as a follow up patch, we increase USB3 only to 2048 sectors.
>>
>>   drivers/usb/storage/scsiglue.c | 18 +-
>>   1 file changed, 17 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
>> index dba51362d2e2..00aadf3a3857 100644
>> --- a/drivers/usb/storage/scsiglue.c
>> +++ b/drivers/usb/storage/scsiglue.c
>> @@ -565,7 +565,23 @@ 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
>
> Operating systems?

I'll fix this one.

>> + * Windows™ 7 limitting transfers to 128 sectors for both USB2 and USB3
>> + * and Apple Mac OS X™ 10.11 limitting transfers to 256 sectors for USB2
>
> Limiting as already noticed.

had fixed this one before, thanks.

-- 
balbi


signature.asc
Description: PGP signature


Re: [RFC PATCH 1/2] usb: storage: scsiglue: further describe our 240 sector limit

2015-11-04 Thread Felipe Balbi

Hi,

Alan Stern  writes:
> On Wed, 4 Nov 2015, Felipe Balbi wrote:
>
>> 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 
>
>> + * Tests show that other operating have similar limits with Microsoft
>> + * Windows™ 7 limitting transfers to 128 sectors for both USB2 and USB3
>> + * and Apple Mac OS X™ 10.11 limitting transfers to 256 sectors for USB2
>> + * and 2048 for USB3 devices.
>
> Do we try to avoid non-ASCII characters in comments, or are they 
> accepted?  Documentation/CodingStyle doesn't say anything about it.

I can remove, no problems. Just remove it or add (TM) ?

-- 
balbi


signature.asc
Description: PGP signature


Re: [RFC PATCH 1/2] usb: storage: scsiglue: further describe our 240 sector limit

2015-11-04 Thread Sergei Shtylyov

Hello.

On 11/4/2015 11:48 PM, Felipe Balbi wrote:


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 
---

Guys, how about this version ? First we update comments then,
as a follow up patch, we increase USB3 only to 2048 sectors.

  drivers/usb/storage/scsiglue.c | 18 +-
  1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
index dba51362d2e2..00aadf3a3857 100644
--- a/drivers/usb/storage/scsiglue.c
+++ b/drivers/usb/storage/scsiglue.c
@@ -565,7 +565,23 @@ 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


   Operating systems?


+* Windows™ 7 limitting transfers to 128 sectors for both USB2 and USB3
+* and Apple Mac OS X™ 10.11 limitting transfers to 256 sectors for USB2


   Limiting as already noticed.

[...]

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH 1/2] usb: storage: scsiglue: further describe our 240 sector limit

2015-11-04 Thread Alan Stern
On Wed, 4 Nov 2015, Felipe Balbi wrote:

> 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 

> +  * Tests show that other operating have similar limits with Microsoft
> +  * Windows™ 7 limitting transfers to 128 sectors for both USB2 and USB3
> +  * and Apple Mac OS X™ 10.11 limitting transfers to 256 sectors for USB2
> +  * and 2048 for USB3 devices.

Do we try to avoid non-ASCII characters in comments, or are they 
accepted?  Documentation/CodingStyle doesn't say anything about it.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC PATCH 1/2] usb: storage: scsiglue: further describe our 240 sector limit

2015-11-04 Thread Felipe Balbi
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 
---

Guys, how about this version ? First we update comments then,
as a follow up patch, we increase USB3 only to 2048 sectors.

 drivers/usb/storage/scsiglue.c | 18 +-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
index dba51362d2e2..00aadf3a3857 100644
--- a/drivers/usb/storage/scsiglue.c
+++ b/drivers/usb/storage/scsiglue.c
@@ -565,7 +565,23 @@ 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 limitting transfers to 128 sectors for both USB2 and USB3
+* and Apple Mac OS X™ 10.11 limitting transfers to 256 sectors for USB2
+* and 2048 for USB3 devices.
+*/
.max_sectors =  240,
 
/* merge commands... this seems to help performance, but
-- 
2.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html