Commit 05bb7013 authored by Yoshihiro Shimoda's avatar Yoshihiro Shimoda Committed by Greg Kroah-Hartman

usb: gadget: r8a66597-udc: fix flush fifo handling

The "BCLR" in CFIFOCTR/DnFIFOCTR can flush the fifo of "CPU side" only.
To flush the fifo of "SIE side", we have to use the "ACLRM" in PIPEnCTR.
Signed-off-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b8cbbf80
...@@ -1718,6 +1718,8 @@ static void r8a66597_fifo_flush(struct usb_ep *_ep) ...@@ -1718,6 +1718,8 @@ static void r8a66597_fifo_flush(struct usb_ep *_ep)
if (list_empty(&ep->queue) && !ep->busy) { if (list_empty(&ep->queue) && !ep->busy) {
pipe_stop(ep->r8a66597, ep->pipenum); pipe_stop(ep->r8a66597, ep->pipenum);
r8a66597_bclr(ep->r8a66597, BCLR, ep->fifoctr); r8a66597_bclr(ep->r8a66597, BCLR, ep->fifoctr);
r8a66597_write(ep->r8a66597, ACLRM, ep->pipectr);
r8a66597_write(ep->r8a66597, 0, ep->pipectr);
} }
spin_unlock_irqrestore(&ep->r8a66597->lock, flags); spin_unlock_irqrestore(&ep->r8a66597->lock, flags);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment