summaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/usbnet.c
diff options
context:
space:
mode:
authorRandy Dunlap <randy.dunlap@oracle.com>2011-05-20 18:10:04 +0200
committerRandy Dunlap <randy.dunlap@oracle.com>2011-05-20 18:10:04 +0200
commit2f3e4af471e38e0658e701973238ae4b5e50fcd6 (patch)
treefbfc99c0d975e38ff80f4ff3239a9fc0567b8a4d /drivers/net/usb/usbnet.c
parentCorrect occurrences of (diff)
parentCreate Documentation/security/, (diff)
downloadlinux-2f3e4af471e38e0658e701973238ae4b5e50fcd6.tar.xz
linux-2f3e4af471e38e0658e701973238ae4b5e50fcd6.zip
Merge branch 'docs-security' into docs-move
Diffstat (limited to 'drivers/net/usb/usbnet.c')
-rw-r--r--drivers/net/usb/usbnet.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 009bba3d753e..9ab439d144ed 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -645,6 +645,7 @@ int usbnet_stop (struct net_device *net)
struct driver_info *info = dev->driver_info;
int retval;
+ clear_bit(EVENT_DEV_OPEN, &dev->flags);
netif_stop_queue (net);
netif_info(dev, ifdown, dev->net,
@@ -1524,9 +1525,12 @@ int usbnet_resume (struct usb_interface *intf)
smp_mb();
clear_bit(EVENT_DEV_ASLEEP, &dev->flags);
spin_unlock_irq(&dev->txq.lock);
- if (!(dev->txq.qlen >= TX_QLEN(dev)))
- netif_start_queue(dev->net);
- tasklet_schedule (&dev->bh);
+
+ if (test_bit(EVENT_DEV_OPEN, &dev->flags)) {
+ if (!(dev->txq.qlen >= TX_QLEN(dev)))
+ netif_start_queue(dev->net);
+ tasklet_schedule (&dev->bh);
+ }
}
return 0;
}