]> 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)
committerSasha Levin <alexander.levin@verizon.com>
Mon, 22 Aug 2016 16:23:01 +0000 (12:23 -0400)
[ Upstream commit 9b53d9af7aac09cf249d72bfbf15f08e47c4f7fe ]

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: Sasha Levin <alexander.levin@verizon.com>
drivers/usb/renesas_usbhs/fifo.c

index e5f429ee7a895aba02b7f74517c1e9722733feca..8e98d98412bb604fdda9a9af2b89c2d3d4a74c36 100644 (file)
@@ -858,10 +858,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);
 }
 
 /*