PORTS Forum
Ports and Interfaces => USB => Topic started by: ehenkes on July 12, 2010, 01:17:57 pm
-
When I carry out a USB transfer with the EHCI, I make a go and stop due to the fact that I did not find a way to carry out consecutive USB transfers with the async scheduler enabled continuously.
https://prettyos.svn.sourceforge.net/svnroot/prettyos/trunk/Source/kernel/ehciQHqTD.c (QH, qTD) please cf. performAsyncScheduler
https://prettyos.svn.sourceforge.net/svnroot/prettyos/trunk/Source/kernel/usb2.c (USB transfer)
https://prettyos.svn.sourceforge.net/svnroot/prettyos/trunk/Source/kernel/usb2_msd.c (USB bulk transfer)
Perhaps, someone with EHCI experience can give me a hint how to manage that continuously w/o start/stop of async scheduler (malloc/free problem)
EDIT (2011-10-23): it works now very fast! w/o stop'n'go
-
Is your problem you don't know how to add TDs to a live QH, or something else?
Section 4.10 of the EHCI spec tells you all you need to know about adding TDs to a live QH. Basically you have a dummy TD at the end of the queue, with the active bit set to false. Adding a TD is a matter of filling in that TD, adding a new dummy and setting the active bit.
What's malloc/free got to do with this???