From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-Id: <20130911042927.264251908@goodmis.org> Date: Wed, 11 Sep 2013 00:30:38 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Matt Burtch , Greg Kroah-Hartman Subject: [211/251] USB-Serial: Fix error handling of usb_wwan References: <20130911042707.738353451@goodmis.org> Content-Disposition: inline; filename=0211-USB-Serial-Fix-error-handling-of-usb_wwan.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: 3.6.11.9-rc1 stable review patch. If anyone has any objections, please let me know. ------------------ From: Matt Burtch [ Upstream commit 6c1ee66a0b2bdbd64c078fba684d640cf2fd38a9 ] 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 Cc: stable Signed-off-by: Greg Kroah-Hartman Signed-off-by: Steven Rostedt --- drivers/usb/serial/usb_wwan.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c index 188b5b3..5e9e1df 100644 --- a/drivers/usb/serial/usb_wwan.c +++ b/drivers/usb/serial/usb_wwan.c @@ -299,18 +299,18 @@ static void usb_wwan_indat_callback(struct urb *urb) tty_kref_put(tty); } - /* Resubmit urb so we continue receiving */ - err = usb_submit_urb(urb, GFP_ATOMIC); - if (err) { - if (err != -EPERM) { - printk(KERN_ERR "%s: resubmit read urb failed. " - "(%d)", __func__, err); - /* busy also in error unless we are killed */ - usb_mark_last_busy(port->serial->dev); - } - } else { + } + /* Resubmit urb so we continue receiving */ + err = usb_submit_urb(urb, GFP_ATOMIC); + if (err) { + if (err != -EPERM) { + printk(KERN_ERR "%s: resubmit read urb failed. (%d)\n", + __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); } } -- 1.7.10.4