On Thu, 27 Nov 2003, Kleiner Hampel 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?

I'm glad to hear you got it working.

Are you sure that _all_ values don't work?  I would expect that at least 
128 would be okay.  But no, I can't explain what's going on with your 
device.

> Does this mean now, my usb 2.0 storage wouldn't act as "normal" usb 2.0
> speed? Or does this only mean more work for kernel?

This isn't diretly connected with the speed; it's more a question of how
much data can be sent in a single command.  Setting max_sectors to 120
limits the driver to sending 60 KB at once (a sector is 512 bytes).  
That's not a problem -- all the data will be sent -- it just has to be
broken up into more commands.  So there's extra overhead and extra work
because of the extra commands, which will slow things down a bit.  
Probably not too much though.  Anyway, it's better than not working at
all!

It's a little odd that your device can only accept such a small amount of
data at a time.  Almost all USB storage devices can handle up to 120 KB
(that's why the default value of max_sectors is 240) and most can handle 
arbitrarily large amounts.

In the future I expect there will be a way to set the max_sectors value
directly, without having to change the kernel source.  In the meantime, 
you'll just have to make the change by hand.

> Many thanks for your good help A. Stern!
> 
> regards,
> hampel

You're welcome.

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