Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9c4558f authored by Oliver Neukum's avatar Oliver Neukum Committed by Greg Kroah-Hartman
Browse files

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: default avatarOliver Neukum <oneukum@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 8ab10400
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -305,12 +305,17 @@ static void usb_wwan_indat_callback(struct urb *urb)
		/* Resubmit urb so we continue receiving */
		if (status != -ESHUTDOWN) {
			err = usb_submit_urb(urb, GFP_ATOMIC);
			if (err && err != -EPERM)
			if (err) {
				if (err != -EPERM) {
					printk(KERN_ERR "%s: resubmit read urb failed. "
						"(%d)", __func__, err);
			else
					/* busy also in error unless we are killed */
					usb_mark_last_busy(port->serial->dev);
				}
			} else {
				usb_mark_last_busy(port->serial->dev);
			}
		}

	}
}