Subject: Re: [PATCH (net.git) 5/6] stmmac: remove useless check in the stmmac_tx_clean

From: Giuseppe CAVALLARO <[email-masked]>
Date: Thu, 27 Feb 2014 10:59:01 +0100

On 2/26/2014 10:14 PM, David Miller wrote:
> From: Giuseppe Cavallaro <[email-masked]>
> 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 <[email-masked]>
>
> 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.
>
>

Ok  I will send the patches w/o the #4. Thx for your advice

peppe