aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/sierra.c
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2014-05-26 13:23:03 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-27 18:04:04 -0400
commita283d080a49a5014f525bf722e5a6a07835e45ef (patch)
treed61b4d225b95cc1eb6d21805fff7a119a0591395 /drivers/usb/serial/sierra.c
parent40d88983cee801cb9aef00e514b3ebf3a51f6c7e (diff)
USB: sierra: do not resume I/O on closed ports
Do not resume any I/O, including the delayed write queue, on closed ports. Note that this currently has no functional impact due to the usb_autopm_get_interface() in close(), but that call is about to be removed by a follow-up patch. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/sierra.c')
-rw-r--r--drivers/usb/serial/sierra.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index 74b417c91e30..ac5e20d9bd24 100644
--- a/drivers/usb/serial/sierra.c
+++ b/drivers/usb/serial/sierra.c
@@ -1013,7 +1013,7 @@ static int sierra_resume(struct usb_serial *serial)
1013 port = serial->port[i]; 1013 port = serial->port[i];
1014 portdata = usb_get_serial_port_data(port); 1014 portdata = usb_get_serial_port_data(port);
1015 1015
1016 if (!portdata) 1016 if (!portdata || !portdata->opened)
1017 continue; 1017 continue;
1018 1018
1019 while ((urb = usb_get_from_anchor(&portdata->delayed))) { 1019 while ((urb = usb_get_from_anchor(&portdata->delayed))) {
@@ -1036,11 +1036,9 @@ static int sierra_resume(struct usb_serial *serial)
1036 } 1036 }
1037 } 1037 }
1038 1038
1039 if (portdata->opened) { 1039 err = sierra_submit_rx_urbs(port, GFP_ATOMIC);
1040 err = sierra_submit_rx_urbs(port, GFP_ATOMIC); 1040 if (err)
1041 if (err) 1041 ec++;
1042 ec++;
1043 }
1044 } 1042 }
1045 intfdata->suspended = 0; 1043 intfdata->suspended = 0;
1046 spin_unlock_irq(&intfdata->susp_lock); 1044 spin_unlock_irq(&intfdata->susp_lock);