lkml.org 
[lkml]   [2014]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.15 017/139] usb: dwc3: gadget: clear stall when disabling endpoint
    Date
    3.15-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Felipe Balbi <balbi@ti.com>

    commit 687ef9817df7ed960d14575b9033dde3d04631fe upstream.

    so it seems like DWC3 IP doesn't clear stalls
    automatically when we disable an endpoint, because
    of that, we _must_ make sure stalls are cleared
    before clearing the proper bit in DALEPENA register.

    Reported-by: Johannes Stezenbach <js@sig21.net>
    Signed-off-by: Felipe Balbi <balbi@ti.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/usb/dwc3/gadget.c | 4 ++++
    1 file changed, 4 insertions(+)

    --- a/drivers/usb/dwc3/gadget.c
    +++ b/drivers/usb/dwc3/gadget.c
    @@ -604,6 +604,10 @@ static int __dwc3_gadget_ep_disable(stru

    dwc3_remove_requests(dwc, dep);

    + /* make sure HW endpoint isn't stalled */
    + if (dep->flags & DWC3_EP_STALL)
    + __dwc3_gadget_ep_set_halt(dep, 0);
    +
    reg = dwc3_readl(dwc->regs, DWC3_DALEPENA);
    reg &= ~DWC3_DALEPENA_EP(dep->number);
    dwc3_writel(dwc->regs, DWC3_DALEPENA, reg);



    \
     
     \ /
      Last update: 2014-06-28 21:21    [W:2.736 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site