From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Arlie Davis <arlied@google.com>
Cc: netdev@vger.kernel.org, linux-parisc@vger.kernel.org
Subject: Re: Bug report (with fix) for DEC Tulip driver (de2104x.c)
Date: Fri, 20 Sep 2019 12:43:53 +0200 [thread overview]
Message-ID: <20190920104353.GA10706@alpha.franken.de> (raw)
In-Reply-To: <CAK-9enMxA68mRYFG=2zD02guvCqe-aa3NO0YZuJcTdBWn5MPqg@mail.gmail.com>
On Mon, Sep 16, 2019 at 02:50:53PM -0700, Arlie Davis wrote:
> See section 4.2.2 for the specs on the transfer descriptor.
>
> Here's my patch that fixes it:
>
> diff --git a/drivers/net/ethernet/dec/tulip/de2104x.c
> b/drivers/net/ethernet/dec/tulip/de2104x.c
> index f1a2da15dd0a..3a420ceb52e5 100644
> --- a/drivers/net/ethernet/dec/tulip/de2104x.c
> +++ b/drivers/net/ethernet/dec/tulip/de2104x.c
> @@ -545,6 +545,7 @@ static void de_tx (struct de_private *de)
> while (tx_tail != tx_head) {
> struct sk_buff *skb;
> u32 status;
> + u32 control;
>
> rmb();
> status = le32_to_cpu(de->tx_ring[tx_tail].opts1);
> @@ -565,7 +566,8 @@ static void de_tx (struct de_private *de)
> pci_unmap_single(de->pdev, de->tx_skb[tx_tail].mapping,
> skb->len, PCI_DMA_TODEVICE);
>
> - if (status & LastFrag) {
> + control = le32_to_cpu(de->tx_ring[tx_tail].opts2);
> + if (control & LastFrag) {
how about just remove the complete if ? We know that we always
use one descriptor per packet and chip doesn't touch control
field. So I see no reason to check it here. Tulip driver for
2114x cards doesn't check it neither.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
prev parent reply other threads:[~2019-09-20 10:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-16 21:50 Bug report (with fix) for DEC Tulip driver (de2104x.c) Arlie Davis
2019-09-17 21:28 ` Andrew Lunn
2019-09-17 21:36 ` Arlie Davis
2019-09-17 22:51 ` John David Anglin
2019-09-18 5:56 ` Helge Deller
2019-09-18 13:27 ` Thomas Bogendoerfer
2019-10-03 1:29 ` Maciej W. Rozycki
2019-09-19 20:31 ` Sven Schnelle
2019-09-20 10:43 ` Thomas Bogendoerfer [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=20190920104353.GA10706@alpha.franken.de \
--to=tsbogend@alpha.franken.de \
--cc=arlied@google.com \
--cc=linux-parisc@vger.kernel.org \
--cc=netdev@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 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).