stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: ville.syrjala@linux.intel.com, Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] Revert "usb: dwc3: gadget: drop unnecessary loop when cleaning up TRBs"
Date: Tue, 1 Sep 2015 14:40:31 +0300	[thread overview]
Message-ID: <55E58EAF.8060502@cogentembedded.com> (raw)
In-Reply-To: <55E4A92C.70407@cogentembedded.com>

On 8/31/2015 10:21 PM, Sergei Shtylyov wrote:

>> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>
>> This reverts commit 8f2c9544aba636134303105ecb164190a39dece4.
>>
>> As it breaks g_ether on my Baytrail FFRD8 device. Everything starts out
>> fine, but after a bit of data has been transferred it just stops
>> flowing.
>>
>> Note that I do get a bunch of these "NOHZ: local_softirq_pending 08"
>> when booting the machine, but I'm not really sure if they're related
>> to this problem.
>>
>> Cc: Felipe Balbi <balbi@ti.com>
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Cc: linux-usb@vger.kernel.org
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> ---
>>   drivers/usb/dwc3/gadget.c | 37 +++++++++++++++++++++----------------
>>   1 file changed, 21 insertions(+), 16 deletions(-)
>>
>> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
>> index 333a7c0..9a5de54 100644
>> --- a/drivers/usb/dwc3/gadget.c
>> +++ b/drivers/usb/dwc3/gadget.c
>> @@ -1859,27 +1859,32 @@ static int dwc3_cleanup_done_reqs(struct dwc3 *dwc,
>> struct dwc3_ep *dep,
>>       unsigned int        i;
>>       int            ret;
>>
>> -    req = next_request(&dep->req_queued);
>> -    if (!req) {
>> -        WARN_ON_ONCE(1);
>> -        return 1;
>> -    }
>> -    i = 0;
>>       do {
>> -        slot = req->start_slot + i;
>> -        if ((slot == DWC3_TRB_NUM - 1) &&
>> +        req = next_request(&dep->req_queued);
>> +        if (!req) {
>> +            WARN_ON_ONCE(1);
>> +            return 1;
>> +        }
>> +        i = 0;
>> +        do {
>> +            slot = req->start_slot + i;
>> +            if ((slot == DWC3_TRB_NUM - 1) &&
>>                   usb_endpoint_xfer_isoc(dep->endpoint.desc))
>> -            slot++;
>> -        slot %= DWC3_TRB_NUM;
>> -        trb = &dep->trb_pool[slot];
>> +                slot++;
>> +            slot %= DWC3_TRB_NUM;
>> +            trb = &dep->trb_pool[slot];
>> +
>> +            ret = __dwc3_cleanup_done_trbs(dwc, dep, req, trb,
>> +                    event, status);
>> +            if (ret)
>> +                break;
>> +        }while (++i < req->request.num_mapped_sgs);
>
>     Space needed after }. And this *do {} while* loop seems replaceable with
> *foor* loop...

    Sorry, didn't realize it was a revert. :-/

> [...]

MBR, Sergei


      reply	other threads:[~2015-09-01 11:40 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-31 16:48 [PATCH] Revert "usb: dwc3: gadget: drop unnecessary loop when cleaning up TRBs" ville.syrjala
2015-08-31 16:54 ` Felipe Balbi
2015-08-31 17:25   ` Ville Syrjälä
2015-08-31 18:50     ` Felipe Balbi
2015-08-31 18:52       ` Felipe Balbi
2015-09-01 13:17       ` Ville Syrjälä
2015-09-01 13:59         ` Felipe Balbi
2015-09-01 14:39           ` Ville Syrjälä
2015-09-01 15:17             ` Felipe Balbi
2015-09-01 15:37               ` Ville Syrjälä
2015-09-07  6:56                 ` Heikki Krogerus
2015-09-28 18:56                   ` Ville Syrjälä
2015-09-02  8:09   ` Masakazu Mokuno
2015-09-02 12:29     ` Felipe Balbi
2015-10-12 18:37       ` Felipe Balbi
2015-11-06 12:48         ` Heikki Krogerus
2015-11-06 12:57           ` Heikki Krogerus
2015-11-06 13:31           ` Felipe Balbi
2015-08-31 19:21 ` Sergei Shtylyov
2015-09-01 11:40   ` Sergei Shtylyov [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=55E58EAF.8060502@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=balbi@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=ville.syrjala@linux.intel.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;
as well as URLs for NNTP newsgroup(s).