From: Eric Dumazet <eric.dumazet@gmail.com>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
Hayes Wang <hayeswang@realtek.com>
Subject: Re: [PATCH net-next 6/7] r8169: missing barriers.
Date: Sat, 28 Jan 2012 10:06:46 +0100 [thread overview]
Message-ID: <1327741606.7199.0.camel@edumazet-laptop> (raw)
In-Reply-To: <20120127205843.GF24507@electric-eye.fr.zoreil.com>
Le vendredi 27 janvier 2012 à 21:58 +0100, Francois Romieu a écrit :
> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
> Cc: Hayes Wang <hayeswang@realtek.com>
> ---
> drivers/net/ethernet/realtek/r8169.c | 5 ++---
> 1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
> index 610f4b3..8dd13f5 100644
> --- a/drivers/net/ethernet/realtek/r8169.c
> +++ b/drivers/net/ethernet/realtek/r8169.c
> @@ -5552,7 +5552,7 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,
>
> if (TX_BUFFS_AVAIL(tp) < MAX_SKB_FRAGS) {
> netif_stop_queue(dev);
> - smp_rmb();
> + smp_mb();
> if (TX_BUFFS_AVAIL(tp) >= MAX_SKB_FRAGS)
> netif_wake_queue(dev);
> }
> @@ -5653,7 +5653,7 @@ static void rtl8169_tx_interrupt(struct net_device *dev,
>
> if (tp->dirty_tx != dirty_tx) {
> tp->dirty_tx = dirty_tx;
> - smp_wmb();
> + smp_mb();
> if (netif_queue_stopped(dev) &&
> (TX_BUFFS_AVAIL(tp) >= MAX_SKB_FRAGS)) {
> netif_wake_queue(dev);
> @@ -5664,7 +5664,6 @@ static void rtl8169_tx_interrupt(struct net_device *dev,
> * of start_xmit activity is detected (if it is not detected,
> * it is slow enough). -- FR
> */
> - smp_rmb();
> if (tp->cur_tx != dirty_tx)
> RTL_W8(TxPoll, NPQ);
> }
It would be good changelog explains the rationale, or you add comments
in the code.
next prev parent reply other threads:[~2012-01-28 9:06 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-27 20:54 [PATCH net-next 0/7] Pull request for r8169 branch Francois Romieu
2012-01-27 20:54 ` [PATCH net-next 1/7] r8169: remove hardcoded PCIe registers accesses Francois Romieu
2012-01-27 20:55 ` [PATCH net-next 2/7] r8169: remove rtl8169_reinit_task Francois Romieu
2012-01-27 20:56 ` [PATCH net-next 3/7] r8169: stop delaying workqueue Francois Romieu
2012-01-27 21:20 ` Joe Perches
2012-01-27 20:56 ` [PATCH net-next 4/7] r8169: factor out IntrMask writes Francois Romieu
2012-01-27 20:57 ` [PATCH net-next 5/7] r8169: irq mask helpers Francois Romieu
2012-01-27 20:58 ` [PATCH net-next 6/7] r8169: missing barriers Francois Romieu
2012-01-28 9:06 ` Eric Dumazet [this message]
2012-01-28 12:07 ` Francois Romieu
2012-01-27 20:59 ` [PATCH net-next 7/7] r8169: remove work from irq handler Francois Romieu
2012-01-28 5:41 ` Michał Mirosław
2012-01-28 8:39 ` Francois Romieu
2012-01-28 9:11 ` Michał Mirosław
2012-01-28 9:36 ` Michał Mirosław
2012-01-28 11:11 ` Francois Romieu
2012-01-28 12:12 ` Michał Mirosław
2012-01-30 17:39 ` [PATCH net-next 0/7] Pull request for r8169 branch David 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=1327741606.7199.0.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=hayeswang@realtek.com \
--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