Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 224967
b: refs/heads/master
c: 957fca9
h: refs/heads/master
i:
  224965: 7c19058
  224963: 75ed517
  224959: 3dd1b3e
v: v3
  • Loading branch information
Changli Gao authored and David S. Miller committed Dec 10, 2010
1 parent 10e2d21 commit 7fc4e82
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c6350362cbb19882ba0eb3578cc1abc07e6ea204
refs/heads/master: 957fca95e3521e471aac4c2e4cfbc21f399bdd84
14 changes: 6 additions & 8 deletions trunk/drivers/net/ifb.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ static void ri_tasklet(unsigned long dev)
txq = netdev_get_tx_queue(_dev, 0);
if ((skb = skb_peek(&dp->tq)) == NULL) {
if (__netif_tx_trylock(txq)) {
while ((skb = skb_dequeue(&dp->rq)) != NULL) {
skb_queue_tail(&dp->tq, skb);
}
skb_queue_splice_tail_init(&dp->rq, &dp->tq);
__netif_tx_unlock(txq);
} else {
/* reschedule */
Expand Down Expand Up @@ -163,7 +161,7 @@ static netdev_tx_t ifb_xmit(struct sk_buff *skb, struct net_device *dev)
netif_stop_queue(dev);
}

skb_queue_tail(&dp->rq, skb);
__skb_queue_tail(&dp->rq, skb);
if (!dp->tasklet_pending) {
dp->tasklet_pending = 1;
tasklet_schedule(&dp->ifb_tasklet);
Expand All @@ -178,8 +176,8 @@ static int ifb_close(struct net_device *dev)

tasklet_kill(&dp->ifb_tasklet);
netif_stop_queue(dev);
skb_queue_purge(&dp->rq);
skb_queue_purge(&dp->tq);
__skb_queue_purge(&dp->rq);
__skb_queue_purge(&dp->tq);
return 0;
}

Expand All @@ -188,8 +186,8 @@ static int ifb_open(struct net_device *dev)
struct ifb_private *dp = netdev_priv(dev);

tasklet_init(&dp->ifb_tasklet, ri_tasklet, (unsigned long)dev);
skb_queue_head_init(&dp->rq);
skb_queue_head_init(&dp->tq);
__skb_queue_head_init(&dp->rq);
__skb_queue_head_init(&dp->tq);
netif_start_queue(dev);

return 0;
Expand Down

0 comments on commit 7fc4e82

Please sign in to comment.