All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: David Cohen <david.a.cohen@linux.intel.com>
Cc: Felipe Balbi <balbi@ti.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, stable@vger.kernel.org,
	Mathias Nyman <mathias.nyman@linux.intel.com>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>
Subject: Re: [PATCH] Revert "usb: dwc3: gadget: drop unnecessary loop when cleaning up TRBs"
Date: Mon, 28 Sep 2015 21:56:04 +0300	[thread overview]
Message-ID: <20150928185604.GS26517@intel.com> (raw)
In-Reply-To: <20150907065606.GA1723@kuha.fi.intel.com>

On Mon, Sep 07, 2015 at 09:56:06AM +0300, Heikki Krogerus wrote:
> Hi,
> 
> On Tue, Sep 01, 2015 at 06:37:54PM +0300, Ville Syrj�l� wrote:
> > On Tue, Sep 01, 2015 at 10:17:59AM -0500, Felipe Balbi wrote:
> > > Hi,
> > > 
> > > On Tue, Sep 01, 2015 at 05:39:28PM +0300, Ville Syrj�l� wrote:
> > > > On Tue, Sep 01, 2015 at 08:59:02AM -0500, Felipe Balbi wrote:
> > > > > Hi,
> > > > > 
> > > > > On Tue, Sep 01, 2015 at 04:17:00PM +0300, Ville Syrj�l� wrote:
> > > > > > On Mon, Aug 31, 2015 at 01:50:10PM -0500, Felipe Balbi wrote:
> > > > > > > Hi,
> > > > > > > 
> > > > > > > On Mon, Aug 31, 2015 at 08:25:10PM +0300, Ville Syrj�l� wrote:
> > > > > > > > On Mon, Aug 31, 2015 at 11:54:13AM -0500, Felipe Balbi wrote:
> > > > > > > > > On Mon, Aug 31, 2015 at 07:48:28PM +0300, ville.syrjala@linux.intel.com 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.
> > > > > > > > > 
> > > > > > > > > I have a feeling your problem is elsewhere. We *are* completing one TRB
> > > > > > > > > at a time. By reverting that commit you're just masking the real problem
> > > > > > > > > and I'd rather get that one fixed.
> > > > > > > > > 
> > > > > > > > > How do you reproduce your issue ?
> > > > > > > > 
> > > > > > > > Just boot the system, it gets an IP from dnsmasq on my host, then I ssh
> > > > > > > > into it and do something to produce a bit of console output, after which
> > > > > > > > g_ether is dead. Eg. 'dmesg' a few times is enough to kill it.
> > > > > > > 
> > > > > > > which kernel version ?
> > > > > > 
> > > > > > Anything since the patch went in, so 4.1-rc<something>
> > > > > > 
> > > > > > > Running as USB2 or USB3 ?
> > > > > > 
> > > > > > speed:480, so USB2 I presume?
> > > > > > 
> > > > > > > Have you tried
> > > > > > > linux-next ?
> > > > > > 
> > > > > > Tried it now (next-20150901). Equally bad as the rest.
> > > > > > 
> > > > > > > I just did 1000 dmesg iterations over ssh with g_ether and
> > > > > > > saw no issues.
> > > > > > > 
> > > > > > > Can you enable dwc3 tracepoints and try again ? (use some very large
> > > > > > > trace buffer, something around 2 or 4 MiB should be enough).
> > > > > > 
> > > > > > Attached one trace from linux-next, and another one with the revert on
> > > > > > top.
> > > > > 
> > > > > are you sure these come from next ?
> > > > 
> > > > Yep.
> > > > 
> > > > > It makes zero sense :-) Here's an
> > > > > odd snippet:
> > > > > 
> > > > > |             sshd-1719  [000] d.s3    42.579785: dwc3_ep_queue: ep1in: req ffff880077afa540 length 822/1514 ==> 0
> > > > > |             sshd-1719  [000] d.s3    42.580075: dwc3_ep_queue: ep1in: req ffff880077afa6c0 length 0/334 ==> -108
> > > > > |  systemd-network-1618  [003] d.s3    42.754796: dwc3_ep_queue: ep1in: req ffff880077afa780 length 0/120 ==> -108
> > > > > 
> > > > > your requests are queued with -ESHUTDOWN!!
> > > > 
> > > > Looking at the code the tracepoint is before the request is queued, so
> > > > maybe there's just stale junk in req->status before it gets overwritten
> > > > by __dwc3_gadget_ep_queue()?
> > > 
> > > right, something touched usb_request.status before and the request has
> > > been recycled.
> > > 
> > > > > more requests are queued and that's it. No further traffic. It just
> > > > > stopped working. No further IRQs, nothing.
> > > > > 
> > > > > mine looks very much different (see attached). I don't have any
> > > > > -ESHUTDOWNs. How did you load g_ether ? Did you pass any extra options ?
> > > > 
> > > > g_ether is builtin, and I just pass g_ether.dev_addr=<mac> via kernel cmdline.
> > > > 
> > > > > Which IP version are you running ?
> > > > 
> > > > ipv4
> > > 
> > > I mean the SNPS IP :-) (it's 2.10a, see below)
> > 
> > It's all Greek to me :)
> > 
> > > 
> > > > GSBUSCFG0 = 0x00000006
> > > > GSBUSCFG1 = 0x00000f00
> > > > GTXTHRCFG = 0x230a0000
> > > > GRXTHRCFG = 0x22800000
> > > > GCTL = 0x45802002
> > > > GEVTEN = 0x00000000
> > > > GSTS = 0x3e800002
> > > > GSNPSID = 0x5533210a
> > > 
> > > this could be a bug with 2.10a where completion IRQs are missed. Any
> > > chance you can look for you Errata document and see if any exist ? I'm
> > > using 2.40a.
> > 
> > Ugh. USB isn't my thing, so I'm definitely not going to start hunting down
> > any obscure docs.
> > 
> > Cc:ing Mathias and Heikki since it looks like they've touched this beast
> > before. You guys have any docs and/or clue as to what's happening here?
> 
> I don't, but maybe David knows something. I believe he has worked with
> your board in the past.

Ping. David any ideas?

-- 
Ville Syrj�l�
Intel OTC

  reply	other threads:[~2015-09-28 18:56 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ä [this message]
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

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=20150928185604.GS26517@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=balbi@ti.com \
    --cc=david.a.cohen@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@linux.intel.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 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.