USB: serial: io_ti: document reason for drain delay
authorJohan Hovold <johan@kernel.org>
Mon, 12 Apr 2021 09:38:13 +0000 (11:38 +0200)
committerJohan Hovold <johan@kernel.org>
Tue, 13 Apr 2021 16:19:32 +0000 (18:19 +0200)
Document that the device line-status register doesn't tell when the
transmitter shift register has emptied and that this is why the
one-character drain delay is needed.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/io_ti.c

index 75325c2b295e42c006497e961b73b1b4c93d63cf..17720670e06c27074eb8117024167785843e3fbc 100644 (file)
@@ -2590,6 +2590,10 @@ static int edge_port_probe(struct usb_serial_port *port)
        if (ret)
                goto err;
 
+       /*
+        * The LSR does not tell when the transmitter shift register has
+        * emptied so add a one-character drain delay.
+        */
        port->port.drain_delay = 1;
 
        return 0;