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] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 3 Nov 2023 18:47:34 +0800
From:   Crescent CY Hsieh <crescentcy.hsieh@...a.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Jiri Slaby <jirislaby@...nel.org>, linux-kernel@...r.kernel.org,
        linux-serial@...r.kernel.org
Subject: Re: [PATCH v2] tty: serial: Add RS422 flag to struct serial_rs485

On Wed, Nov 01, 2023 at 07:49:48AM +0100, Greg Kroah-Hartman wrote:
> On Wed, Nov 01, 2023 at 02:44:04PM +0800, Crescent CY Hsieh wrote:
> > diff --git a/include/uapi/linux/serial.h b/include/uapi/linux/serial.h
> > index 53bc1af67..427609fd5 100644
> > --- a/include/uapi/linux/serial.h
> > +++ b/include/uapi/linux/serial.h
> > @@ -137,6 +137,8 @@ struct serial_icounter_struct {
> >   * * %SER_RS485_ADDRB		- Enable RS485 addressing mode.
> >   * * %SER_RS485_ADDR_RECV - Receive address filter (enables @addr_recv). Requires %SER_RS485_ADDRB.
> >   * * %SER_RS485_ADDR_DEST - Destination address (enables @addr_dest). Requires %SER_RS485_ADDRB.
> > + *
> > + * * %SER_RS422_ENABLED		- RS422 enabled.
> >   */
> >  struct serial_rs485 {
> >  	__u32	flags;
> > @@ -149,6 +151,8 @@ struct serial_rs485 {
> >  #define SER_RS485_ADDR_RECV		(1 << 7)
> >  #define SER_RS485_ADDR_DEST		(1 << 8)
> >  
> > +#define SER_RS422_ENABLED		(1 << 9)
> 
> Why the extra blank line before this?

The extra blank line is for the clarity, to seperate RS422 flag from
RS485 flags.

> Also, what userspace code is going to use this?  How is it tested?

This flag could be used when user tries to switch serial interface into
RS422, just like the original flag "SER_RS485_ENABLED" can also be used to
switch serial interface into RS485 with some RS485 configurations.

---
Sincerely,
Crescent CY Hsieh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ