From: Felipe Balbi <balbi@ti.com>
To: Amit Virdi <amit.virdi@st.com>
Cc: linux-usb@vger.kernel.org, linux-omap@vger.kernel.org,
balbi@ti.com, pratyush.anand@gmail.com, ajay.khandelwal@st.com
Subject: Re: [PATCH 2/4] usb: dwc3: gadget: Stop TRB preparation after limit is reached
Date: Mon, 22 Dec 2014 10:06:26 -0600 [thread overview]
Message-ID: <20141222160626.GD12815@saruman> (raw)
In-Reply-To: <995bc6a5f9abd9a41f7229aafd1c2978b526783b.1418972323.git.amit.virdi@st.com>
[-- Attachment #1: Type: text/plain, Size: 1144 bytes --]
On Fri, Dec 19, 2014 at 12:40:16PM +0530, Amit Virdi wrote:
> When SG is used, there are two loops iterating to prepare TRBs:
> - Outer loop over the request_list
> - Inner loop over the SG list
>
> The driver must stop preparing TRBs when the max TRBs have been prepared. The
> code was missing break to get out of the outer loop.
>
> Signed-off-by: Amit Virdi <amit.virdi@st.com>
which bug is this fixing ? Which kernels are affected ? This need to be
backported to which kernel ? Which commit introduced this bug ? How can
I validate this to be a valid fix ?
> ---
> drivers/usb/dwc3/gadget.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
> index 0eec2e917994..8f65ab3a3b92 100644
> --- a/drivers/usb/dwc3/gadget.c
> +++ b/drivers/usb/dwc3/gadget.c
> @@ -900,6 +900,9 @@ static void dwc3_prepare_trbs(struct dwc3_ep *dep, bool starting)
> if (last_one)
> break;
> }
> +
> + if (last_one)
> + break;
> } else {
> dma = req->request.dma;
> length = req->request.length;
> --
> 1.8.0
>
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-12-22 16:06 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-19 7:10 [PATCH 0/4] usb: dwc3: Fixes and code cleanup Amit Virdi
2014-12-19 7:10 ` [PATCH 1/4] usb: dwc3: gadget: Fix TRB preparation during SG Amit Virdi
2014-12-22 16:04 ` Felipe Balbi
2014-12-27 7:09 ` Amit Virdi
2014-12-27 17:44 ` Felipe Balbi
2014-12-29 6:29 ` Amit Virdi
[not found] ` <cover.1418972323.git.amit.virdi-qxv4g6HH51o@public.gmane.org>
2014-12-19 7:10 ` [PATCH 2/4] usb: dwc3: gadget: Stop TRB preparation after limit is reached Amit Virdi
2014-12-22 16:06 ` Felipe Balbi [this message]
2014-12-27 7:54 ` Amit Virdi
2014-12-27 17:46 ` Felipe Balbi
2014-12-29 6:35 ` Amit Virdi
2014-12-29 17:12 ` Felipe Balbi
2014-12-30 14:41 ` Amit Virdi
2014-12-30 16:02 ` Felipe Balbi
2015-01-06 6:14 ` Amit Virdi
[not found] ` <54AB7D3F.3030809-qxv4g6HH51o@public.gmane.org>
2015-01-12 18:34 ` Felipe Balbi
2015-01-13 4:48 ` Amit Virdi
2015-01-13 16:28 ` Felipe Balbi
2015-01-14 9:09 ` Amit Virdi
2015-01-14 15:39 ` Greg KH
2014-12-19 7:10 ` [PATCH 4/4] usb: dwc3: Remove current_trb as it is unused Amit Virdi
2014-12-19 7:10 ` [PATCH 3/4] usb: dwc3: gadget: Remove redundant check Amit Virdi
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=20141222160626.GD12815@saruman \
--to=balbi@ti.com \
--cc=ajay.khandelwal@st.com \
--cc=amit.virdi@st.com \
--cc=linux-omap@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=pratyush.anand@gmail.com \
/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