On Sun, 30 Nov 2003, Francesco Marchetti-Stasi wrote:

> 
> >> Alan Stern wrote:
> >> > You will have to manually edit the file
> >> > drivers/usb/storage/scsiglue.c in  your kernel source.  Around about
> >> > line 320 in the file you may or may not  see a line that says
> >> >
> >> >  .max_sectors =          240,
> >> >
> >> > If it's there, try changing the 240 to 120.  If it's not there, try
> >> > adding
> >>
> >> This works!
> >> I changed the value from 240 to 120. All other values between these
> >> two points don't work - why?
> 
> It also works for me! Finally... I was following the mailing list,
> applying all the suggestions to debug, so I recognized immediately the
> problem when reported by Kleiner Hampel. I didn't have the time to check
> whether this worked for me until today: I got 2.6.0-test10, checked that
> my ide-to-usb-2.0 external HD still didn't work, than changed max_sectors
> to 128, and finally everything worked as a breeze... (I copied 18 GB to it
> in a few minutes, and also managed to fill up /var, having USB debugging
> on... :)
> (BTW, max_sectors is set twice in scsiglue.c, on line 316 and 319; is this
> intended or is it a typo?)

It must be a typo.  The value should only be set once.

> I can survive with this patch, but I'd really like to help and fix this
> problem once and for all - I guess it may be a rather common situation,
> given the number and variety of these drivers that are coming to the
> market. I was thinking of introducing a module parameter for max_sectors,
> at least to check what was the minimum value to work, but that's probably
> not very useful.

We will probably create a sysfs attribute file for max_sectors so that it 
can be controlled dynamically, not just at module load time.

>  Isn't there a way to probe for this value with the drive?
> Maybe when it is first connected?

I don't know any way to probe for the best value.  There's no standard way 
to ask the device.  The only way to know if the current setting is too big 
is to try it and see if the device fails!  The problem is that it may then 
be impossible to recover from the failure.

We may finally have to create entries in unusual_devs.h for devices that 
can only handle transfers up to 64 KB at once.  Either that or else make 
128 the default max_sectors value, but we want to avoid slowing down 
devices that can handle larger transfers okay.

> >> Many thanks for your good help A. Stern!
> >>
> >> regards,
> >> hampel
> 
> From me too... thank you SO much!
> 
> Francesco Marchetti-Stasi.

Alan Stern



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to