From: "Ivan G." <ivangurdiev@linuxfreemail.com>
To: Roger Luethi <rl@hellgate.ch>
Cc: LKML <linux-kernel@vger.kernel.org>,
Urban Widmark <urban@teststation.com>,
Jeff Garzik <jgarzik@mandrakesoft.com>
Subject: Re: [PATCH] VIA Rhine stalls: TxAbort handling
Date: Mon, 13 May 2002 17:51:22 -0600 [thread overview]
Message-ID: <02051317475500.00917@cobra.linux> (raw)
In-Reply-To: <20020514035318.GA20088@k3.hellgate.ch>
On Monday 13 May 2002 09:53 pm, you wrote:
> I don't know how many time-out problems exist in via-rhine.c, but the patch
> below fixes at least one of them. It works for my VT6102 based card. I hope
> some of you can confirm the fix (or let me know what other chips I broke).
My card behaves as unpredictably as always.
Sometimes it works fine for relatively long periods of time (2mins+ :) )
and sometimes it stalls dead on the first 100K.
So....
I've learned not to trust that card regarding anything..
Let's look at the code instead.
> - Recover gracefully from TxAbort (the actual fix)
Some time ago, I asked Becker about this same piece of code in the Linuxfet
driver pertaining to IntrTxUnderrun. They recover in such a way for both
Underrun and Abort. And here's what he said:
<QUOTE>
> if (txstatus & 0x0800) {
> /* uderrun happen */
> np->tx_ring[entry].tx_status = cpu_to_le32(DescOwn);
> writel(virt_to_bus(&np->tx_ring[entry]), ioaddr + TxRingPtr);
This is backing up the Tx pointer to retransmit the failed packet.
My original driver did not do this -- I believe that it's semantically
wrong.
I write my drivers to always fail the current transmit attempt on Tx
Abort. Ethernet uses dropped packets on severe overload (16 collision
abort) to provide flow control to the protocol layers. If you back up
and attempt to retransmit the same packet you defeat this element of the
protocol. It's an atypical case, but Ethernet works where Aloha fails
because it gets the rare cases right.
</QUOTE>
I don't know if he's right or wrong.
I have tried the code. I got different results with different combinations of
recovery from Underrun and Abort. I think I was able to get some improvement
on the stall issue with one of them, but then speed went down, as you
acknowledge. A friend also verified that some time ago:
<QUOTE>
with patch:
transmit and receive speeds are slow but steady, no stalling
without patch:
transmit speeds are fast but have occasional stalls... overall, its probably
the same speed as with the patch
</QUOTE>
So, given what Becker said and the completely random behavior of my card,
I decided to stay away from the abort handling. You can figure out if it's
the proper thing to do.
Speaking of VIA Rhine Cards....
THIS:
if (chip_id == VT86C100A) {
/* More recent docs say that this bit is reserved ... */
n = inb(ioaddr + ConfigA) | 0x20;
outb(n, ioaddr + ConfigA);
is not right, as the comment also explains...
So what should be done here instead??
Ivan G, tested with a Rhine-I card (VT86C100A)
next prev parent reply other threads:[~2002-05-14 5:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-14 3:53 [PATCH] VIA Rhine stalls: TxAbort handling Roger Luethi
2002-05-13 23:51 ` Ivan G. [this message]
2002-05-14 17:28 ` Urban Widmark
2002-05-16 0:49 ` Roger Luethi
2002-05-15 21:52 ` Ivan G.
2002-05-16 14:19 ` Roger Luethi
2002-05-14 0:03 ` Ivan G.
2002-05-14 14:11 ` Jeff Garzik
2002-05-14 15:08 ` Roger Luethi
2002-05-14 17:47 ` Urban Widmark
2002-05-16 0:51 ` Roger Luethi
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=02051317475500.00917@cobra.linux \
--to=ivangurdiev@linuxfreemail.com \
--cc=jgarzik@mandrakesoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rl@hellgate.ch \
--cc=urban@teststation.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