On Saturday 22 April 2006 10:49 pm, Peter.Chen wrote: > > I can get the ep0->name which i assigned at static unsigned __init > dm320_ep_setup routine.But list_empty(&ep0->queue)) is true,it means > there is no item at ep0 list.I do INIT_LIST_HEAD(&ep->queue) for every > ep.Why this would happen?
Right, there's at most one entry in that queue. The event sequence is: (1) EP0 IRQ for SETUP packet (2) IRQ handler readds that packet, issues setup() to gadget driver (3) setup() either: * returns negative/error, causing immediate protocol stall * calls usb_ep_set_halt(), either immediately or later after returning 0/in-progress ... also causes a protocol stall * calls usb_ep_queue(), either immediately or later after returning 0/in-progress ... reads or writes that data buffer, then reports completion of that single usb_request. (4) EP0 IRQs for DATA packet(s), if any, to load/unload the buffer (5) EP0 IRQs for STATUS transfer You imply you're at (2), without having issued the setup() upcall yet. > I look through other udc programs(i base on them) at kernel tree,i find > there is not place to add item for ep list except for xxx_ep_quene > routine,as there > are: > if (likely (req != 0)) > list_add_tail(&req->queue, &ep->queue); > Then,then the xxx_ep_quene will be invoked? See above; yes, all the gadget drivers call that in response to setup(). Sounds like you're not doing that upcall. - 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