From: akpm@osdl.org
To: davem@redhat.com
Cc: jgarzik@pobox.com, netdev@oss.sgi.com, akpm@osdl.org,
jbarnes@engr.sgi.com, gnb@sgi.com, jbarnes@sgi.com
Subject: [patch 2/9] use mmiowb in tg3.c
Date: Thu, 28 Oct 2004 00:19:40 -0700 [thread overview]
Message-ID: <200410280721.i9S7Ld907983@mail.osdl.org> (raw)
From: Jesse Barnes <jbarnes@engr.sgi.com>
This patch originally from Greg Banks. Some parts of the tg3 driver depend
on PIO writes arriving in order. This patch ensures that in two key places
using the new mmiowb macro. This not only prevents bugs (the queues can be
corrupted), but is much faster than ensuring ordering using PIO reads
(which involve a few round trips to the target bus on some platforms).
Arthur has another patch that uses mmiowb in tg3 that he posted earlier as
well.
Signed-off-by: Greg Banks <gnb@sgi.com>
Signed-off-by: Jesse Barnes <jbarnes@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
25-akpm/drivers/net/tg3.c | 2 ++
1 files changed, 2 insertions(+)
diff -puN drivers/net/tg3.c~use-mmiowb-in-tg3c drivers/net/tg3.c
--- 25/drivers/net/tg3.c~use-mmiowb-in-tg3c 2004-10-28 00:17:07.520660672 -0700
+++ 25-akpm/drivers/net/tg3.c 2004-10-28 00:18:16.861119320 -0700
@@ -2730,6 +2730,7 @@ next_pkt_nopost:
tw32_rx_mbox(MAILBOX_RCV_JUMBO_PROD_IDX + TG3_64BIT_REG_LOW,
sw_idx);
}
+ mmiowb();
return received;
}
@@ -3177,6 +3178,7 @@ static int tg3_start_xmit(struct sk_buff
netif_stop_queue(dev);
out_unlock:
+ mmiowb();
spin_unlock_irqrestore(&tp->tx_lock, flags);
dev->trans_start = jiffies;
_
next reply other threads:[~2004-10-28 7:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-28 7:19 akpm [this message]
2004-10-28 23:42 ` [patch 2/9] use mmiowb in tg3.c David S. Miller
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=200410280721.i9S7Ld907983@mail.osdl.org \
--to=akpm@osdl.org \
--cc=davem@redhat.com \
--cc=gnb@sgi.com \
--cc=jbarnes@engr.sgi.com \
--cc=jbarnes@sgi.com \
--cc=jgarzik@pobox.com \
--cc=netdev@oss.sgi.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).