All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@kernel.org>
To: Wesley Cheng <wcheng@codeaurora.org>
Cc: gregkh@linuxfoundation.org, Thinh.Nguyen@synopsys.com,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	jackp@codeaurora.org, stable@vger.kernel.org
Subject: Re: [PATCH v5] usb: dwc3: gadget: Stop EP0 transfers during pullup disable
Date: Wed, 25 Aug 2021 08:51:08 +0300	[thread overview]
Message-ID: <874kbe6pib.fsf@kernel.org> (raw)
In-Reply-To: <20210825042855.7977-1-wcheng@codeaurora.org>


Wesley Cheng <wcheng@codeaurora.org> writes:

> During a USB cable disconnect, or soft disconnect scenario, a pending
> SETUP transaction may not be completed, leading to the following
> error:
>
>     dwc3 a600000.dwc3: timed out waiting for SETUP phase
>
> If this occurs, then the entire pullup disable routine is skipped and
> proper cleanup and halting of the controller does not complete.
>
> Instead of returning an error (which is ignored from the UDC
> perspective), allow the pullup disable routine to continue, which
> will also handle disabling of EP0/1.  This will end any active
> transfers as well.  Ensure to clear any delayed_status also, as the
> timeout could happen within the STATUS stage.
>
> Cc: <stable@vger.kernel.org>
> Fixes: bb0147364850 ("usb: dwc3: gadget: don't clear RUN/STOP when it's invalid to do so")
> Reviewed-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
> Signed-off-by: Wesley Cheng <wcheng@codeaurora.org>

Acked-by: Felipe Balbi <balbi@kernel.org>

-- 
balbi

      reply	other threads:[~2021-08-25  5:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25  4:28 [PATCH v5] usb: dwc3: gadget: Stop EP0 transfers during pullup disable Wesley Cheng
2021-08-25  5:51 ` Felipe Balbi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874kbe6pib.fsf@kernel.org \
    --to=balbi@kernel.org \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jackp@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=wcheng@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.