From: Hugo Villeneuve <hugo@hugovil.com>
To: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Cc: <linux-serial@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Crescent CY Hsieh <crescentcy.hsieh@moxa.com>,
Jiri Slaby <jirislaby@kernel.org>, Lukas Wunner <lukas@wunner.de>,
Lino Sanfilippo <l.sanfilippo@kunbus.com>
Subject: Re: [PATCH] tty: serial: Fix bit order in RS485 flag definitions
Date: Thu, 18 Jan 2024 10:00:49 -0500 [thread overview]
Message-ID: <20240118100049.0e17d2d8808df7905ff45d71@hugovil.com> (raw)
In-Reply-To: <20240118124350.3772-1-cniedermaier@dh-electronics.com>
On Thu, 18 Jan 2024 13:43:50 +0100
Christoph Niedermaier <cniedermaier@dh-electronics.com> wrote:
> Since the commit 93f3350c46fa ("RS485: fix inconsistencies in the
> meaning of some variables"), the definition for bit 3 has been removed.
> But with the switch to bit shift marcos in commit 76ac8e29855b ("tty:
marcos -> macros
Hugo Villeneuve
> serial: Cleanup the bit shift with macro"), this gap wasn't preserved.
> To avoid a break in user/kernel api of the system skip bit 3 again and
> add a placeholder comment.
>
> Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
> ---
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Crescent CY Hsieh <crescentcy.hsieh@moxa.com>
> Cc: Jiri Slaby <jirislaby@kernel.org>
> Cc: Lukas Wunner <lukas@wunner.de>
> Cc: Lino Sanfilippo <l.sanfilippo@kunbus.com>
> To: linux-serial@vger.kernel.org
> To: linux-arm-kernel@lists.infradead.org
> ---
> include/uapi/linux/serial.h | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/include/uapi/linux/serial.h b/include/uapi/linux/serial.h
> index 9086367db043..de9b4733607e 100644
> --- a/include/uapi/linux/serial.h
> +++ b/include/uapi/linux/serial.h
> @@ -145,12 +145,13 @@ struct serial_rs485 {
> #define SER_RS485_ENABLED _BITUL(0)
> #define SER_RS485_RTS_ON_SEND _BITUL(1)
> #define SER_RS485_RTS_AFTER_SEND _BITUL(2)
> -#define SER_RS485_RX_DURING_TX _BITUL(3)
> -#define SER_RS485_TERMINATE_BUS _BITUL(4)
> -#define SER_RS485_ADDRB _BITUL(5)
> -#define SER_RS485_ADDR_RECV _BITUL(6)
> -#define SER_RS485_ADDR_DEST _BITUL(7)
> -#define SER_RS485_MODE_RS422 _BITUL(8)
> +/* Placeholder for bit 3: SER_RS485_RTS_BEFORE_SEND, which isn't used anymore */
> +#define SER_RS485_RX_DURING_TX _BITUL(4)
> +#define SER_RS485_TERMINATE_BUS _BITUL(5)
> +#define SER_RS485_ADDRB _BITUL(6)
> +#define SER_RS485_ADDR_RECV _BITUL(7)
> +#define SER_RS485_ADDR_DEST _BITUL(8)
> +#define SER_RS485_MODE_RS422 _BITUL(9)
>
> __u32 delay_rts_before_send;
> __u32 delay_rts_after_send;
> --
> 2.11.0
>
>
next prev parent reply other threads:[~2024-01-18 15:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-18 12:43 [PATCH] tty: serial: Fix bit order in RS485 flag definitions Christoph Niedermaier
2024-01-18 14:18 ` Greg Kroah-Hartman
2024-01-18 15:42 ` Christoph Niedermaier
2024-01-18 15:00 ` Hugo Villeneuve [this message]
2024-01-18 15:43 ` Christoph Niedermaier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240118100049.0e17d2d8808df7905ff45d71@hugovil.com \
--to=hugo@hugovil.com \
--cc=cniedermaier@dh-electronics.com \
--cc=crescentcy.hsieh@moxa.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=l.sanfilippo@kunbus.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-serial@vger.kernel.org \
--cc=lukas@wunner.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox