On Sun, 16 May 2004, Pete Zaitcev wrote:

> This was shipping with Fedora and possibly helped someone. However,
> in light of GeneSys problem I'm seeking comment. Do we want this
> in 2.4, if if yes, why? Anyone on Debian seeing any failures, for
> instance? How much is a good number, 124?
> 
> -- Pete
> 
> diff -urp -X dontdiff linux-2.4.27-pre2/drivers/usb/storage/scsiglue.c 
> linux-2.4.27-pre2-usb/drivers/usb/storage/scsiglue.c
> --- linux-2.4.27-pre2/drivers/usb/storage/scsiglue.c  2004-05-15 22:34:34.000000000 
> -0700
> +++ linux-2.4.27-pre2-usb/drivers/usb/storage/scsiglue.c      2004-05-15 
> 23:06:11.000000000 -0700
> @@ -424,6 +424,13 @@ Scsi_Host_Template usb_stor_host_templat
>       can_queue:              1,
>       this_id:                -1,
>  
> +     /*
> +      * This is supposed to be an HBA limit. In our case, it is here
> +      * because many _devices_ break if transfer is too long, but
> +      * we know no reliable way to detect and blacklist them.
> +      */
> +     max_sectors:            240,
> +
>       sg_tablesize:           SG_ALL,
>       cmd_per_lun:            1,
>       present:                0,

Putting that into 2.6 was a compromise.  Plenty of devices work just fine
with no max_sectors limit at all.  Some require this 120 KB limit.  
Others, including Genesys when running at high speed, require a 64 KB
limit.  A handful may need even less.  We haven't been able to think up a
good way to detect the device requirements at runtime (except for the
Genesys case).  At least in 2.6 there's a sysfs mechanism allowing the 
user to change this value on the fly without recompiling the driver.

2.4 may not need this flag so much as 2.6, because it tends to do disk I/O
in shorter segments anyway.  I haven't tried to track this down; it's
probably hidden in some block layer header file.  But the log files I've
seen show 2.4 doing I/O in 128 KB bursts, whereas 2.6 by default will use
512 KB bursts.

Alan Stern



-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to