diff options
author | Johan Hovold <jhovold@gmail.com> | 2012-02-10 07:20:49 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-10 13:20:36 -0500 |
commit | 548dd4b6da8a8e428453d55f7fa7b8a46498d147 (patch) | |
tree | e8c3ba7893cebd37f368a7dff70543019800f67a /drivers/usb/serial/generic.c | |
parent | e688355bfeadf17ef522b1e62cc12f8e88e69667 (diff) |
USB: serial: fix console error reporting
Do not report errors in write path if port is used as a console as this
may trigger the same error (and error report) resulting in a loop.
Reported-by: Stephen Hemminger <shemminger@vyatta.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/generic.c')
-rw-r--r-- | drivers/usb/serial/generic.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index f7403576f99f..e129fcd69fd9 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c | |||
@@ -217,8 +217,10 @@ retry: | |||
217 | clear_bit(i, &port->write_urbs_free); | 217 | clear_bit(i, &port->write_urbs_free); |
218 | result = usb_submit_urb(urb, GFP_ATOMIC); | 218 | result = usb_submit_urb(urb, GFP_ATOMIC); |
219 | if (result) { | 219 | if (result) { |
220 | dev_err(&port->dev, "%s - error submitting urb: %d\n", | 220 | if (!port->port.console) { |
221 | dev_err(&port->dev, "%s - error submitting urb: %d\n", | ||
221 | __func__, result); | 222 | __func__, result); |
223 | } | ||
222 | set_bit(i, &port->write_urbs_free); | 224 | set_bit(i, &port->write_urbs_free); |
223 | spin_lock_irqsave(&port->lock, flags); | 225 | spin_lock_irqsave(&port->lock, flags); |
224 | port->tx_bytes -= count; | 226 | port->tx_bytes -= count; |