]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
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)
committerWilly Tarreau <w@1wt.eu>
Wed, 1 Nov 2017 21:12:42 +0000 (22:12 +0100)
commit 9b53d9af7aac09cf249d72bfbf15f08e47c4f7fe upstream.

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>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/usb/renesas_usbhs/fifo.c

index c531026b826784343eed9cc7550cd01e6a3f5099..0c2825b3e2b2aadde763ae927a04e1032258bd92 100644 (file)
@@ -814,10 +814,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);
 }
 
 /*