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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e688355bfe
commit
548dd4b6da
@@ -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;
|
||||
|
Reference in New Issue
Block a user