git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
net
/
core
/
netpoll.c
diff --git
a/net/core/netpoll.c
b/net/core/netpoll.c
index
9cb7818
..
ea51f8d
100644
(file)
--- a/
net/core/netpoll.c
+++ b/
net/core/netpoll.c
@@
-273,21
+273,24
@@
static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)
do {
npinfo->tries--;
do {
npinfo->tries--;
- netif_tx_lock(np->dev);
+ spin_lock(&np->dev->xmit_lock);
+ np->dev->xmit_lock_owner = smp_processor_id();
/*
* network drivers do not expect to be called if the queue is
* stopped.
*/
if (netif_queue_stopped(np->dev)) {
/*
* network drivers do not expect to be called if the queue is
* stopped.
*/
if (netif_queue_stopped(np->dev)) {
- netif_tx_unlock(np->dev);
+ np->dev->xmit_lock_owner = -1;
+ spin_unlock(&np->dev->xmit_lock);
netpoll_poll(np);
udelay(50);
continue;
}
status = np->dev->hard_start_xmit(skb, np->dev);
netpoll_poll(np);
udelay(50);
continue;
}
status = np->dev->hard_start_xmit(skb, np->dev);
- netif_tx_unlock(np->dev);
+ np->dev->xmit_lock_owner = -1;
+ spin_unlock(&np->dev->xmit_lock);
/* success */
if(!status) {
/* success */
if(!status) {
@@
-666,14
+669,14
@@
int netpoll_setup(struct netpoll *np)
printk(KERN_INFO "%s: device %s not up yet, forcing it\n",
np->name, np->dev_name);
printk(KERN_INFO "%s: device %s not up yet, forcing it\n",
np->name, np->dev_name);
- rtnl_lock();
+ rtnl_
sh
lock();
if (dev_change_flags(ndev, ndev->flags | IFF_UP) < 0) {
printk(KERN_ERR "%s: failed to open %s\n",
np->name, np->dev_name);
if (dev_change_flags(ndev, ndev->flags | IFF_UP) < 0) {
printk(KERN_ERR "%s: failed to open %s\n",
np->name, np->dev_name);
- rtnl_unlock();
+ rtnl_
sh
unlock();
goto release;
}
goto release;
}
- rtnl_unlock();
+ rtnl_
sh
unlock();
atleast = jiffies + HZ/10;
atmost = jiffies + 4*HZ;
atleast = jiffies + HZ/10;
atmost = jiffies + 4*HZ;