lkml.org 
[lkml]   [2019]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH 3.16 232/305] Revert "usb: dwc3: gadget: skip Set/Clear Halt when invalid"
    3.16.63-rc1 review patch.  If anyone has any objections, please let me know.

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

    From: Felipe Balbi <felipe.balbi@linux.intel.com>

    commit 38317f5c0f2faae5110854f36edad810f841d62f upstream.

    This reverts commit ffb80fc672c3a7b6afd0cefcb1524fb99917b2f3.

    Turns out that commit is wrong. Host controllers are allowed to use
    Clear Feature HALT as means to sync data toggle between host and
    periperal.

    Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
    [bwh: Backported to 3.16: adjust context]
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    ---
    drivers/usb/dwc3/gadget.c | 5 -----
    1 file changed, 5 deletions(-)

    --- a/drivers/usb/dwc3/gadget.c
    +++ b/drivers/usb/dwc3/gadget.c
    @@ -1346,9 +1346,6 @@ int __dwc3_gadget_ep_set_halt(struct dwc
    memset(&params, 0x00, sizeof(params));

    if (value) {
    - if (dep->flags & DWC3_EP_STALL)
    - return 0;
    -
    if (!protocol && ((dep->direction && dep->flags & DWC3_EP_BUSY) ||
    (!list_empty(&dep->req_queued) ||
    !list_empty(&dep->request_list)))) {
    @@ -1365,9 +1362,6 @@ int __dwc3_gadget_ep_set_halt(struct dwc
    else
    dep->flags |= DWC3_EP_STALL;
    } else {
    - if (!(dep->flags & DWC3_EP_STALL))
    - return 0;
    -
    ret = dwc3_send_gadget_ep_cmd(dwc, dep->number,
    DWC3_DEPCMD_CLEARSTALL, &params);
    if (ret)
    \
     
     \ /
      Last update: 2019-02-03 15:21    [W:2.635 / U:0.312 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site