netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: peppe.cavallaro@st.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH (net.git) 5/6] stmmac: remove useless check in the stmmac_tx_clean
Date: Wed, 26 Feb 2014 16:14:22 -0500 (EST)	[thread overview]
Message-ID: <20140226.161422.431061479377150157.davem@davemloft.net> (raw)
In-Reply-To: <1393401667-6452-6-git-send-email-peppe.cavallaro@st.com>

From: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Date: Wed, 26 Feb 2014 09:01:06 +0100

> There is an useless if condition that this patch is removing
> when the driver cleans the tx resources.
> 
> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>

It is not useless, the first check is optimistic and lock free.

You must retest the condition under the lock in order to avoid
spurious wakeups.

Such a spurious wakeup could overlap another asynchronous context
filling the TX queue and sleeping it, resulting in corruption.

Furthermore, that cleanup patch in this series is absolutely not
appropriate for 'net' which is for real bug fixes only.  Specifically
I'm talking about patch #4.

  reply	other threads:[~2014-02-26 21:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-26  8:01 [PATCH (net.git) 0/6] stmmac: fix EEE and chained mode Giuseppe Cavallaro
2014-02-26  8:01 ` [PATCH (net.git) 1/6 (v2)] stmmac: disable at run-time the EEE if not supported Giuseppe Cavallaro
2014-02-26  8:01 ` [PATCH (net.git) 2/6] stmmac: fix and better tune the default buffer sizes Giuseppe Cavallaro
2014-02-26  8:01 ` [PATCH (net.git) 3/6] stmmac: dwmac-sti: fix broken STiD127 compatibility Giuseppe Cavallaro
2014-02-26  8:01 ` [PATCH (net.git) 4/6] stmmac: dwmac-sti: remove useless tx_retime_srcs Giuseppe Cavallaro
2014-02-26  8:01 ` [PATCH (net.git) 5/6] stmmac: remove useless check in the stmmac_tx_clean Giuseppe Cavallaro
2014-02-26 21:14   ` David Miller [this message]
2014-02-27  9:59     ` Giuseppe CAVALLARO
2014-02-26  8:01 ` [PATCH (net.git) 6/6] stmmac: fix chained mode Giuseppe Cavallaro
  -- strict thread matches above, loose matches on Subject: below --
2014-02-25  9:58 [PATCH (net.git) 1/6] stmmac: disable at run-time the EEE if not supported Giuseppe Cavallaro
2014-02-25  9:58 ` [PATCH (net.git) 5/6] stmmac: remove useless check in the stmmac_tx_clean Giuseppe Cavallaro

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=20140226.161422.431061479377150157.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.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).