On Tue, Nov 22, 2011 at 7:48 PM, Peter Chen <hzpeterchen@xxxxxxxxx> wrote: >>>It seems to can't get the correct qh pointer, you may still need to use >>>below code to get it >>> int i = ep_index(ep) * 2 + ep_is_in(ep); >>> struct ep_queue_head *dQH = &ep->udc->ep_qh[i]; >> >> Thanks for trying. It will be much easier if we can dereference QH from the ep structure. It is really strange that the ep->qh pointer is not working somehow. >> > > Seems only ep0-out's qh pointer is assigned at ep structure. > At probe: > /* setup udc->eps[] for ep0 */ > struct_ep_setup(udc_controller, 0, "ep0", 0); > > >> We have initialized it in struct_ep_setup(): >> ep->qh = &udc->ep_qh[index]; >> >> Can you do me a favor on investigating why it's failing? >> Leo, I have debugged this issue at my board just now, the reason of failure is we only have one ep struct for ep0, so when talking about ep0, it always pointers to udc->ep[0]. So even we initialize the current qh address for ep0in at probe, it still can't get the ep0in's qh address through ep structure, as ep0 is always udc->ep[0]. >> Thanks, >> Leo >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-usb" in >> the body of a message to majordomo@xxxxxxxxxxxxxxx >> More majordomo info at http://vger.kernel.org/majordomo-info.html >> > > > > -- > BR, > Peter Chen > -- BR, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html