linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial: core: Fix iotype userspace breakage
@ 2015-03-01 15:18 Peter Hurley
  2015-03-01 15:44 ` Kevin Cernekee
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Hurley @ 2015-03-01 15:18 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-serial, Peter Hurley, Kevin Cernekee, stable

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 <cernekee@gmail.com>
Cc: <stable@vger.kernel.org> # 3.19+
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
---
 include/linux/serial_core.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index a3fd182..85fdd89 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -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 */
-- 
2.3.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] serial: core: Fix iotype userspace breakage
  2015-03-01 15:18 [PATCH] serial: core: Fix iotype userspace breakage Peter Hurley
@ 2015-03-01 15:44 ` Kevin Cernekee
  2015-03-01 16:03   ` Peter Hurley
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Cernekee @ 2015-03-01 15:44 UTC (permalink / raw)
  To: Peter Hurley; +Cc: Greg Kroah-Hartman, linux-serial@vger.kernel.org, stable

On Sun, Mar 1, 2015 at 7:18 AM, Peter Hurley <peter@hurleysoftware.com> wrote:
> 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 <cernekee@gmail.com>
> Cc: <stable@vger.kernel.org> # 3.19+
> Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
> ---
>  include/linux/serial_core.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
> index a3fd182..85fdd89 100644
> --- a/include/linux/serial_core.h
> +++ b/include/linux/serial_core.h
> @@ -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.

Reviewed-by: Kevin Cernekee <cernekee@gmail.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] serial: core: Fix iotype userspace breakage
  2015-03-01 15:44 ` Kevin Cernekee
@ 2015-03-01 16:03   ` Peter Hurley
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Hurley @ 2015-03-01 16:03 UTC (permalink / raw)
  To: Kevin Cernekee; +Cc: Greg Kroah-Hartman, linux-serial@vger.kernel.org, stable

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

[...]

> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-01 16:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-01 15:18 [PATCH] serial: core: Fix iotype userspace breakage Peter Hurley
2015-03-01 15:44 ` Kevin Cernekee
2015-03-01 16:03   ` Peter Hurley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).