linux/drivers/staging/fwserial
Johan Hovold 2c3ce3d84e staging: fwserial: fix TIOCGSERIAL implementation
[ Upstream commit 5e84a66f36 ]

TIOCSSERIAL is a horrid, underspecified, legacy interface which for most
serial devices is only useful for setting the close_delay and
closing_wait parameters.

The xmit_fifo_size parameter could be used to set the hardware transmit
fifo size of a legacy UART when it could not be detected, but the
interface is limited to eight bits and should be left unset when not
used.

Fix the fwserial implementation by dropping its custom interpretation of
the unused xmit_fifo_size field, which was overflowed with the driver
FIFO size. Also leave the type and flags fields unset as these cannot be
changed.

The close_delay and closing_wait parameters returned by TIOCGSERIAL are
specified in centiseconds. The driver does not yet support changing
closing_wait, but let's report back the default value actually used (30
seconds).

Fixes: 7355ba3445 ("staging: fwserial: Add TTY-over-Firewire serial driver")
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20210407102334.32361-5-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2021-05-14 09:50:15 +02:00
..
dma_fifo.c staging: fwserial: remove redundant license text 2018-01-15 16:03:45 +01:00
dma_fifo.h staging: fwserial: remove redundant license text 2018-01-15 16:03:45 +01:00
fwserial.c staging: fwserial: fix TIOCGSERIAL implementation 2021-05-14 09:50:15 +02:00
fwserial.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig staging: fwserial: Fix Kconfig indentation (seven spaces) 2019-11-22 11:32:54 +01:00
Makefile staging: add missing SPDX lines to Makefile files 2019-04-03 11:10:15 +02:00
TODO staging/fwserial: Create loop device the 'tty' way 2013-01-29 23:28:45 -05:00