Skip to content

Commit

Permalink
USB: serial: fix softint not being called on errors
Browse files Browse the repository at this point in the history
Make sure usb_serial_port_softint is called on errors also when using
multi urb writes.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Mar 19, 2010
1 parent 0ae1474 commit 6313620
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions drivers/usb/serial/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,23 +500,18 @@ void usb_serial_generic_write_bulk_callback(struct urb *urb)
if (port->urbs_in_flight < 0)
port->urbs_in_flight = 0;
spin_unlock_irqrestore(&port->lock, flags);

if (status) {
dbg("%s - nonzero multi-urb write bulk status "
"received: %d", __func__, status);
return;
}
} else {
port->write_urb_busy = 0;

if (status) {
dbg("%s - nonzero multi-urb write bulk status "
"received: %d", __func__, status);
if (status)
kfifo_reset_out(&port->write_fifo);
} else
else
usb_serial_generic_write_start(port);
}

if (status)
dbg("%s - non-zero urb status: %d", __func__, status);

usb_serial_port_softint(port);
}
EXPORT_SYMBOL_GPL(usb_serial_generic_write_bulk_callback);
Expand Down

0 comments on commit 6313620

Please sign in to comment.