From: On Behalf Of Ian Abbott > The URB queueing stuff in ftdi_sio was implemented some time > before the > the problems with the uhci driver were known. I guessed I > lived in hope > that it would get fixed one day. (I even tried debugging it with > printk's, but got horribly lost. I wouldn't like to maintain those > drivers!)
Ah! The flashbacks! I did the same thing ages ago, and then again just now. My knowledge of uhci internals is greater, but still not complete or unconfused. > I may get around to ripping that stuff out of ftdi_sio someday and > replacing it with something else. Maybe a single write URB and two > transfer buffers. The driver could be filling one transfer > buffer while > waiting for the other to come back with the URB in the write bulk > callback. It should also make the write_room function more > accurate - > it can just return the space left in the "currently being > filled" buffer. Here's what I've done (driver update will be posted once QA approves it): - in the attach routine, allocate a pool of URBs and stick them on lists, one for read (IN) and one for write (OUT) - keep a variable that limits the number of simultaneously submitted URBs that are allowed, I default to 1 to get by the 2.4 queueing problems - in open() submit only enough read URBs to hit the submit limit - in write() fill URBs from the free pool and queue them on a tmp list then submit enough to hit the submit limit - in the write callback, submit from the tmp list if there are any - free pool size and submit limit are module variables, so may be manipulated by end users on load Works quite well in practice, is very flexible, and needs no rework to drop into 2.6 *and* use queueing. ..Stu ------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel