lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 18 Nov 2023 22:26:23 +0100
From:   Lino Sanfilippo <LinoSanfilippo@....de>
To:     Brenda Streiff <brenda.streiff@...com>,
        Crescent CY Hsieh <crescentcy.hsieh@...a.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jirislaby@...nel.org>
Cc:     linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org
Subject: Re: [PATCH v4] tty: serial: Add RS422 flag to struct serial_rs485

Hi,

On 15.11.23 03:50, Brenda Streiff wrote:

>
> Documentation/driver-api/serial/serial-rs485.rst could also use an update,
> since it doesn't mention your new flag at all.
>
> The documentation as it is also doesn't give a very good idea of what flags
> userspace might need to set for RS-232 vs RS-422 vs RS-485 (2- or 4-wire).
>
> If I compare this to your original patch set [1] for your hardware, then
> your proposed flag would be used in the following ways, correct?
>
> RS-232:                       rs485->flags = 0
> RS-422:                       rs485->flags = SER_RS485_ENABLED|SER_RS485_MODE_RS422
> RS-485 (2-wire half-duplex):  rs485->flags = SER_RS485_ENABLED
> RS-485 (4-wire full-duplex):  rs485->flags = SER_RS485_ENABLED|SER_RS485_RX_DURING_TX
>
> In iot2040_rs485_config in 8250_exar.c [2] we already seem to have:
> RS-232:                       rs485->flags = 0
> RS-422:                       rs485->flags = SER_RS485_ENABLED|SER_RS485_RX_DURING_TX
> RS-485 (2-wire half-duplex?): rs485->flags = SER_RS485_ENABLED
>
> This would seem to create an inconsistency in this API.
>

We can adjust 8250_exar later to also honor SER_RS485_MODE_RS422.
But yes, we have to also keep the current logic (i.e. set the RS422 mode if
SER_RS485_ENABLED|SER_RS485_RX_DURING_TX is set) for backward compatibility.

Regards,
Lino

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ