USB: serial: cp210x: fix modem-control handling
authorJohan Hovold <johan@kernel.org>
Mon, 25 Jan 2021 13:48:12 +0000 (14:48 +0100)
committerJohan Hovold <johan@kernel.org>
Mon, 1 Feb 2021 09:03:42 +0000 (10:03 +0100)
commit8cce3bbfb4cffce097c823c29ba487d5a7422d37
tree9c737647056996b4aefa348f21bfa41c53558d18
parent5951b8508855799fbb2d6a9553ab3b7af595ea94
USB: serial: cp210x: fix modem-control handling

The vendor request used to set the flow-control settings also sets the
state of the modem-control lines.

Add state variables to keep track of the modem-control lines to avoid
always asserting the lines whenever the flow-control settings are
updated.

This specifically also avoids asserting DTR/RTS when opening a port with
the line speed set to B0.

Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/cp210x.c