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]
/
drivers
/
net
/
ifb.c
diff --git
a/drivers/net/ifb.c
b/drivers/net/ifb.c
index
43e3f33
..
31fb2d7
100644
(file)
--- a/
drivers/net/ifb.c
+++ b/
drivers/net/ifb.c
@@
-27,6
+27,7
@@
*/
*/
+#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/netdevice.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/netdevice.h>
@@
-75,13
+76,13
@@
static void ri_tasklet(unsigned long dev)
dp->st_task_enter++;
if ((skb = skb_peek(&dp->tq)) == NULL) {
dp->st_txq_refl_try++;
dp->st_task_enter++;
if ((skb = skb_peek(&dp->tq)) == NULL) {
dp->st_txq_refl_try++;
- if (
netif_tx_trylock(_dev
)) {
+ if (
spin_trylock(&_dev->xmit_lock
)) {
dp->st_rxq_enter++;
while ((skb = skb_dequeue(&dp->rq)) != NULL) {
skb_queue_tail(&dp->tq, skb);
dp->st_rx2tx_tran++;
}
dp->st_rxq_enter++;
while ((skb = skb_dequeue(&dp->rq)) != NULL) {
skb_queue_tail(&dp->tq, skb);
dp->st_rx2tx_tran++;
}
-
netif_tx_unlock(_dev
);
+
spin_unlock(&_dev->xmit_lock
);
} else {
/* reschedule */
dp->st_rxq_notenter++;
} else {
/* reschedule */
dp->st_rxq_notenter++;
@@
-109,7
+110,7
@@
static void ri_tasklet(unsigned long dev)
}
}
}
}
- if (
netif_tx_trylock(_dev
)) {
+ if (
spin_trylock(&_dev->xmit_lock
)) {
dp->st_rxq_check++;
if ((skb = skb_peek(&dp->rq)) == NULL) {
dp->tasklet_pending = 0;
dp->st_rxq_check++;
if ((skb = skb_peek(&dp->rq)) == NULL) {
dp->tasklet_pending = 0;
@@
-117,10
+118,10
@@
static void ri_tasklet(unsigned long dev)
netif_wake_queue(_dev);
} else {
dp->st_rxq_rsch++;
netif_wake_queue(_dev);
} else {
dp->st_rxq_rsch++;
-
netif_tx_unlock(_dev
);
+
spin_unlock(&_dev->xmit_lock
);
goto resched;
}
goto resched;
}
-
netif_tx_unlock(_dev
);
+
spin_unlock(&_dev->xmit_lock
);
} else {
resched:
dp->tasklet_pending = 1;
} else {
resched:
dp->tasklet_pending = 1;
@@
-271,7
+272,6
@@
static int __init ifb_init_module(void)
for (i = 0; i < numifbs && !err; i++)
err = ifb_init_one(i);
if (err) {
for (i = 0; i < numifbs && !err; i++)
err = ifb_init_one(i);
if (err) {
- i--;
while (--i >= 0)
ifb_free_one(i);
}
while (--i >= 0)
ifb_free_one(i);
}