Page 1 of 1

EHCI USB Transfer

Posted: Mon Jul 12, 2010 12:01 pm
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)

Re: EHCI USB Transfer

Posted: Thu Jul 22, 2010 11:09 pm
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.