Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159364
b: refs/heads/master
c: 1487cd5
h: refs/heads/master
v: v3
  • Loading branch information
Jussi Kivilinna authored and John W. Linville committed Aug 4, 2009
1 parent c0f1856 commit f2782bd
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 18 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: e40cbdac0629402a4cb0c3bca0cc19ab7a00e00d
refs/heads/master: 1487cd5e76337555737cbc55d7d83f41460d198f
32 changes: 18 additions & 14 deletions trunk/drivers/net/usb/usbnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,21 +601,25 @@ int usbnet_stop (struct net_device *net)
info->description);
}

// ensure there are no more active urbs
add_wait_queue (&unlink_wakeup, &wait);
dev->wait = &unlink_wakeup;
temp = unlink_urbs (dev, &dev->txq) + unlink_urbs (dev, &dev->rxq);

// maybe wait for deletions to finish.
while (!skb_queue_empty(&dev->rxq)
&& !skb_queue_empty(&dev->txq)
&& !skb_queue_empty(&dev->done)) {
msleep(UNLINK_TIMEOUT_MS);
if (netif_msg_ifdown (dev))
devdbg (dev, "waited for %d urb completions", temp);
if (!(info->flags & FLAG_AVOID_UNLINK_URBS)) {
/* ensure there are no more active urbs */
add_wait_queue(&unlink_wakeup, &wait);
dev->wait = &unlink_wakeup;
temp = unlink_urbs(dev, &dev->txq) +
unlink_urbs(dev, &dev->rxq);

/* maybe wait for deletions to finish. */
while (!skb_queue_empty(&dev->rxq)
&& !skb_queue_empty(&dev->txq)
&& !skb_queue_empty(&dev->done)) {
msleep(UNLINK_TIMEOUT_MS);
if (netif_msg_ifdown(dev))
devdbg(dev, "waited for %d urb completions",
temp);
}
dev->wait = NULL;
remove_wait_queue(&unlink_wakeup, &wait);
}
dev->wait = NULL;
remove_wait_queue (&unlink_wakeup, &wait);

usb_kill_urb(dev->interrupt);

Expand Down
9 changes: 6 additions & 3 deletions trunk/drivers/net/wireless/rndis_wlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2513,7 +2513,8 @@ static int rndis_wlan_stop(struct usbnet *usbdev)

static const struct driver_info bcm4320b_info = {
.description = "Wireless RNDIS device, BCM4320b based",
.flags = FLAG_WLAN | FLAG_FRAMING_RN | FLAG_NO_SETINT,
.flags = FLAG_WLAN | FLAG_FRAMING_RN | FLAG_NO_SETINT |
FLAG_AVOID_UNLINK_URBS,
.bind = rndis_wlan_bind,
.unbind = rndis_wlan_unbind,
.status = rndis_status,
Expand All @@ -2527,7 +2528,8 @@ static const struct driver_info bcm4320b_info = {

static const struct driver_info bcm4320a_info = {
.description = "Wireless RNDIS device, BCM4320a based",
.flags = FLAG_WLAN | FLAG_FRAMING_RN | FLAG_NO_SETINT,
.flags = FLAG_WLAN | FLAG_FRAMING_RN | FLAG_NO_SETINT |
FLAG_AVOID_UNLINK_URBS,
.bind = rndis_wlan_bind,
.unbind = rndis_wlan_unbind,
.status = rndis_status,
Expand All @@ -2541,7 +2543,8 @@ static const struct driver_info bcm4320a_info = {

static const struct driver_info rndis_wlan_info = {
.description = "Wireless RNDIS device",
.flags = FLAG_WLAN | FLAG_FRAMING_RN | FLAG_NO_SETINT,
.flags = FLAG_WLAN | FLAG_FRAMING_RN | FLAG_NO_SETINT |
FLAG_AVOID_UNLINK_URBS,
.bind = rndis_wlan_bind,
.unbind = rndis_wlan_unbind,
.status = rndis_status,
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/usb/usbnet.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ struct driver_info {

#define FLAG_FRAMING_AX 0x0040 /* AX88772/178 packets */
#define FLAG_WLAN 0x0080 /* use "wlan%d" names */
#define FLAG_AVOID_UNLINK_URBS 0x0100 /* don't unlink urbs at usbnet_stop() */


/* init device ... can sleep, or cause probe() failure */
Expand Down

0 comments on commit f2782bd

Please sign in to comment.