linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@kernel.org>
To: Tejas Joglekar <Tejas.Joglekar@synopsys.com>,
	Ran Wang <ran.wang_1@nxp.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Tejas Joglekar <Tejas.Joglekar@synopsys.com>,
	Jun Li <jun.li@nxp.com>, Peter Chen <peter.chen@nxp.com>
Cc: "linux-usb\@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable\@vger.kernel.org" <stable@vger.kernel.org>,
	Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Subject: Re: [PATCH] usb: dwc3: gadget: Fix controller get stuck when kicking extra transfer in wrong case
Date: Thu, 09 Jan 2020 11:05:30 +0200	[thread overview]
Message-ID: <87woa1rodh.fsf@kernel.org> (raw)
In-Reply-To: <9f9d0193-8fe6-33b3-4f5c-95a1181e6681@synopsys.com>

[-- Attachment #1: Type: text/plain, Size: 1214 bytes --]


Hi,

(Tejas, please break your lines at 80-columns. You shouldn't have to be
reminded of this)

Tejas Joglekar <Tejas.Joglekar@synopsys.com> writes:

> Hi,
> On 1/7/2020 12:44 PM, Ran Wang wrote:
>> According to original commit c96e6725db9d6a ("usb: dwc3: gadget: Correct the
>> logic for queuing sgs"), we would only kick off another transfer in case of
>> req->num_pending_sgs > 0.
>> 
> The commit 8c7d4b7b3d43 ("usb: dwc3: gadget: Fix logical condition")
> fixes the commit f38e35dd84e2 (usb: dwc3: gadget: split
> dwc3_gadget_ep_cleanup_completed_requests()).
>
>> However, current logic will do this as long as req->remaining > 0, this will
>> include the case of non-sgs (both dwc3_gadget_ep_request_completed(req) and
>> req->num_pending_sgs are 0) that we did not want to.
>> 
>> Without this fix, we observed dwc3 got stuck on Layerscape plaftorms (such as
>> LS1088ARDB) when enabling gadget (mass storage function) as below:
>>
> Similar issue was reported by Thinh after my fix, and he has submitted
> a patch for the same. You can refer the discussion
> https://patchwork.kernel.org/patch/11292087/.

Based on this, I'm assuming we don't need this patch.

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

      parent reply	other threads:[~2020-01-09  9:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-07  7:14 [PATCH] usb: dwc3: gadget: Fix controller get stuck when kicking extra transfer in wrong case Ran Wang
2020-01-07 10:15 ` Tejas Joglekar
2020-01-08  2:38   ` Ran Wang
2020-01-09  9:05   ` 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=87woa1rodh.fsf@kernel.org \
    --to=balbi@kernel.org \
    --cc=Tejas.Joglekar@synopsys.com \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jun.li@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=peter.chen@nxp.com \
    --cc=ran.wang_1@nxp.com \
    --cc=stable@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).