diff options
author | Johan Hovold <jhovold@gmail.com> | 2010-02-27 08:06:07 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-19 10:24:03 -0400 |
commit | 6313620228624ff4dcb78b1dbd459d0c208df126 (patch) | |
tree | cf0daaf2de0dcde24183375ff399d8906f91d294 /drivers | |
parent | 0ae1474367a15e1b65a9deed3a73a14475a419fc (diff) |
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: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/serial/generic.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index e560d1d7f628..214bf25bc3b5 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c | |||
@@ -500,23 +500,18 @@ void usb_serial_generic_write_bulk_callback(struct urb *urb) | |||
500 | if (port->urbs_in_flight < 0) | 500 | if (port->urbs_in_flight < 0) |
501 | port->urbs_in_flight = 0; | 501 | port->urbs_in_flight = 0; |
502 | spin_unlock_irqrestore(&port->lock, flags); | 502 | spin_unlock_irqrestore(&port->lock, flags); |
503 | |||
504 | if (status) { | ||
505 | dbg("%s - nonzero multi-urb write bulk status " | ||
506 | "received: %d", __func__, status); | ||
507 | return; | ||
508 | } | ||
509 | } else { | 503 | } else { |
510 | port->write_urb_busy = 0; | 504 | port->write_urb_busy = 0; |
511 | 505 | ||
512 | if (status) { | 506 | if (status) |
513 | dbg("%s - nonzero multi-urb write bulk status " | ||
514 | "received: %d", __func__, status); | ||
515 | kfifo_reset_out(&port->write_fifo); | 507 | kfifo_reset_out(&port->write_fifo); |
516 | } else | 508 | else |
517 | usb_serial_generic_write_start(port); | 509 | usb_serial_generic_write_start(port); |
518 | } | 510 | } |
519 | 511 | ||
512 | if (status) | ||
513 | dbg("%s - non-zero urb status: %d", __func__, status); | ||
514 | |||
520 | usb_serial_port_softint(port); | 515 | usb_serial_port_softint(port); |
521 | } | 516 | } |
522 | EXPORT_SYMBOL_GPL(usb_serial_generic_write_bulk_callback); | 517 | EXPORT_SYMBOL_GPL(usb_serial_generic_write_bulk_callback); |