From 75239f276ec894c87b8fbc268bdfb0f9fd290445 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Tue, 7 Feb 2017 08:07:39 +0100 Subject: backports: get rid of patch directory structure This directory structure was never really managed well, simply get rid of it. With the patch system that only applies patches when the modified file exists, and with a lot of spatches applying everywhere anyway, it's no longer really useful either. Signed-off-by: Johannes Berg --- patches/0020-tty-termios/INFO | 23 ++++++++ .../0020-tty-termios/net_bluetooth_hci_ldisc.patch | 67 ++++++++++++++++++++++ .../net_bluetooth_rfcomm_tty.patch | 14 +++++ 3 files changed, 104 insertions(+) create mode 100644 patches/0020-tty-termios/INFO create mode 100644 patches/0020-tty-termios/net_bluetooth_hci_ldisc.patch create mode 100644 patches/0020-tty-termios/net_bluetooth_rfcomm_tty.patch (limited to 'patches/0020-tty-termios') diff --git a/patches/0020-tty-termios/INFO b/patches/0020-tty-termios/INFO new file mode 100644 index 00000000..abd5c360 --- /dev/null +++ b/patches/0020-tty-termios/INFO @@ -0,0 +1,23 @@ +This patch requires a manual backport: + +commit adc8d746caa67fff4b53ba3e5163a6cbacc3b523 +Author: Alan Cox +Date: Sat Jul 14 15:31:47 2012 +0100 + + tty: move the termios object into the tty + + This will let us sort out a whole pile of tty related races. The + alternative would be to keep points and refcount the termios objects. + However + 1. They are tiny anyway + 2. Many devices don't use the stored copies + 3. We can remove a pty special case + + Signed-off-by: Alan Cox + Signed-off-by: Greg Kroah-Hartman + +We cannot use compat.git for this given that the assignment +was not done through a static inline helper. + +mcgrof@ergon ~/linux (git::master)$ git describe --contains adc8d746caa67fff4b53ba3e5163a6cbacc3b523 +v3.7-rc1~172^2~187 diff --git a/patches/0020-tty-termios/net_bluetooth_hci_ldisc.patch b/patches/0020-tty-termios/net_bluetooth_hci_ldisc.patch new file mode 100644 index 00000000..d1c6b64f --- /dev/null +++ b/patches/0020-tty-termios/net_bluetooth_hci_ldisc.patch @@ -0,0 +1,67 @@ +--- a/drivers/bluetooth/hci_ldisc.c ++++ b/drivers/bluetooth/hci_ldisc.c +@@ -24,6 +24,7 @@ + */ + + #include ++#include + + #include + #include +@@ -269,7 +270,11 @@ void hci_uart_set_flow_control(struct hc + + if (enable) { + /* Disable hardware flow control */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)) + ktermios = tty->termios; ++#else ++ ktermios = *tty->termios; ++#endif + ktermios.c_cflag &= ~CRTSCTS; + status = tty_set_termios(tty, &ktermios); + BT_DBG("Disabling hardware flow control: %s", +@@ -303,7 +308,11 @@ void hci_uart_set_flow_control(struct hc + BT_DBG("Setting RTS: %s", status ? "failed" : "success"); + + /* Re-enable hardware flow control */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)) + ktermios = tty->termios; ++#else ++ ktermios = *tty->termios; ++#endif + ktermios.c_cflag |= CRTSCTS; + status = tty_set_termios(tty, &ktermios); + BT_DBG("Enabling hardware flow control: %s", +@@ -324,7 +333,11 @@ void hci_uart_init_tty(struct hci_uart * + struct ktermios ktermios; + + /* Bring the UART into a known 8 bits no parity hw fc state */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)) + ktermios = tty->termios; ++#else ++ ktermios = *tty->termios; ++#endif + ktermios.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | + INLCR | IGNCR | ICRNL | IXON); + ktermios.c_oflag &= ~OPOST; +@@ -342,7 +355,11 @@ void hci_uart_set_baudrate(struct hci_ua + struct tty_struct *tty = hu->tty; + struct ktermios ktermios; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)) + ktermios = tty->termios; ++#else ++ ktermios = *tty->termios; ++#endif + ktermios.c_cflag &= ~CBAUD; + tty_termios_encode_baud_rate(&ktermios, speed, speed); + +@@ -350,7 +367,7 @@ void hci_uart_set_baudrate(struct hci_ua + tty_set_termios(tty, &ktermios); + + BT_DBG("%s: New tty speeds: %d/%d", hu->hdev->name, +- tty->termios.c_ispeed, tty->termios.c_ospeed); ++ ktermios.c_ispeed, ktermios.c_ospeed); + } + + static int hci_uart_setup(struct hci_dev *hdev) diff --git a/patches/0020-tty-termios/net_bluetooth_rfcomm_tty.patch b/patches/0020-tty-termios/net_bluetooth_rfcomm_tty.patch new file mode 100644 index 00000000..780d0b97 --- /dev/null +++ b/patches/0020-tty-termios/net_bluetooth_rfcomm_tty.patch @@ -0,0 +1,14 @@ +--- a/net/bluetooth/rfcomm/tty.c ++++ b/net/bluetooth/rfcomm/tty.c +@@ -869,7 +869,11 @@ static int rfcomm_tty_ioctl(struct tty_s + + static void rfcomm_tty_set_termios(struct tty_struct *tty, struct ktermios *old) + { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)) + struct ktermios *new = &tty->termios; ++#else ++ struct ktermios *new = tty->termios; ++#endif + int old_baud_rate = tty_termios_baud_rate(old); + int new_baud_rate = tty_termios_baud_rate(new); + -- cgit v1.2.3