提交 92ca0dc5 编写于 作者: J Johan Hovold 提交者: Greg Kroah-Hartman

USB: mct_u232: fix broken close

Fix regression introduced by commit
f26788da (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: NEric Shattow "Eprecocious" <lucent@gmail.com>
Tested-by: NEric Shattow "Eprecocious" <lucent@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: NJohan Hovold <jhovold@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 f34c25ed
......@@ -549,9 +549,12 @@ static void mct_u232_close(struct usb_serial_port *port)
{
dbg("%s port %d", __func__, port->number);
usb_serial_generic_close(port);
if (port->serial->dev)
if (port->serial->dev) {
/* shutdown our urbs */
usb_kill_urb(port->write_urb);
usb_kill_urb(port->read_urb);
usb_kill_urb(port->interrupt_in_urb);
}
} /* mct_u232_close */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册