* Re: 2.6.18-rc2 tg3 Dead loop on netdevice eth0 fix it urgently!
[not found] <20060719110439.GJ23431@puettmann.net>
@ 2006-07-19 15:30 ` Herbert Xu
2006-07-19 19:54 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Herbert Xu @ 2006-07-19 15:30 UTC (permalink / raw)
To: davem, Ruben Puettmann; +Cc: sergio, linux-kernel, netdev
Ruben Puettmann <ruben@puettmann.net> wrote:
>
> Yes But in the moment I thing I have not enough informations.
Oops, it was a thinko on my part.
[NET]: Fix reversed error test in netif_tx_trylock
A non-zero return value indicates success from spin_trylock,
not error.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 76cc099..75f02d8 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -924,10 +924,10 @@ static inline void netif_tx_lock_bh(stru
static inline int netif_tx_trylock(struct net_device *dev)
{
- int err = spin_trylock(&dev->_xmit_lock);
- if (!err)
+ int ok = spin_trylock(&dev->_xmit_lock);
+ if (likely(ok))
dev->xmit_lock_owner = smp_processor_id();
- return err;
+ return ok;
}
static inline void netif_tx_unlock(struct net_device *dev)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: 2.6.18-rc2 tg3 Dead loop on netdevice eth0 fix it urgently!
2006-07-19 15:30 ` 2.6.18-rc2 tg3 Dead loop on netdevice eth0 fix it urgently! Herbert Xu
@ 2006-07-19 19:54 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2006-07-19 19:54 UTC (permalink / raw)
To: herbert; +Cc: ruben, sergio, linux-kernel, netdev
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Thu, 20 Jul 2006 01:30:39 +1000
> [NET]: Fix reversed error test in netif_tx_trylock
>
> A non-zero return value indicates success from spin_trylock,
> not error.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Applied, thanks Herbert.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-07-19 19:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20060719110439.GJ23431@puettmann.net>
2006-07-19 15:30 ` 2.6.18-rc2 tg3 Dead loop on netdevice eth0 fix it urgently! Herbert Xu
2006-07-19 19:54 ` David Miller
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).