Thx dave after invoking fsg->setup,the req is not null.
I have another question: in eq0_irq routine: there are such cases:EP0_IN_DATA_PHASE,and EP0_OUT_DATA_PHASE (eg.at pxa2xx.udc).maybe for SET_DESCRIPTOR ,GET_DESCRIPTOR,etc right? and there are USB_REQ_GET_DESCRIPTOR ,USB_REQ_SET_DESCRIPTOR at standard_setup_req routine at file_storage.c ,we will use it when we invode udc->driver->setup So,i am puzzled,which way we will use? Or,we will use USB_REQ_GET_DESCRIPTOR at file_storage first, if there req(use_request) is not null,we will enter EP0_IN_DATA_PHASE case,and do read function? thx. On Mon, 2006-04-24 at 08:20 -0700, David Brownell wrote: > 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 > ------------------------------------------------------- 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