On Sat, Jul 26, 2003, Alan Stern <[EMAIL PROTECTED]> wrote: > With Duncan away, you're the only other person I know still interested in > working on this... > > Duncan's suggestions gave me some ideas for even more improvements. > Consider this: > > Merge the code that frees QHs, TDs, and urbps. That eliminates > the need for the qh_remove_list and the list headers in the QHs.
This sounds reasonable. > Eliminate the complete_list as well. When an URB completes, just > call uhci_finish_urb() instead of uhci_add_complete(). Unlinked URBs can > be passed to uhci_finish_urb() as they get processed in the > urb_remove_list. Be careful! The reason why complete_list was added was to fix a deadlock with the completion handler. The completion handler for the URB can submit an URB. As a result, we have to be careful which locks we hold when we call the callback. In particular, we can't hold urb_list_lock. I'll add some documentation for that :) > The processing in uhci_transfer_result() could be speeded up a > little by keeping some extra state in urbp. Keep track of the first > active TD, and scan the list of TD's starting from there instead of from > the beginning. That will be a big help especially for iso. transfers, > since it will avoid scanning the same completed TDs over and over again. > It also presents the possibility of unlinking iso. TDs as they complete, > rather than waiting for the entire URB to finish. That could be the > solution to the problem of iso. URBs that try to schedule transfers more > than 1024 frames in the future. As each TD completes, unlink it and then > see if it can be added back in to take care of a descriptor that was too > far in the future originally but is okay now. We'd have to set the IOC bit on all (or some) of the ISO TDs then. This isn't a big deal. We don't need to set every one and as long as we space them out time wise, it should be acceptable. On the other hand, I'm not sure if any drivers will submit more than 1 seconds worth of transfers. That's a long time. I have no problems with tracking the first active TD. This will help for large bulk transfers as well. I think it has been discussed in the past. We should also look at queuing Interrupt TDs with a QH head. I think that may simplify code a bit too. I'd like to get the correctness fixes done first and then we can work on optimizations and code cleanups. JE ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
