diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-09-01 18:02:01 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-09-01 18:02:01 -0400 |
commit | e3ee3b78f83688a0ae4315e8be71b2eac559904a (patch) | |
tree | deb03bcdd020262af450ed23382d7c921263f5cf /drivers/usb/net | |
parent | 91cb70c1769d9b72dd1efe40c31f01005820b09e (diff) | |
parent | 6b39374a27eb4be7e9d82145ae270ba02ea90dc8 (diff) |
/spare/repo/netdev-2.6 branch 'master'
Diffstat (limited to 'drivers/usb/net')
-rw-r--r-- | drivers/usb/net/usbnet.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c index 4528a00c45b0..a2f67245f6da 100644 --- a/drivers/usb/net/usbnet.c +++ b/drivers/usb/net/usbnet.c | |||
@@ -2903,19 +2903,18 @@ static struct net_device_stats *usbnet_get_stats (struct net_device *net) | |||
2903 | * completion callbacks. 2.5 should have fixed those bugs... | 2903 | * completion callbacks. 2.5 should have fixed those bugs... |
2904 | */ | 2904 | */ |
2905 | 2905 | ||
2906 | static void defer_bh (struct usbnet *dev, struct sk_buff *skb) | 2906 | static void defer_bh(struct usbnet *dev, struct sk_buff *skb, struct sk_buff_head *list) |
2907 | { | 2907 | { |
2908 | struct sk_buff_head *list = skb->list; | ||
2909 | unsigned long flags; | 2908 | unsigned long flags; |
2910 | 2909 | ||
2911 | spin_lock_irqsave (&list->lock, flags); | 2910 | spin_lock_irqsave(&list->lock, flags); |
2912 | __skb_unlink (skb, list); | 2911 | __skb_unlink(skb, list); |
2913 | spin_unlock (&list->lock); | 2912 | spin_unlock(&list->lock); |
2914 | spin_lock (&dev->done.lock); | 2913 | spin_lock(&dev->done.lock); |
2915 | __skb_queue_tail (&dev->done, skb); | 2914 | __skb_queue_tail(&dev->done, skb); |
2916 | if (dev->done.qlen == 1) | 2915 | if (dev->done.qlen == 1) |
2917 | tasklet_schedule (&dev->bh); | 2916 | tasklet_schedule(&dev->bh); |
2918 | spin_unlock_irqrestore (&dev->done.lock, flags); | 2917 | spin_unlock_irqrestore(&dev->done.lock, flags); |
2919 | } | 2918 | } |
2920 | 2919 | ||
2921 | /* some work can't be done in tasklets, so we use keventd | 2920 | /* some work can't be done in tasklets, so we use keventd |
@@ -3120,7 +3119,7 @@ block: | |||
3120 | break; | 3119 | break; |
3121 | } | 3120 | } |
3122 | 3121 | ||
3123 | defer_bh (dev, skb); | 3122 | defer_bh(dev, skb, &dev->rxq); |
3124 | 3123 | ||
3125 | if (urb) { | 3124 | if (urb) { |
3126 | if (netif_running (dev->net) | 3125 | if (netif_running (dev->net) |
@@ -3490,7 +3489,7 @@ static void tx_complete (struct urb *urb, struct pt_regs *regs) | |||
3490 | 3489 | ||
3491 | urb->dev = NULL; | 3490 | urb->dev = NULL; |
3492 | entry->state = tx_done; | 3491 | entry->state = tx_done; |
3493 | defer_bh (dev, skb); | 3492 | defer_bh(dev, skb, &dev->txq); |
3494 | } | 3493 | } |
3495 | 3494 | ||
3496 | /*-------------------------------------------------------------------------*/ | 3495 | /*-------------------------------------------------------------------------*/ |