Re: another unusual flag for a really limited device
Matthew Dharm <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Organization | One Eyed Alien Networks |
| Message-ID | <[email protected]> |
On Wed, Nov 14, 2007 at 12:28:03PM -0500, Alan Stern wrote: > 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. So, for most systems, the limit is 8? Whatever our functional lower limit is, I think agree that a _MIN flag would make sense. I'm somewhat tempted to actually just convert the _64 flag to a _MIN flag, and make the issue of finding an "optimal" value a userspace problem. I think you can get to this parameter via sysfs, right? Matt -- Matthew Dharm Home: [email protected] Maintainer, Linux USB Mass Storage Driver But where are the THEMES?! How do you expect me to use an OS without themes?! -- Stef User Friendly, 10/9/1998 ------------------------------------------------------------------------- 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
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFHOzo4HL9iwnUZqnkRAm9OAJ9ouhocsxdoMPHbygM9s/Om0BrpBwCfWB/Z td8wXu4MCYmrLzXVI83RWJk= =vQ+P -----END PGP SIGNATURE-----