EHCI USB Transfer

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
ehenkes
Member
Member
Posts: 124
Joined: Mon Mar 23, 2009 3:15 am
Location: Germany
Contact:

EHCI USB Transfer

Post by ehenkes »

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/sv ... hciQHqTD.c (QH, qTD) please cf. performAsyncScheduler

https://prettyos.svn.sourceforge.net/sv ... nel/usb2.c (USB transfer)
https://prettyos.svn.sourceforge.net/sv ... 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)
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Re: EHCI USB Transfer

Post by pcmattman »

We seem to have solved this problem by leaving a dummy queue head in the asynchronous schedule at all times (it references an inactive qTD) and linking new QH structures to that dummy queue head on the fly. Queuing and dequeuing seems to work properly at the moment - and we don't stop the host controller after initial reset.

I was able to work off the EHCI spec alone (section 4.8) to get this working - you can see our QH and qTD creation and linking in our EHCI driver, which is here (Ehci.cc).

It should be noted we're still doing real hardware testing, this has just been proven to work in VMware. The live insertion to the list also works on our Beagleboard port - but we have some minor problems with that port that get in the way of proper testing.
Last edited by Candy on Thu Jul 22, 2010 11:36 pm, edited 1 time in total.
Reason: section 4.8) was smiling
Post Reply