Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248739
b: refs/heads/master
c: d771d8a
h: refs/heads/master
i:
  248737: 985eeb9
  248735: 5509f75
v: v3
  • Loading branch information
Oliver Neukum authored and Greg Kroah-Hartman committed Apr 30, 2011
1 parent 2c6e04f commit 788c5bd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b4026c4584cd70858d4d3450abfb1cd0714d4f32
refs/heads/master: d771d8aa37805f5bf75808b12b737f39ee97f5d4
14 changes: 14 additions & 0 deletions trunk/drivers/usb/class/cdc-wdm.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,8 @@ static int wdm_open(struct inode *inode, struct file *file)

mutex_lock(&desc->lock);
if (!desc->count++) {
desc->werr = 0;
desc->rerr = 0;
rv = usb_submit_urb(desc->validity, GFP_KERNEL);
if (rv < 0) {
desc->count--;
Expand Down Expand Up @@ -853,6 +855,18 @@ static int wdm_pre_reset(struct usb_interface *intf)
struct wdm_device *desc = usb_get_intfdata(intf);

mutex_lock(&desc->lock);
kill_urbs(desc);

/*
* we notify everybody using poll of
* an exceptional situation
* must be done before recovery lest a spontaneous
* message from the device is lost
*/
spin_lock_irq(&desc->iuspin);
desc->rerr = -EINTR;
spin_unlock_irq(&desc->iuspin);
wake_up_all(&desc->wait);
return 0;
}

Expand Down

0 comments on commit 788c5bd

Please sign in to comment.