提交 87c1edd2 编写于 作者: J Jason Wessel 提交者: Greg Kroah-Hartman

USB: serial: ftd_sio usb: move status check

Alan Stern commented that the private driver counts must be updated
regard less of the status return on the urb when the write call back
is executed.

This patch alters the behavior to update the private driver counts by
simply moving the status check to after the driver count update.
Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 715b1dc0
......@@ -1884,11 +1884,6 @@ static void ftdi_write_bulk_callback(struct urb *urb)
dbg("%s - port %d", __func__, port->number);
if (status) {
dbg("nonzero write bulk status received: %d", status);
return;
}
priv = usb_get_serial_port_data(port);
if (!priv) {
dbg("%s - bad port private data pointer - exiting", __func__);
......@@ -1906,6 +1901,11 @@ static void ftdi_write_bulk_callback(struct urb *urb)
priv->tx_outstanding_bytes -= countback;
spin_unlock_irqrestore(&priv->tx_lock, flags);
if (status) {
dbg("nonzero write bulk status received: %d", status);
return;
}
usb_serial_port_softint(port);
} /* ftdi_write_bulk_callback */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册