This is a note to let you know that I've just added the patch titled
usb: chipidea: udc: don't stall endpoint if request list is empty in
isr_tr_complete_low
to the 3.5-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
usb-chipidea-udc-don-t-stall-endpoint-if-request-list-is-empty-in-isr_tr_complete_low.patch
and it can be found in the queue-3.5 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From db89960e50f45274c07dc60926b5a49489b8a7a0 Mon Sep 17 00:00:00 2001
From: Michael Grzeschik <[email protected]>
Date: Wed, 12 Sep 2012 14:58:04 +0300
Subject: usb: chipidea: udc: don't stall endpoint if request list is empty in
isr_tr_complete_low
From: Michael Grzeschik <[email protected]>
commit db89960e50f45274c07dc60926b5a49489b8a7a0 upstream.
When attaching an imx28 or imx53 in USB gadget mode to a Windows host and
starting a rndis connection we see this message every 4-10 seconds:
g_ether gadget: high speed config #2: RNDIS
Analysis shows that each time this message is printed, the rndis connection is
re-establish due to a reset because of a stalled endpoint (ep 0, dir 1). The
endpoint is stalled because the reqeust complete bit on that endpoint is set,
but in isr_tr_complete_low() the endpoint request list (mEp->qh.queue) is
empty.
This patch removed this check, because the code doesn't take the following
situation into account:
The loop over all endpoints in isr_tr_complete_handler() will call ep_nuke() on
both ep0/dir0 and ep/dir1 in the first loop. Pending reqeusts will be flushed
and completed here. There seems to be a race condition, the request is nuked,
but the request complete bit will be set, too. The subsequent check (in
ep0/dir1's loop cycle) for endpoint request list (mEp->qh.queue) empty will
fail.
Both other mainline chipidea drivers (mv_udc_core.c and fsl_udc_core.c) don't
have this check.
Signed-off-by: Michael Grzeschik <[email protected]>
Signed-off-by: Marc Kleine-Budde <[email protected]>
Signed-off-by: Alexander Shishkin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/usb/chipidea/udc.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -771,10 +771,7 @@ __acquires(mEp->lock)
{
struct ci13xxx_req *mReq, *mReqTemp;
struct ci13xxx_ep *mEpTemp = mEp;
- int uninitialized_var(retval);
-
- if (list_empty(&mEp->qh.queue))
- return -EINVAL;
+ int retval = 0;
list_for_each_entry_safe(mReq, mReqTemp, &mEp->qh.queue,
queue) {
Patches currently in stable-queue which might be from
[email protected] are
queue-3.5/usb-chipidea-udc-fix-setup-of-endpoint-maxpacket-size.patch
queue-3.5/usb-chipidea-udc-don-t-stall-endpoint-if-request-list-is-empty-in-isr_tr_complete_low.patch
queue-3.5/usb-chipidea-udc-add-pullup-fuction-needed-by-the-uvc-gadget.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html