Thread (5 messages) 5 messages, 2 authors, 2022-04-04

Re: [PATCH v2 07/12] serial: termbits: ADDRB to indicate 9th bit addressing mode

From: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Date: 2022-04-04 09:10:38
Also in: linux-alpha, linux-arch, linux-mips, linux-serial, linux-usb, linuxppc-dev, sparclinux

On Mon, 4 Apr 2022, Arnd Bergmann wrote:
On Mon, Apr 4, 2022 at 10:29 AM Ilpo Järvinen
[off-list ref] wrote:
quoted
 #define CLOCAL 00100000
+#define ADDRB  010000000               /* address bit */
 #define CMSPAR   010000000000          /* mark or space (stick) parity */
 #define CRTSCTS          020000000000          /* flow control */
diff --git a/arch/mips/include/uapi/asm/termbits.h b/arch/mips/include/uapi/asm/termbits.h
index dfeffba729b7..e7ea31cfec78 100644
--- a/arch/mips/include/uapi/asm/termbits.h
+++ b/arch/mips/include/uapi/asm/termbits.h
@@ -181,6 +181,7 @@ struct ktermios {
 #define         B3000000 0010015
 #define         B3500000 0010016
 #define         B4000000 0010017
+#define ADDRB    0020000       /* address bit */
 #define CIBAUD   002003600000  /* input baud rate */
 #define CMSPAR   010000000000  /* mark or space (stick) parity */
 #define CRTSCTS          020000000000  /* flow control */
It looks like the top bits are used the same way on all architectures
already, while the bottom bits of the flag differ. Could you pick
the next free bit from the top to use the same value 04000000000
everywhere?
04000000000 isn't the top of the use:
diff --git a/arch/alpha/include/uapi/asm/termbits.h 
b/arch/alpha/include/uapi/asm/termbits.h
index 4575ba34a0ea..285169c794ec 100644
--- a/arch/alpha/include/uapi/asm/termbits.h
+++ b/arch/alpha/include/uapi/asm/termbits.h
@@ -178,10 +178,11 @@ struct ktermios {
 #define PARENB 00010000
 #define PARODD 00020000
 #define HUPCL  00040000
 
 #define CLOCAL 00100000
+#define ADDRB  010000000               /* address bit */
 #define CMSPAR   010000000000          /* mark or space (stick) parity */
 #define CRTSCTS          020000000000          /* flow control */
 
 #define CIBAUD 07600000
 #define IBSHIFT        16
diff --git a/arch/sparc/include/uapi/asm/termbits.h 
b/arch/sparc/include/uapi/asm/termbits.h
index ce5ad5d0f105..4ad60c4acf65 100644
--- a/arch/sparc/include/uapi/asm/termbits.h
+++ b/arch/sparc/include/uapi/asm/termbits.h
@@ -198,10 +198,11 @@ struct ktermios {
    adjust CBAUD constant and drivers accordingly.
 #define B4000000  0x00001013  */
+#define ADDRB    0x00002000  /* address bit */
 #define CIBAUD   0x100f0000  /* input baud rate (not used) */
 #define CMSPAR   0x40000000  /* mark or space (stick) parity */
 #define CRTSCTS          0x80000000  /* flow control */

Somehow I managed to convince myself earlier there isn't a bit available 
that would be consistent across archs but now that I recheck the 
04000000000 bit (0x20000000) you propose, it seems to be that nothing is 
using it.

It's not suprising I didn't get the magnitude of those long octal numbers 
right. ...They are such a pain to interpret correctly.


-- 
 i.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help