On Saturday 01 July 2006 4:44 am, Maulik Mankad wrote: > > Can someone explain to me how a DMA engine in the USB host controller work > in concept? Also let me know how the DMA engine is kicked off in a standard > USB host controller.
It's all run through the async and perioidic schedule data structures. Schedules are protocol transfer queues that implicitly use DMA for the data in the packet bodies. The endpoint queue heads (and, for EHCI and UHCI, ISO transfer descriptors) identify the transfer type and the target device and endpoint, and track state like data toggle. Transfer descriptors wrap each data DMA buffer. > I have seen the code in "ehci-q.c" where I found that the qtd->hw_buf is > initialized with the DMA able address. > > Does doing this start the DMA engine and the DMA controller take the buffer > pointed to by this address (setup_packet in this case) and transfer it? There are three main steps: - Building a protocol request, which for control transfers involves two or three USB transfer stages (SETUP, optionally some DATA packets, then STATUS) but otherwise includes just some DATA packets. - Activating that part of the schedule. The USB host controller's job is to scan the schedules (up to about 80% for periodic transfers, and at least 10% for async transfers) and perform them. (The schedule may already be active, in which case this step is omitted.) - Adding that request to the schedule, e.g. the ring holding the async transfers (bulk and control) or the periodic schedule tree. The schedule is activated first so that there's only one code path to debug, the "live schedule update". (Races and all!) - Dave Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel