Hello.
Felipe Balbi wrote:
here are the fixes for next rc cycle.
Ming Lei (6):
usb: musb: gadget: fix kernel panic if using out ep with FIFO_TXRX
style
usb: musb: gadget: fix bulk IN infinit hangs in double buffer case
usb: musb: gadget: enable autoclear for OUT transfer in both DMA 0
and DMA 1
usb: musb: gadget: fix DMA length for OUT transfer
usb: musb: gadget: complete request only if data is transfered over
usb: musb: gadget: fix dma length in txstate
Santosh Shilimkar (1):
usb: musb: host: Issue a memory barrier before starting DMA
Felipe, where's my regression fix? Greg didn't have problems with
it...
you mean:
commit 2f3bd798c231e982cc98d38abbda8fe5b2905ced
Author: Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx>
Date: Sat Sep 11 13:23:12 2010 -0500
usb: musb: gadget: restart request on clearing endpoint halt
Commit 46034dca515bc4ddca0399ae58106d1f5f0d809f (USB:
musb_gadget_ep0: stop
abusing musb_gadget_set_halt()) forgot to restart a queued request
after
clearing the endpoint halt feature. This results in a couple of USB
resets
while enumerating the file-backed storage gadget due to CSW packet
not being
sent for the MODE SENSE(10) command.
Signed-off-by: Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx>
Cc: stable@xxxxxxxxxx
Signed-off-by: Felipe Balbi <balbi@xxxxxx>
Yes.
my bad, here it is:
8<---------------------------------------------------------------------------
From 2f3bd798c231e982cc98d38abbda8fe5b2905ced Mon Sep 17 00:00:00 2001
From: Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx>
Date: Sat, 11 Sep 2010 13:23:12 -0500
Subject: [PATCH] usb: musb: gadget: restart request on clearing endpoint
halt
Organization: Texas Instruments\n
Commit 46034dca515bc4ddca0399ae58106d1f5f0d809f (USB: musb_gadget_ep0: stop
abusing musb_gadget_set_halt()) forgot to restart a queued request after
clearing the endpoint halt feature. This results in a couple of USB resets
while enumerating the file-backed storage gadget due to CSW packet not
being
sent for the MODE SENSE(10) command.
Signed-off-by: Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx>
Cc: stable@xxxxxxxxxx
Signed-off-by: Felipe Balbi <balbi@xxxxxx>
---
drivers/usb/musb/musb_gadget.c | 2 +-
drivers/usb/musb/musb_gadget.h | 2 ++
drivers/usb/musb/musb_gadget_ep0.c | 9 +++++++++
3 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/musb/musb_gadget.c
b/drivers/usb/musb/musb_gadget.c
index cacae96..d065e23 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -1084,7 +1084,7 @@ struct free_record {
/*
* Context: controller locked, IRQs blocked.
*/
-static void musb_ep_restart(struct musb *musb, struct musb_request *req)
+void musb_ep_restart(struct musb *musb, struct musb_request *req)
{
DBG(3, "<== %s request %p len %u on hw_ep%d\n",
req->tx ? "TX/IN" : "RX/OUT",
diff --git a/drivers/usb/musb/musb_gadget.h
b/drivers/usb/musb/musb_gadget.h
index c8b1403..572b1da 100644
--- a/drivers/usb/musb/musb_gadget.h
+++ b/drivers/usb/musb/musb_gadget.h
@@ -105,4 +105,6 @@ extern void musb_gadget_cleanup(struct musb *);
extern void musb_g_giveback(struct musb_ep *, struct usb_request *, int);
+extern void musb_ep_restart(struct musb *, struct musb_request *);
+
#endif /* __MUSB_GADGET_H */
diff --git a/drivers/usb/musb/musb_gadget_ep0.c
b/drivers/usb/musb/musb_gadget_ep0.c
index 59bef8f..6dd03f4 100644
--- a/drivers/usb/musb/musb_gadget_ep0.c
+++ b/drivers/usb/musb/musb_gadget_ep0.c
@@ -261,6 +261,7 @@ __acquires(musb->lock)
ctrlrequest->wIndex & 0x0f;
struct musb_ep *musb_ep;
struct musb_hw_ep *ep;
+ struct musb_request *request;
void __iomem *regs;
int is_in;
u16 csr;
@@ -302,6 +303,14 @@ __acquires(musb->lock)
musb_writew(regs, MUSB_RXCSR, csr);
}
+ /* Maybe start the first request in the queue */
+ request = to_musb_request(
+ next_request(musb_ep));
+ if (!musb_ep->busy && request) {
+ DBG(3, "restarting the request\n");
+ musb_ep_restart(musb, request);
+ }
+
/* select ep0 again */
musb_ep_select(mbase, 0);
} break;
Unfortunately, it's whitespace-damaged.
WBR, Sergei
--
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