@@ -269,26 +269,29 @@ static struct net_device_stats *usbnet_get_stats (struct net_device *net)
* completion callbacks. 2.5 should have fixed those bugs...
*/
static void defer_bh(struct usbnet *dev, struct sk_buff *skb, struct sk_buff_head *list)
{
unsigned long flags;
spin_lock_irqsave(&list->lock, flags);
__skb_unlink(skb, list);
spin_unlock(&list->lock);
spin_lock(&dev->done.lock);
__skb_queue_tail(&dev->done, skb);
if (dev->done.qlen == 1)
if (dev->done.qlen == 1) {
spin_unlock_irqrestore(&dev->done.lock, flags);
tasklet_schedule(&dev->bh);
return;
}
/* some work can't be done in tasklets, so we use keventd
*
* NOTE: annoying asymmetry: if it's active, schedule_work() fails,
* but tasklet_schedule() doesn't. hope the failure is rare.
void usbnet_defer_kevent (struct usbnet *dev, int work)
set_bit (work, &dev->flags);
if (!schedule_work (&dev->kevent))