summaryrefslogtreecommitdiff
path: root/drivers/usb/serial/digi_acceleport.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2021-05-19 12:20:01 +0300
committerJohan Hovold <johan@kernel.org>2021-05-21 16:45:35 +0300
commit3aed3af202aa2f8246d07875809b9bc07a02131b (patch)
tree94011650a955b00214ed774e0ecbc0818a5ca01b /drivers/usb/serial/digi_acceleport.c
parent155591d3ceeec2cd6a50b40278e2014c45f6b5f6 (diff)
downloadlinux-3aed3af202aa2f8246d07875809b9bc07a02131b.tar.xz
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial/digi_acceleport.c')
-rw-r--r--drivers/usb/serial/digi_acceleport.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c
index 19ee8191647c..a4194b70a6fe 100644
--- a/drivers/usb/serial/digi_acceleport.c
+++ b/drivers/usb/serial/digi_acceleport.c
@@ -1048,8 +1048,7 @@ static unsigned int digi_chars_in_buffer(struct tty_struct *tty)
if (priv->dp_write_urb_in_use) {
dev_dbg(&port->dev, "digi_chars_in_buffer: port=%d, chars=%d\n",
priv->dp_port_num, port->bulk_out_size - 2);
- /* return(port->bulk_out_size - 2); */
- return 256;
+ return port->bulk_out_size - 2;
} else {
dev_dbg(&port->dev, "digi_chars_in_buffer: port=%d, chars=%d\n",
priv->dp_port_num, priv->dp_out_buf_len);