* [FORCEDETH]: Fix xmit_lock/netif_tx_lock after merge
@ 2006-06-20 7:04 Herbert Xu
2006-06-20 7:10 ` David Miller
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Herbert Xu @ 2006-06-20 7:04 UTC (permalink / raw)
To: Jeff Garzik, David S. Miller, Linus Torvalds, netdev; +Cc: Ayaz Abdulla
[-- Attachment #1: Type: text/plain, Size: 518 bytes --]
Hi:
[FORCEDETH]: Fix xmit_lock/netif_tx_lock after merge
There has been an update to the forcedeth driver that added a few new
uses of xmit_lock which is no longer meant to be used directly. This
patch replaces them with netif_tx_lock_bh.
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
[-- Attachment #2: forcedeth-xmit-lock.patch --]
[-- Type: text/plain, Size: 2561 bytes --]
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 04a53f1..62b38a4 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -2991,13 +2991,13 @@ static int nv_set_settings(struct net_de
netif_carrier_off(dev);
if (netif_running(dev)) {
nv_disable_irq(dev);
- spin_lock_bh(&dev->xmit_lock);
+ netif_tx_lock_bh(dev);
spin_lock(&np->lock);
/* stop engines */
nv_stop_rx(dev);
nv_stop_tx(dev);
spin_unlock(&np->lock);
- spin_unlock_bh(&dev->xmit_lock);
+ netif_tx_unlock_bh(dev);
}
if (ecmd->autoneg == AUTONEG_ENABLE) {
@@ -3131,13 +3131,13 @@ static int nv_nway_reset(struct net_devi
netif_carrier_off(dev);
if (netif_running(dev)) {
nv_disable_irq(dev);
- spin_lock_bh(&dev->xmit_lock);
+ netif_tx_lock_bh(dev);
spin_lock(&np->lock);
/* stop engines */
nv_stop_rx(dev);
nv_stop_tx(dev);
spin_unlock(&np->lock);
- spin_unlock_bh(&dev->xmit_lock);
+ netif_tx_unlock_bh(dev);
printk(KERN_INFO "%s: link down.\n", dev->name);
}
@@ -3244,7 +3244,7 @@ static int nv_set_ringparam(struct net_d
if (netif_running(dev)) {
nv_disable_irq(dev);
- spin_lock_bh(&dev->xmit_lock);
+ netif_tx_lock_bh(dev);
spin_lock(&np->lock);
/* stop engines */
nv_stop_rx(dev);
@@ -3303,7 +3303,7 @@ static int nv_set_ringparam(struct net_d
nv_start_rx(dev);
nv_start_tx(dev);
spin_unlock(&np->lock);
- spin_unlock_bh(&dev->xmit_lock);
+ netif_tx_unlock_bh(dev);
nv_enable_irq(dev);
}
return 0;
@@ -3339,13 +3339,13 @@ static int nv_set_pauseparam(struct net_
netif_carrier_off(dev);
if (netif_running(dev)) {
nv_disable_irq(dev);
- spin_lock_bh(&dev->xmit_lock);
+ netif_tx_lock_bh(dev);
spin_lock(&np->lock);
/* stop engines */
nv_stop_rx(dev);
nv_stop_tx(dev);
spin_unlock(&np->lock);
- spin_unlock_bh(&dev->xmit_lock);
+ netif_tx_unlock_bh(dev);
}
np->pause_flags &= ~(NV_PAUSEFRAME_RX_REQ|NV_PAUSEFRAME_TX_REQ);
@@ -3729,7 +3729,7 @@ static void nv_self_test(struct net_devi
if (test->flags & ETH_TEST_FL_OFFLINE) {
if (netif_running(dev)) {
netif_stop_queue(dev);
- spin_lock_bh(&dev->xmit_lock);
+ netif_tx_lock_bh(dev);
spin_lock_irq(&np->lock);
nv_disable_hw_interrupts(dev, np->irqmask);
if (!(np->msi_flags & NV_MSI_X_ENABLED)) {
@@ -3745,7 +3745,7 @@ static void nv_self_test(struct net_devi
nv_drain_rx(dev);
nv_drain_tx(dev);
spin_unlock_irq(&np->lock);
- spin_unlock_bh(&dev->xmit_lock);
+ netif_tx_unlock_bh(dev);
}
if (!nv_register_test(dev)) {
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [FORCEDETH]: Fix xmit_lock/netif_tx_lock after merge
2006-06-20 7:04 [FORCEDETH]: Fix xmit_lock/netif_tx_lock after merge Herbert Xu
@ 2006-06-20 7:10 ` David Miller
2006-06-20 7:21 ` Jeff Garzik
2006-06-20 21:42 ` Linus Torvalds
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2006-06-20 7:10 UTC (permalink / raw)
To: herbert; +Cc: jgarzik, torvalds, netdev, aabdulla
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Tue, 20 Jun 2006 17:04:50 +1000
> [FORCEDETH]: Fix xmit_lock/netif_tx_lock after merge
Thanks for checking out that merge conflict.
Linus, please apply.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [FORCEDETH]: Fix xmit_lock/netif_tx_lock after merge
2006-06-20 7:04 [FORCEDETH]: Fix xmit_lock/netif_tx_lock after merge Herbert Xu
2006-06-20 7:10 ` David Miller
@ 2006-06-20 7:21 ` Jeff Garzik
2006-06-20 21:42 ` Linus Torvalds
2 siblings, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2006-06-20 7:21 UTC (permalink / raw)
To: Herbert Xu; +Cc: David S. Miller, Linus Torvalds, netdev, Ayaz Abdulla
Herbert Xu wrote:
> Hi:
>
> [FORCEDETH]: Fix xmit_lock/netif_tx_lock after merge
>
> There has been an update to the forcedeth driver that added a few new
> uses of xmit_lock which is no longer meant to be used directly. This
> patch replaces them with netif_tx_lock_bh.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
ACK. I'll apply, if Linus doesn't pick this up...
Jeff
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [FORCEDETH]: Fix xmit_lock/netif_tx_lock after merge
2006-06-20 7:04 [FORCEDETH]: Fix xmit_lock/netif_tx_lock after merge Herbert Xu
2006-06-20 7:10 ` David Miller
2006-06-20 7:21 ` Jeff Garzik
@ 2006-06-20 21:42 ` Linus Torvalds
2 siblings, 0 replies; 4+ messages in thread
From: Linus Torvalds @ 2006-06-20 21:42 UTC (permalink / raw)
To: Herbert Xu; +Cc: Jeff Garzik, David S. Miller, netdev, Ayaz Abdulla
On Tue, 20 Jun 2006, Herbert Xu wrote:
>
> [FORCEDETH]: Fix xmit_lock/netif_tx_lock after merge
Btw, please don't use attachments in vain. Now I can't see it by default,
I can reply and quote it etc etc.
Linus
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-06-20 21:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-20 7:04 [FORCEDETH]: Fix xmit_lock/netif_tx_lock after merge Herbert Xu
2006-06-20 7:10 ` David Miller
2006-06-20 7:21 ` Jeff Garzik
2006-06-20 21:42 ` Linus Torvalds
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).