Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188774
b: refs/heads/master
c: beb1d35
h: refs/heads/master
v: v3
  • Loading branch information
Oliver Neukum authored and Greg Kroah-Hartman committed Mar 19, 2010
1 parent 7a69d5d commit b466207
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 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: d855fe2e9c19edaa47baba0e7f95e17f7a24dba8
refs/heads/master: beb1d35f1690fe27694472a010a8e4a9ae11cc50
7 changes: 5 additions & 2 deletions trunk/drivers/usb/class/cdc-wdm.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ MODULE_DEVICE_TABLE (usb, wdm_ids);
#define WDM_INT_STALL 5
#define WDM_POLL_RUNNING 6
#define WDM_RESPONDING 7

#define WDM_SUSPENDING 8

#define WDM_MAX 16

Expand Down Expand Up @@ -231,7 +231,8 @@ static void wdm_int_callback(struct urb *urb)
spin_lock(&desc->iuspin);
clear_bit(WDM_READ, &desc->flags);
set_bit(WDM_RESPONDING, &desc->flags);
if (!test_bit(WDM_DISCONNECTING, &desc->flags)) {
if (!test_bit(WDM_DISCONNECTING, &desc->flags)
&& !test_bit(WDM_SUSPENDING, &desc->flags)) {
rv = usb_submit_urb(desc->response, GFP_ATOMIC);
dev_dbg(&desc->intf->dev, "%s: usb_submit_urb %d",
__func__, rv);
Expand Down Expand Up @@ -800,6 +801,7 @@ static int wdm_suspend(struct usb_interface *intf, pm_message_t message)
rv = -EBUSY;
} else {
#endif
set_bit(WDM_SUSPENDING, &desc->flags);
cancel_work_sync(&desc->rxwork);
kill_urbs(desc);
#ifdef CONFIG_PM
Expand Down Expand Up @@ -830,6 +832,7 @@ static int wdm_resume(struct usb_interface *intf)
dev_dbg(&desc->intf->dev, "wdm%d_resume\n", intf->minor);
mutex_lock(&desc->lock);
rv = recover_from_urb_loss(desc);
clear_bit(WDM_SUSPENDING, &desc->flags);
mutex_unlock(&desc->lock);
return rv;
}
Expand Down

0 comments on commit b466207

Please sign in to comment.