Author Topic: EHCI USB Transfer  (Read 16211 times)

ehenkes

  • Member
  • ***
  • Posts: 5
EHCI USB Transfer
« 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


 

« Last Edit: October 23, 2011, 12:25:27 pm by ehenkes »

Barry Twycross

  • Frequent Contributor
  • ****
  • Posts: 263
Re: EHCI USB Transfer
« Reply #1 on: July 13, 2010, 07:36:39 pm »
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???
« Last Edit: July 13, 2010, 07:38:38 pm by Barry Twycross »