提交 c9c4558f 编写于 作者: O Oliver Neukum 提交者: Greg Kroah-Hartman

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: NOliver Neukum <oneukum@suse.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 8ab10400
...@@ -305,11 +305,16 @@ static void usb_wwan_indat_callback(struct urb *urb) ...@@ -305,11 +305,16 @@ static void usb_wwan_indat_callback(struct urb *urb)
/* Resubmit urb so we continue receiving */ /* Resubmit urb so we continue receiving */
if (status != -ESHUTDOWN) { if (status != -ESHUTDOWN) {
err = usb_submit_urb(urb, GFP_ATOMIC); err = usb_submit_urb(urb, GFP_ATOMIC);
if (err && err != -EPERM) if (err) {
printk(KERN_ERR "%s: resubmit read urb failed. " if (err != -EPERM) {
"(%d)", __func__, err); printk(KERN_ERR "%s: resubmit read urb failed. "
else "(%d)", __func__, err);
/* busy also in error unless we are killed */
usb_mark_last_busy(port->serial->dev);
}
} else {
usb_mark_last_busy(port->serial->dev); usb_mark_last_busy(port->serial->dev);
}
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册