Re: another unusual flag for a really limited device

Alan Stern <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Tue, 13 Nov 2007, Matthew Dharm wrote:

> On Tue, Nov 13, 2007 at 07:35:45PM -0600, Doug Maxey wrote:
> > Have run across a virtual USB host that needs (yes, I know, a strong
> > word :) to limit the maximum number of sectors transferred in a single
> > request to 32.  In theory, the device should be fine with 32k, but
> > when it loses, it never seems to recover without a full reset.
> > 
> > Did some searching in the archives, but saw nothing.
> > 
> > What about something along the lines of adding UL_FL_MAX_SECTORS_32 to
> > follow the pattern used with MAX_SECTORS_64, thusly?
> > 
> > Based on linus 2.6.24-rc2.
> 
> I can't say I'm really happy about another flag, but I can't exactly object
> too strongly.  This is probably the best fix we're going to find.
> 
> Tho, I'm seriously tempted to make the choice MAX_SECTORS_64 and
> MAX_SECTORS_1 -- if a device can't handle 64 sectors at a time, then let's
> just limit it to 1 and call it a day.   Otherwise we're going to wind up
> with MAX_SECTORS_32, _16, _8, _4, and _2 someday.

1 won't work; max_sectors has to be at least the size of a memory
page.  This is enforced by the block layer's request_queue routines.
But we certainly could have a MAX_SECTORS_MIN flag.

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.