Commit 3aed3af2 authored by Johan Hovold's avatar Johan Hovold

USB: serial: digi_acceleport: reduce chars_in_buffer over-reporting

Due to an ancient quirk in n_tty poll implementation, the
digi_acceleport driver has been reporting that its queue contains 256
(WAKEUP_CHARS) characters whenever its write URB is in use.

This has not been necessary since 2003 when the line-discipline started
taking the write room into account so let's return the maximum transfer
size again in order to over-report a little less and incidentally fix
the related debug statement.
Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
parent 155591d3
...@@ -1048,8 +1048,7 @@ static unsigned int digi_chars_in_buffer(struct tty_struct *tty) ...@@ -1048,8 +1048,7 @@ static unsigned int digi_chars_in_buffer(struct tty_struct *tty)
if (priv->dp_write_urb_in_use) { if (priv->dp_write_urb_in_use) {
dev_dbg(&port->dev, "digi_chars_in_buffer: port=%d, chars=%d\n", dev_dbg(&port->dev, "digi_chars_in_buffer: port=%d, chars=%d\n",
priv->dp_port_num, port->bulk_out_size - 2); priv->dp_port_num, port->bulk_out_size - 2);
/* return(port->bulk_out_size - 2); */ return port->bulk_out_size - 2;
return 256;
} else { } else {
dev_dbg(&port->dev, "digi_chars_in_buffer: port=%d, chars=%d\n", dev_dbg(&port->dev, "digi_chars_in_buffer: port=%d, chars=%d\n",
priv->dp_port_num, priv->dp_out_buf_len); priv->dp_port_num, priv->dp_out_buf_len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment