musb_gadget_dequeue() doesn't start the next request when dequeuing the current one, but quite obviously it should... Signed-off-by: Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx> --- This patch is against the recent Linus' tree. drivers/usb/musb/musb_gadget.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) Index: usb-2.6/drivers/usb/musb/musb_gadget.c =================================================================== --- usb-2.6.orig/drivers/usb/musb/musb_gadget.c +++ usb-2.6/drivers/usb/musb/musb_gadget.c @@ -1262,11 +1262,13 @@ static int musb_gadget_dequeue(struct us } /* if the hardware doesn't have the request, easy ... */ - if (musb_ep->req_list.next != &request->list || musb_ep->busy) + if (musb_ep->req_list.next != &request->list || musb_ep->busy) { musb_g_giveback(musb_ep, request, -ECONNRESET); + goto done; + } - /* ... else abort the dma transfer ... */ - else if (is_dma_capable() && musb_ep->dma) { + /* ... else abort the DMA transfer ... */ + if (is_dma_capable() && musb_ep->dma) { struct dma_controller *c = musb->dma_controller; musb_ep_select(musb->mregs, musb_ep->current_epnum); @@ -1274,13 +1276,17 @@ static int musb_gadget_dequeue(struct us status = c->channel_abort(musb_ep->dma); else status = -EBUSY; - if (status == 0) - musb_g_giveback(musb_ep, request, -ECONNRESET); - } else { + } + + if (status == 0) { /* NOTE: by sticking to easily tested hardware/driver states, * we leave counting of in-flight packets imprecise. */ musb_g_giveback(musb_ep, request, -ECONNRESET); + + request = next_request(musb_ep); + if (request) + musb_ep_restart(musb, to_musb_request(request)); } done: -- 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