aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorOliver Neukum <oliver@neukum.org>2011-02-10 09:33:10 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-02-17 13:51:11 -0500
commitc9c4558f7874676e31ea7a74caafcf09ebbc03ed (patch)
treebb42c86cc0768f9671b22573704503b68f6e6c62 /drivers
parent8ab10400a037a516cc846c338f879e5bd62497ce (diff)
usb_wwan: fix error in marking device busy
This fixes two errors: - the device is busy if a message was recieved even if resubmission fails - the device is not busy if resubmission fails due to -EPERM Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/serial/usb_wwan.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c
index b004b2a485c..7bd06854f87 100644
--- a/drivers/usb/serial/usb_wwan.c
+++ b/drivers/usb/serial/usb_wwan.c
@@ -305,11 +305,16 @@ static void usb_wwan_indat_callback(struct urb *urb)
305 /* Resubmit urb so we continue receiving */ 305 /* Resubmit urb so we continue receiving */
306 if (status != -ESHUTDOWN) { 306 if (status != -ESHUTDOWN) {
307 err = usb_submit_urb(urb, GFP_ATOMIC); 307 err = usb_submit_urb(urb, GFP_ATOMIC);
308 if (err && err != -EPERM) 308 if (err) {
309 printk(KERN_ERR "%s: resubmit read urb failed. " 309 if (err != -EPERM) {
310 "(%d)", __func__, err); 310 printk(KERN_ERR "%s: resubmit read urb failed. "
311 else 311 "(%d)", __func__, err);
312 /* busy also in error unless we are killed */
313 usb_mark_last_busy(port->serial->dev);
314 }
315 } else {
312 usb_mark_last_busy(port->serial->dev); 316 usb_mark_last_busy(port->serial->dev);
317 }
313 } 318 }
314 319
315 } 320 }