Thread (7 messages) 7 messages, 5 authors, 2011-11-24

RE: [PATCH] usb/fsl_udc: fix dequeuing a request in progress

From: Li Yang-R58472 <hidden>
Date: 2011-11-22 09:49:40

Subject: Re: [PATCH] usb/fsl_udc: fix dequeuing a request in progress

On Fri, Nov 11, 2011 at 08:38:13PM +0800, Li Yang wrote:
quoted
The original implementation of dequeuing a request in progress is not
correct.  Change to use a correct process and also clean up the
related functions a little bit.

Signed-off-by: Li Yang <redacted>
---
 drivers/usb/gadget/fsl_udc_core.c |   62 +++++++++++++++++-------------
------
quoted
 1 files changed, 29 insertions(+), 33 deletions(-)
diff --git a/drivers/usb/gadget/fsl_udc_core.c
b/drivers/usb/gadget/fsl_udc_core.c
index b2c44e1..beef9b7 100644
--- a/drivers/usb/gadget/fsl_udc_core.c
+++ b/drivers/usb/gadget/fsl_udc_core.c
@@ -696,12 +696,31 @@ static void fsl_free_request(struct usb_ep *_ep,
struct usb_request *_req)
quoted
 		kfree(req);
 }

-/*-------------------------------------------------------------------
------*/
+/* Actually add a dTD chain to an empty dQH and let go */ static void
+fsl_prime_ep(struct fsl_ep *ep, struct ep_td_struct *td) {
+	struct ep_queue_head *qh =3D ep->qh;
It seems to can't get the correct qh pointer, you may still need to use
below code to get it
	int i =3D ep_index(ep) * 2 + ep_is_in(ep);
	struct ep_queue_head *dQH =3D &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 work=
ing somehow.

We have initialized it in struct_ep_setup():
	ep->qh =3D &udc->ep_qh[index];

Can you do me a favor on investigating why it's failing?

Thanks,
Leo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help