From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peng Fan Date: Fri, 28 Aug 2015 08:05:36 +0800 Subject: [U-Boot] [PATCH] usb: gadget: ci_udc: implement usb_ep_ops dequeue callback In-Reply-To: <55DF3576.5030308@wwwdotorg.org> References: <1440673250-17589-1-git-send-email-Peng.Fan@freescale.com> <201508271308.46472.marex@denx.de> <55DF3576.5030308@wwwdotorg.org> Message-ID: <20150828000535.GB15008@shlinux2> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Stephen, On Thu, Aug 27, 2015 at 10:06:14AM -0600, Stephen Warren wrote: >On 08/27/2015 05:08 AM, Marek Vasut wrote: >>On Thursday, August 27, 2015 at 01:00:50 PM, Peng Fan wrote: >>>Implement endpoint dequeue callback function. >>> >>>Without this function, uboot will hang when executing fastboot comamnd. >>>See following flow: >>>"fastboot_tx_write_str->fastboot_tx_write->usb_ep_dequeue->ep->ops->dequeue >>>" without implement ci_udc dequeue function, ep->ops->dequeue is NULL, then >>>uboot will hang. >>> >>>Tested on mx6qsabresd board with fastboot enabled. > >>>diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c > >>>+static int ci_ep_dequeue(struct usb_ep *_ep, struct usb_request *_req) > >>>+ if (ci_req->req.status == -EINPROGRESS) { >>>+ ci_req->req.status = -ECONNRESET; >>>+ if (ci_req->req.complete) >>>+ ci_req->req.complete(_ep, _req); >>>+ } > >Is there no need to reprogram the HW to abort the transfer? I checked linux udc driver drivers/usb/gadget/udc/fsl_qe_udc.c qe_ep_dequeue->done->usb_gadget_giveback_request->"req->complete(ep, req)" I did not see code to reprogram the HW to abort the transfer. Regards, Peng. --