USB: serial: fix softint not being called on errors
authorJohan Hovold <jhovold@gmail.com>
Sat, 27 Feb 2010 13:06:07 +0000 (14:06 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 19 Mar 2010 14:24:03 +0000 (07:24 -0700)
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>
drivers/usb/serial/generic.c

index e560d1d7f628197a58e4539b247ce7b01874255b..214bf25bc3b5c815665c497ecc2ed78532f2a841 100644 (file)
@@ -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);