aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2012-02-10 13:20:49 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-02 10:31:35 -0700
commit272ca2f1a3750a39991c73e8ddddf977d5aec846 (patch)
tree8921aab15121e249cb1de6e94d4a69743776fe2d
parentff1f5193fa906fbb93a7641232d40c1f40c6d918 (diff)
USB: serial: fix console error reporting
commit 548dd4b6da8a8e428453d55f7fa7b8a46498d147 upstream. 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> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/serial/generic.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index f7403576f99..e129fcd69fd 100644
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -217,8 +217,10 @@ retry:
clear_bit(i, &port->write_urbs_free);
result = usb_submit_urb(urb, GFP_ATOMIC);
if (result) {
- dev_err(&port->dev, "%s - error submitting urb: %d\n",
+ if (!port->port.console) {
+ dev_err(&port->dev, "%s - error submitting urb: %d\n",
__func__, result);
+ }
set_bit(i, &port->write_urbs_free);
spin_lock_irqsave(&port->lock, flags);
port->tx_bytes -= count;