[PATCH 08/14] patches: use old locking for struct tty_struct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With kernel 3.12 a new locking was added to struct tty_struct. This
patch makes the code use the old locking.

The new locking was added in this commit:
commit 6a1c0680cf3ba94356ecd58833e1540c93472a57
Author: Peter Hurley <peter@xxxxxxxxxxxxxxxxxx>
Date:   Sat Jun 15 09:14:23 2013 -0400

    tty: Convert termios_mutex to termios_rwsem

Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
---
 .../network/0061-termios_rwsem/INFO                  | 11 +++++++++++
 .../network/0061-termios_rwsem/nfc.patch             | 20 ++++++++++++++++++++
 2 files changed, 31 insertions(+)
 create mode 100644 patches/collateral-evolutions/network/0061-termios_rwsem/INFO
 create mode 100644 patches/collateral-evolutions/network/0061-termios_rwsem/nfc.patch

diff --git a/patches/collateral-evolutions/network/0061-termios_rwsem/INFO b/patches/collateral-evolutions/network/0061-termios_rwsem/INFO
new file mode 100644
index 0000000..296b219
--- /dev/null
+++ b/patches/collateral-evolutions/network/0061-termios_rwsem/INFO
@@ -0,0 +1,11 @@
+use old locking for struct tty_struct
+
+With kernel 3.12 a new locking was added to struct tty_struct. This
+patch makes the code use the old locking.
+
+The new locking was added in this commit:
+commit 6a1c0680cf3ba94356ecd58833e1540c93472a57
+Author: Peter Hurley <peter@xxxxxxxxxxxxxxxxxx>
+Date:   Sat Jun 15 09:14:23 2013 -0400
+
+    tty: Convert termios_mutex to termios_rwsem
diff --git a/patches/collateral-evolutions/network/0061-termios_rwsem/nfc.patch b/patches/collateral-evolutions/network/0061-termios_rwsem/nfc.patch
new file mode 100644
index 0000000..4829bee
--- /dev/null
+++ b/patches/collateral-evolutions/network/0061-termios_rwsem/nfc.patch
@@ -0,0 +1,20 @@
+--- a/net/nfc/nci/uart.c
++++ b/net/nfc/nci/uart.c
+@@ -446,9 +446,17 @@ void nci_uart_set_config(struct nci_uart
+ 	if (!nu->tty)
+ 		return;
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)
+ 	down_read(&nu->tty->termios_rwsem);
++#else
++	mutex_lock(&nu->tty->termios_mutex);
++#endif /* if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0) */
+ 	new_termios = nu->tty->termios;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)
+ 	up_read(&nu->tty->termios_rwsem);
++#else
++	mutex_unlock(&nu->tty->termios_mutex);
++#endif /* if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0) */
+ 	tty_termios_encode_baud_rate(&new_termios, baudrate, baudrate);
+ 
+ 	if (flow_ctrl)
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe backports" in



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux