Skip to contentSkip to conversation

serial: core: Fix iotype userspace breakage

PATCH In review Peter Hurley 2 participants 3 messages Mar 1, 2015 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 serial: core: Fix iotype userspace breakage

commit 3ffb1a8193bea ("serial: core: Add big-endian iotype") re-numbered userspace-dependent values; ioctl(TIOCSSERIAL) can assign the port iotype (which is expected to match the selected i/o accessors), so iotype values must not be changed.

Cc Kevin Cernekee <[email protected]>
Cc <[email protected]> # 3.19+
---
 include/linux/serial_core.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/linux/serial_core.h +3 -3
index a3fd182..85fdd89 100644
@@ -147,9 +147,9 @@ struct uart_port {
 #define UPIO_HUB6		(1)			/* Hub6 ISA card */
 #define UPIO_MEM		(2)			/* 8b MMIO access */
 #define UPIO_MEM32		(3)			/* 32b little endian */
-#define UPIO_MEM32BE		(4)			/* 32b big endian */
-#define UPIO_AU			(5)			/* Au1x00 and RT288x type IO */
-#define UPIO_TSI		(6)			/* Tsi108/109 type IO */
+#define UPIO_AU			(4)			/* Au1x00 and RT288x type IO */
+#define UPIO_TSI		(5)			/* Tsi108/109 type IO */
+#define UPIO_MEM32BE		(6)			/* 32b big endian */
 
 	unsigned int		read_status_mask;	/* driver specific */
 	unsigned int		ignore_status_mask;	/* driver specific */
Signature · 1 line
2.3.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 17 lines · Peter Hurley

commit 3ffb1a8193bea ("serial: core: Add big-endian iotype") re-numbered userspace-dependent values; ioctl(TIOCSSERIAL) can assign the port iotype (which is expected to match the selected i/o accessors), so iotype values must not be changed.

Cc Kevin Cernekee <[email protected]>
Cc <[email protected]> # 3.19+
---
 include/linux/serial_core.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/linux/serial_core.h +0 -0
index a3fd182..85fdd89 100644

include/linux/serial_core.h struct uart_port { · line 152

Quoted 9 lines
include/linux/serial_core.h +3 -3
@@ -147,9 +147,9 @@ struct uart_port {
 #define UPIO_HUB6              (1)                     /* Hub6 ISA card */
 #define UPIO_MEM               (2)                     /* 8b MMIO access */
 #define UPIO_MEM32             (3)                     /* 32b little endian */
-#define UPIO_MEM32BE           (4)                     /* 32b big endian */
-#define UPIO_AU                        (5)                     /* Au1x00 and RT288x type IO */
-#define UPIO_TSI               (6)                     /* Tsi108/109 type IO */
+#define UPIO_AU                        (4)                     /* Au1x00 and RT288x type IO */
+#define UPIO_TSI               (5)                     /* Tsi108/109 type IO */
+#define UPIO_MEM32BE           (6)                     /* 32b big endian */

Whoops, I had no clue userland cared about these... thanks for the fix.

#2 lore raw

On 03/01/2015 10:44 AM, Kevin Cernekee wrote:

[...]

Quoted 1 line

Whoops, I had no clue userland cared about these... thanks for the fix.

Yeah, totally non-obvious.
That's why my other patch redefines these with the uapi identifiers.

Regards,
Peter Hurley