On Thursday 16 December 2004 9:05 am, [EMAIL PROTECTED] wrote: > Hello, > > I write the usb device controller for our stuff and I tested for bulk-out is > correct. The tests 1, 3, 5, 7 passed. The problem is bulk-in transfert, I > don't undestand how can I implement it in udc driver. I got error each time > that I try to execute testusb -at2... error 121!
How to implement it in the UDC driver is usually described fairly well in the chip specs. From the gadget driver perspective, it's simple: add a usb_request to the endpoint's queue, and your controller driver is then responsible for delivering that buffer when the host requests it. (Repeat for the next buffer in the queue, until done.) That'll mean getting the first packet into the hardware's buffer, either using PIO or (ideally) DMA. Then the next packet, and the next, until the buffer finishes. Maybe you'll need to send a zero length packet at the end, before handling the next request in the queue. Error 121 is EREMOTEIO, meaning that you sent a short packet at the wrong time. For example, maybe you sent a zero length packet when you shouldn't have. - Dave ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel