Re: [PATCH] USB: serial: cp210x: suppress modem-control error on open and close

From: Johan Hovold
Date: Thu Jan 21 2021 - 07:58:49 EST

On Thu, Jan 21, 2021 at 11:29:12AM +0100, Johan Hovold wrote:
> The CP210X_SET_MHS request cannot be used to control DTR/RTS when
> hardware flow control is enabled and instead returns an error which is
> currently logged as:
> cp210x ttyUSB0: failed set request 0x7 status: -32
> Add a crtscts flag to keep track of the hardware flow-control setting
> and use it to suppress the request in dtr_rts().
> Note that both lines are still deasserted when disabling the UART as
> part of close().
> Also note that TIOCMSET is left unchanged and will continue to return an
> error to user-space when flow control is enabled (i.e. instead of
> disabling and re-enabling auto-RTS when RTS is deasserted and
> re-asserted).
> Reported-by: Pho Tran <pho.tran@xxxxxxxxxx>
> Signed-off-by: Johan Hovold <johan@xxxxxxxxxx>
> ---

Oops, this one wasn't supposed to be submitted again. Please ignore.