Commit 92ca0dc5ee022e4c0e488177e1d8865a0778c6c2

Authored by Johan Hovold
Committed by Greg Kroah-Hartman
1 parent f34c25ed78

USB: mct_u232: fix broken close

Fix regression introduced by commit
f26788da3b342099d2b02d99ba1cb7f154d6ef7b (USB: serial: refactor generic
close) which broke driver close().

This driver uses non-standard semantics for the read urb which makes the
generic close function fail to kill it (the read urb is actually an
interrupt urb and therefore bulk_in size is zero).

Reported-by: Eric Shattow "Eprecocious" <lucent@gmail.com>
Tested-by: Eric Shattow "Eprecocious" <lucent@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Showing 1 changed file with 5 additions and 2 deletions Side-by-side Diff

drivers/usb/serial/mct_u232.c
... ... @@ -549,9 +549,12 @@
549 549 {
550 550 dbg("%s port %d", __func__, port->number);
551 551  
552   - usb_serial_generic_close(port);
553   - if (port->serial->dev)
  552 + if (port->serial->dev) {
  553 + /* shutdown our urbs */
  554 + usb_kill_urb(port->write_urb);
  555 + usb_kill_urb(port->read_urb);
554 556 usb_kill_urb(port->interrupt_in_urb);
  557 + }
555 558 } /* mct_u232_close */
556 559  
557 560