diff mbox

[2/2] usb: renesas_usbhs: disable tx irq before starting TX DMAC transfer

Message ID 1457416681-7516-3-git-send-email-yoshihiro.shimoda.uh@renesas.com (mailing list archive)
State Superseded
Delegated to: Geert Uytterhoeven
Headers show

Commit Message

Yoshihiro Shimoda March 8, 2016, 5:58 a.m. UTC
This patch adds a code to surely disable tx irq of the pipe before
starting TX DMAC transfer. Otherwise, a lot of unnecessary tx irqs
may heppen in rare cases when DMAC is used.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
 drivers/usb/renesas_usbhs/fifo.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Sergei Shtylyov March 9, 2016, 1:19 p.m. UTC | #1
Hello.

On 3/8/2016 8:58 AM, Yoshihiro Shimoda wrote:

> This patch adds a code to surely disable tx irq of the pipe before

    TX IRQ.

> starting TX DMAC transfer. Otherwise, a lot of unnecessary tx irqs

    TX IRQs. Mixing "TX" and "tx" on a single line is... inconsistent. :-)

> may heppen in rare cases when DMAC is used.

    Happen.

>
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
[...]

MBR, Sergei
Yoshihiro Shimoda March 10, 2016, 2:25 a.m. UTC | #2
Hello,

> Hello.
> 
> On 3/8/2016 8:58 AM, Yoshihiro Shimoda wrote:
> 
> > This patch adds a code to surely disable tx irq of the pipe before
> 
>     TX IRQ.
> 
> > starting TX DMAC transfer. Otherwise, a lot of unnecessary tx irqs
> 
>     TX IRQs. Mixing "TX" and "tx" on a single line is... inconsistent. :-)
> 
> > may heppen in rare cases when DMAC is used.
> 
>     Happen.

Thank you for the comment.
I will fix them in v2 patch.

Best regards,
Yoshihiro Shimoda

> >
> > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> [...]
> 
> MBR, Sergei
diff mbox

Patch

diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c
index 0c25c01..000f975 100644
--- a/drivers/usb/renesas_usbhs/fifo.c
+++ b/drivers/usb/renesas_usbhs/fifo.c
@@ -890,6 +890,7 @@  static int usbhsf_dma_prepare_push(struct usbhs_pkt *pkt, int *is_done)
 
 	pkt->trans = len;
 
+	usbhsf_tx_irq_ctrl(pipe, 0);
 	INIT_WORK(&pkt->work, xfer_work);
 	schedule_work(&pkt->work);