From: Kuninori Morimoto Date: Tue, 11 Oct 2011 05:04:53 +0000 (-0700) Subject: usb: gadget: renesas_usbhs: disable auto paket start on usbhs_pkt_push() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=654c35ab5e643aa7ff34fbc11315f4a6e3a3e1f5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git usb: gadget: renesas_usbhs: disable auto paket start on usbhs_pkt_push() Automatically packet start by usbhs_pkt_push() was useful. But the pushed packet will be called twice if new packet was pushed on usbhs_pkt :: done callback. (1st is called by usbhs_pkt_push(), 2nd is called by usbhsf_pkt_handler()) This patch disables automatic packet start, and clarified packet start timing. Signed-off-by: Kuninori Morimoto Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c index 8b40726ba966..87f56b604809 100644 --- a/drivers/usb/renesas_usbhs/fifo.c +++ b/drivers/usb/renesas_usbhs/fifo.c @@ -93,8 +93,6 @@ void usbhs_pkt_push(struct usbhs_pipe *pipe, struct usbhs_pkt *pkt, usbhs_unlock(priv, flags); /******************** spin unlock ******************/ - - usbhs_pkt_start(pipe); } static void __usbhsf_pkt_del(struct usbhs_pkt *pkt) diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c index 563128531e65..d3d833bce5f4 100644 --- a/drivers/usb/renesas_usbhs/mod_gadget.c +++ b/drivers/usb/renesas_usbhs/mod_gadget.c @@ -165,6 +165,7 @@ static void usbhsg_queue_push(struct usbhsg_uep *uep, req->status = -EINPROGRESS; usbhs_pkt_push(pipe, pkt, usbhsg_queue_done, req->buf, req->length, req->zero); + usbhs_pkt_start(pipe); dev_dbg(dev, "pipe %d : queue push (%d)\n", usbhs_pipe_number(pipe),