mirror of
https://github.com/torvalds/linux.git
synced 2026-10-31 20:24:02 +01:00
USB: serial: digi_acceleport: always stop write urb on close
Explicitly stop the write urb on close() also if the device is being unbound instead of relying on core to do it after returning. Note that the dp_write_urb_in_use flag is cleared by the completion handler. Signed-off-by: Johan Hovold <johan@kernel.org>
This commit is contained in:
parent
9da9278780
commit
5d17fbd629
|
|
@ -1128,7 +1128,6 @@ static void digi_close(struct usb_serial_port *port)
|
|||
usb_kill_urb(port->read_urb);
|
||||
|
||||
mutex_lock(&port->serial->disc_mutex);
|
||||
/* if disconnected, just clear flags */
|
||||
if (port->serial->disconnected)
|
||||
goto exit;
|
||||
|
||||
|
|
@ -1174,14 +1173,11 @@ static void digi_close(struct usb_serial_port *port)
|
|||
TASK_INTERRUPTIBLE);
|
||||
schedule_timeout(DIGI_CLOSE_TIMEOUT);
|
||||
finish_wait(&priv->dp_flush_wait, &wait);
|
||||
exit:
|
||||
mutex_unlock(&port->serial->disc_mutex);
|
||||
|
||||
/* shutdown any outstanding bulk writes */
|
||||
usb_kill_urb(port->write_urb);
|
||||
exit:
|
||||
spin_lock_irq(&priv->dp_port_lock);
|
||||
priv->dp_write_urb_in_use = 0;
|
||||
spin_unlock_irq(&priv->dp_port_lock);
|
||||
mutex_unlock(&port->serial->disc_mutex);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user