mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-05-01 21:04:03 +00:00
USB-Serial: Fix error handling of usb_wwan
This fixes an issue where the bulk-in urb used for incoming data transfer is not resubmitted if the packet recieved contains an error status. This results in the driver locking until the port is closed and re-opened. Tested on a custom board with a Cinterion GSM module. Signed-off-by: Matt Burtch <matt@grid-net.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ec58fad1fe
commit
6c1ee66a0b
1 changed files with 10 additions and 10 deletions
|
@ -291,12 +291,13 @@ static void usb_wwan_indat_callback(struct urb *urb)
|
||||||
tty_flip_buffer_push(&port->port);
|
tty_flip_buffer_push(&port->port);
|
||||||
} else
|
} else
|
||||||
dev_dbg(dev, "%s: empty read urb received\n", __func__);
|
dev_dbg(dev, "%s: empty read urb received\n", __func__);
|
||||||
|
}
|
||||||
/* Resubmit urb so we continue receiving */
|
/* Resubmit urb so we continue receiving */
|
||||||
err = usb_submit_urb(urb, GFP_ATOMIC);
|
err = usb_submit_urb(urb, GFP_ATOMIC);
|
||||||
if (err) {
|
if (err) {
|
||||||
if (err != -EPERM) {
|
if (err != -EPERM) {
|
||||||
dev_err(dev, "%s: resubmit read urb failed. (%d)\n", __func__, err);
|
dev_err(dev, "%s: resubmit read urb failed. (%d)\n",
|
||||||
|
__func__, err);
|
||||||
/* busy also in error unless we are killed */
|
/* busy also in error unless we are killed */
|
||||||
usb_mark_last_busy(port->serial->dev);
|
usb_mark_last_busy(port->serial->dev);
|
||||||
}
|
}
|
||||||
|
@ -304,7 +305,6 @@ static void usb_wwan_indat_callback(struct urb *urb)
|
||||||
usb_mark_last_busy(port->serial->dev);
|
usb_mark_last_busy(port->serial->dev);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
static void usb_wwan_outdat_callback(struct urb *urb)
|
static void usb_wwan_outdat_callback(struct urb *urb)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue