From: David Woodhouse <dwmw2@infradead.org>
To: netdev@vger.kernel.org
Cc: romieu@fr.zoreil.com, jasowang@redhat.com, gilboad@gmail.com,
jgarzik@redhat.com, nathan@traverse.com.au
Subject: Re: 8139cp TX stall, timeout, failed recovery
Date: Sat, 24 Nov 2012 21:39:37 +0000 [thread overview]
Message-ID: <1353793177.26346.283.camel@shinybook.infradead.org> (raw)
In-Reply-To: <1353782365.26346.266.camel@shinybook.infradead.org>
[-- Attachment #1: Type: text/plain, Size: 1672 bytes --]
On Sat, 2012-11-24 at 18:39 +0000, David Woodhouse wrote:
> This seems to be a consistent pattern — when we get that 0x0080
> interrupt and it dies, it's *very* soon after queueing a new tx:
Once I realise that the 'tx queued' message actually prints the number
of the *next* slot that'll be used, not the slot that was just filled,
that becomes obvious. The hardware takes only 30µs or so to consume the
descriptor that was just submitted. It isn't just coincidence that one
packet completes just as the *next* one is being submitted, as I
originally thought.
The hardware seems to asserts the 0x80 'Tx Descriptor Unavailable'
interrupt first, and the other bits (0x404) come later. I *often* get
into cp_tx() with only 0x80 in the IntrStatus bits, and the other bits
are often set before my heavily-debug-laden cp_tx() has even finished
running).
Register 0x82 indicates the low bits of the address of the most recently
consumed Tx descriptor, and always seems to agree with the driver's
processing of the ring. When we get a 0x80 interrupt, the most recently
consumed descriptor is always the one before tx_head, as you'd expect.
And tx_head always looks sane and (as long as you read it quickly) still
has the 'Own' bit set, as it should.
Eventually I get a 0x80 interrupt which *isn't* immediately followed by
the other 0x404 bits. And then the hardware has crapped itself and is no
longer eating descriptors. We submit more to the queue and we bang on
the TxPoll register *every* time, but that doesn't wake it.
Adding a cp_enable_irq() into the cp_tx_timeout() function at least
makes it recover *eventually*.
--
dwmw2
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 6171 bytes --]
prev parent reply other threads:[~2012-11-24 21:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-24 18:39 8139cp TX stall, timeout, failed recovery David Woodhouse
2012-11-24 21:33 ` Francois Romieu
2012-11-24 22:11 ` [PATCH] 8139cp: re-enable interrupts after tx timeout David Woodhouse
2012-11-24 22:58 ` Francois Romieu
2012-11-24 23:27 ` David Woodhouse
2012-11-25 22:43 ` Francois Romieu
2012-11-25 20:57 ` David Miller
2012-11-24 21:39 ` David Woodhouse [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=1353793177.26346.283.camel@shinybook.infradead.org \
--to=dwmw2@infradead.org \
--cc=gilboad@gmail.com \
--cc=jasowang@redhat.com \
--cc=jgarzik@redhat.com \
--cc=nathan@traverse.com.au \
--cc=netdev@vger.kernel.org \
--cc=romieu@fr.zoreil.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).