usb: gadget: renesas_usbhs: disable auto paket start on usbhs_pkt_push()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 11 Oct 2011 05:04:53 +0000 (22:04 -0700)
committerFelipe Balbi <balbi@ti.com>
Thu, 13 Oct 2011 17:41:45 +0000 (20:41 +0300)
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 <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/renesas_usbhs/fifo.c
drivers/usb/renesas_usbhs/mod_gadget.c

index 8b40726ba9661ac939a6ee105f756c4c98899339..87f56b604809a8c09f8736aee6087ea081482d9f 100644 (file)
@@ -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)
index 563128531e659ce8f1b4c165d823eaeacb0e0e13..d3d833bce5f4af0735149f3902e656b1b0f92442 100644 (file)
@@ -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),