]>
Commit | Line | Data |
---|---|---|
e5ccf3ff GKH |
1 | From ed797074031a37bb9bf4a70952fffc606b77274d Mon Sep 17 00:00:00 2001 |
2 | From: Johan Hovold <jhovold@gmail.com> | |
3 | Date: Mon, 26 May 2014 19:23:40 +0200 | |
4 | Subject: USB: cdc-acm: fix shutdown and suspend race | |
5 | ||
6 | From: Johan Hovold <jhovold@gmail.com> | |
7 | ||
8 | commit ed797074031a37bb9bf4a70952fffc606b77274d upstream. | |
9 | ||
10 | We should stop I/O unconditionally at suspend rather than rely on the | |
11 | tty-port initialised flag (which is set prior to stopping I/O during | |
12 | shutdown) in order to prevent suspend returning with URBs still active. | |
13 | ||
14 | Fixes: 11ea859d64b6 ("USB: additional power savings for cdc-acm devices | |
15 | that support remote wakeup") | |
16 | ||
17 | Signed-off-by: Johan Hovold <jhovold@gmail.com> | |
18 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
19 | ||
20 | --- | |
21 | drivers/usb/class/cdc-acm.c | 3 +-- | |
22 | 1 file changed, 1 insertion(+), 2 deletions(-) | |
23 | ||
24 | --- a/drivers/usb/class/cdc-acm.c | |
25 | +++ b/drivers/usb/class/cdc-acm.c | |
26 | @@ -1477,8 +1477,7 @@ static int acm_suspend(struct usb_interf | |
27 | if (cnt) | |
28 | return 0; | |
29 | ||
30 | - if (test_bit(ASYNCB_INITIALIZED, &acm->port.flags)) | |
31 | - stop_data_traffic(acm); | |
32 | + stop_data_traffic(acm); | |
33 | ||
34 | return 0; | |
35 | } |