diff options
| author | Matt Burtch <matt@grid-net.com> | 2013-08-12 13:11:39 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-12 16:45:26 -0400 |
| commit | 6c1ee66a0b2bdbd64c078fba684d640cf2fd38a9 (patch) | |
| tree | 953db5d4da2f4dbbe95cd687a46cca04f78d5e71 /drivers/usb/serial | |
| parent | ec58fad1feb76c323ef47efff1d1e8660ed4644c (diff) | |
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>
Diffstat (limited to 'drivers/usb/serial')
| -rw-r--r-- | drivers/usb/serial/usb_wwan.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c index 8257d30c4072..85365784040b 100644 --- a/drivers/usb/serial/usb_wwan.c +++ b/drivers/usb/serial/usb_wwan.c | |||
| @@ -291,18 +291,18 @@ static void usb_wwan_indat_callback(struct urb *urb) | |||
| 291 | tty_flip_buffer_push(&port->port); | 291 | tty_flip_buffer_push(&port->port); |
| 292 | } else | 292 | } else |
| 293 | dev_dbg(dev, "%s: empty read urb received\n", __func__); | 293 | dev_dbg(dev, "%s: empty read urb received\n", __func__); |
| 294 | 294 | } | |
| 295 | /* Resubmit urb so we continue receiving */ | 295 | /* Resubmit urb so we continue receiving */ |
| 296 | err = usb_submit_urb(urb, GFP_ATOMIC); | 296 | err = usb_submit_urb(urb, GFP_ATOMIC); |
| 297 | if (err) { | 297 | if (err) { |
| 298 | if (err != -EPERM) { | 298 | if (err != -EPERM) { |
| 299 | dev_err(dev, "%s: resubmit read urb failed. (%d)\n", __func__, err); | 299 | dev_err(dev, "%s: resubmit read urb failed. (%d)\n", |
| 300 | /* busy also in error unless we are killed */ | 300 | __func__, err); |
| 301 | usb_mark_last_busy(port->serial->dev); | 301 | /* busy also in error unless we are killed */ |
| 302 | } | ||
| 303 | } else { | ||
| 304 | usb_mark_last_busy(port->serial->dev); | 302 | usb_mark_last_busy(port->serial->dev); |
| 305 | } | 303 | } |
| 304 | } else { | ||
| 305 | usb_mark_last_busy(port->serial->dev); | ||
| 306 | } | 306 | } |
| 307 | } | 307 | } |
| 308 | 308 | ||
