usb: renesas_usbhs: fix the sequence in xfer_work()
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Thu, 12 Mar 2015 06:35:19 +0000 (15:35 +0900)
committerFelipe Balbi <balbi@ti.com>
Fri, 13 Mar 2015 15:41:12 +0000 (10:41 -0500)
This patch fixes the setup sequence in xfer_work(). Otherwise,
sometimes a usb transaction will get stuck.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/renesas_usbhs/fifo.c

index 28d10eb432d5136ea49e5c7748f50a9691d44ee4..b737661b10a24717fc0135ccce7c772c2e6d22b7 100644 (file)
@@ -822,10 +822,10 @@ static void xfer_work(struct work_struct *work)
                fifo->name, usbhs_pipe_number(pipe), pkt->length, pkt->zero);
 
        usbhs_pipe_running(pipe, 1);
-       usbhs_pipe_set_trans_count_if_bulk(pipe, pkt->trans);
-       usbhs_pipe_enable(pipe);
        usbhsf_dma_start(pipe, fifo);
+       usbhs_pipe_set_trans_count_if_bulk(pipe, pkt->trans);
        dma_async_issue_pending(chan);
+       usbhs_pipe_enable(pipe);
 }
 
 /*