Commit 63136202 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

USB: serial: fix softint not being called on errors

Make sure usb_serial_port_softint is called on errors also when using
multi urb writes.
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 0ae14743
...@@ -500,23 +500,18 @@ void usb_serial_generic_write_bulk_callback(struct urb *urb) ...@@ -500,23 +500,18 @@ void usb_serial_generic_write_bulk_callback(struct urb *urb)
if (port->urbs_in_flight < 0) if (port->urbs_in_flight < 0)
port->urbs_in_flight = 0; port->urbs_in_flight = 0;
spin_unlock_irqrestore(&port->lock, flags); spin_unlock_irqrestore(&port->lock, flags);
if (status) {
dbg("%s - nonzero multi-urb write bulk status "
"received: %d", __func__, status);
return;
}
} else { } else {
port->write_urb_busy = 0; port->write_urb_busy = 0;
if (status) { if (status)
dbg("%s - nonzero multi-urb write bulk status "
"received: %d", __func__, status);
kfifo_reset_out(&port->write_fifo); kfifo_reset_out(&port->write_fifo);
} else else
usb_serial_generic_write_start(port); usb_serial_generic_write_start(port);
} }
if (status)
dbg("%s - non-zero urb status: %d", __func__, status);
usb_serial_port_softint(port); usb_serial_port_softint(port);
} }
EXPORT_SYMBOL_GPL(usb_serial_generic_write_bulk_callback); EXPORT_SYMBOL_GPL(usb_serial_generic_write_bulk_callback);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment