All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: hci_ldisc: backport changes
@ 2015-06-26 18:13 Florian Grandel
  2015-06-26 18:30 ` Marcel Holtmann
  0 siblings, 1 reply; 4+ messages in thread
From: Florian Grandel @ 2015-06-26 18:13 UTC (permalink / raw)
  To: linux-bluetooth

The references to tty->termios in hci_ldisc were not backports
compatible. Introducing #define statements to make this file compile
against earlier kernel versions.

Signed-off-by: Florian Grandel <fgrandel@gmail.com>
---
 drivers/bluetooth/hci_ldisc.c | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index 177dd69..14d08b1 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -24,6 +24,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/version.h>
 
 #include <linux/kernel.h>
 #include <linux/init.h>
@@ -277,7 +278,11 @@ void hci_uart_set_flow_control(struct hci_uart *hu, bool enable)
 
 	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",
@@ -311,7 +316,11 @@ void hci_uart_set_flow_control(struct hci_uart *hu, bool enable)
 		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",
@@ -332,7 +341,11 @@ void hci_uart_init_tty(struct hci_uart *hu)
 	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;
@@ -350,7 +363,11 @@ void hci_uart_set_baudrate(struct hci_uart *hu, unsigned int speed)
 	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);
 
@@ -358,7 +375,7 @@ void hci_uart_set_baudrate(struct hci_uart *hu, unsigned int speed)
 	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)
-- 
1.9.1


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

* Re: [PATCH] Bluetooth: hci_ldisc: backport changes
  2015-06-26 18:13 [PATCH] Bluetooth: hci_ldisc: backport changes Florian Grandel
@ 2015-06-26 18:30 ` Marcel Holtmann
  2015-06-26 18:42   ` Florian Grandel
  2015-06-26 19:07   ` Fwd: " Florian Grandel
  0 siblings, 2 replies; 4+ messages in thread
From: Marcel Holtmann @ 2015-06-26 18:30 UTC (permalink / raw)
  To: Florian Grandel; +Cc: linux-bluetooth

Hi Florian,

> The references to tty->termios in hci_ldisc were not backports
> compatible. Introducing #define statements to make this file compile
> against earlier kernel versions.
> 
> Signed-off-by: Florian Grandel <fgrandel@gmail.com>
> ---
> drivers/bluetooth/hci_ldisc.c | 19 ++++++++++++++++++-
> 1 file changed, 18 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
> index 177dd69..14d08b1 100644
> --- a/drivers/bluetooth/hci_ldisc.c
> +++ b/drivers/bluetooth/hci_ldisc.c
> @@ -24,6 +24,7 @@
>  */
> 
> #include <linux/module.h>
> +#include <linux/version.h>
> 
> #include <linux/kernel.h>
> #include <linux/init.h>
> @@ -277,7 +278,11 @@ void hci_uart_set_flow_control(struct hci_uart *hu, bool enable)
> 
> 	if (enable) {
> 		/* Disable hardware flow control */
> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
> 		ktermios = tty->termios;
> +#else
> +		ktermios = *tty->termios;
> +#endif

such a patch is not acceptable upstream. This is something that the backports projects has to keep out-of-tree.

Regards

Marcel


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

* Re: [PATCH] Bluetooth: hci_ldisc: backport changes
  2015-06-26 18:30 ` Marcel Holtmann
@ 2015-06-26 18:42   ` Florian Grandel
  2015-06-26 19:07   ` Fwd: " Florian Grandel
  1 sibling, 0 replies; 4+ messages in thread
From: Florian Grandel @ 2015-06-26 18:42 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth

On 06/26/2015 08:30 PM, Marcel Holtmann wrote:
> Hi Florian,
>
>> The references to tty->termios in hci_ldisc were not backports
>> compatible. Introducing #define statements to make this file compile
>> against earlier kernel versions.
>>
>> Signed-off-by: Florian Grandel <fgrandel@gmail.com>
>> ---
>> drivers/bluetooth/hci_ldisc.c | 19 ++++++++++++++++++-
>> 1 file changed, 18 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
>> index 177dd69..14d08b1 100644
>> --- a/drivers/bluetooth/hci_ldisc.c
>> +++ b/drivers/bluetooth/hci_ldisc.c
>> @@ -24,6 +24,7 @@
>>   */
>>
>> #include <linux/module.h>
>> +#include <linux/version.h>
>>
>> #include <linux/kernel.h>
>> #include <linux/init.h>
>> @@ -277,7 +278,11 @@ void hci_uart_set_flow_control(struct hci_uart *hu, bool enable)
>>
>> 	if (enable) {
>> 		/* Disable hardware flow control */
>> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
>> 		ktermios = tty->termios;
>> +#else
>> +		ktermios = *tty->termios;
>> +#endif
>
> such a patch is not acceptable upstream. This is something that the backports projects has to keep out-of-tree.

ah ok - didn't know that, sorry

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

* Fwd: Re: [PATCH] Bluetooth: hci_ldisc: backport changes
  2015-06-26 18:30 ` Marcel Holtmann
  2015-06-26 18:42   ` Florian Grandel
@ 2015-06-26 19:07   ` Florian Grandel
  1 sibling, 0 replies; 4+ messages in thread
From: Florian Grandel @ 2015-06-26 19:07 UTC (permalink / raw)
  To: Linux Backports

Hi!

Wanted to send a patch including version checking upstream to the 
bluetooth guys - but wasn't accepted, see below.

Now your README in the patches folder says that new patches are not 
usually acceptable on your side.

What would be the right approach to get the below define statements into 
the backports?

Regards,

Florian

-------- Forwarded Message --------
Subject: Re: [PATCH] Bluetooth: hci_ldisc: backport changes
Date: Fri, 26 Jun 2015 20:30:15 +0200
From: Marcel Holtmann <marcel@holtmann.org>
To: Florian Grandel <fgrandel@gmail.com>
CC: linux-bluetooth@vger.kernel.org

Hi Florian,

> The references to tty->termios in hci_ldisc were not backports
> compatible. Introducing #define statements to make this file compile
> against earlier kernel versions.
>
> Signed-off-by: Florian Grandel <fgrandel@gmail.com>
> ---
> drivers/bluetooth/hci_ldisc.c | 19 ++++++++++++++++++-
> 1 file changed, 18 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
> index 177dd69..14d08b1 100644
> --- a/drivers/bluetooth/hci_ldisc.c
> +++ b/drivers/bluetooth/hci_ldisc.c
> @@ -24,6 +24,7 @@
>  */
>
> #include <linux/module.h>
> +#include <linux/version.h>
>
> #include <linux/kernel.h>
> #include <linux/init.h>
> @@ -277,7 +278,11 @@ void hci_uart_set_flow_control(struct hci_uart *hu, bool enable)
>
> 	if (enable) {
> 		/* Disable hardware flow control */
> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
> 		ktermios = tty->termios;
> +#else
> +		ktermios = *tty->termios;
> +#endif

such a patch is not acceptable upstream. This is something that the 
backports projects has to keep out-of-tree.

Regards

Marcel




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

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

end of thread, other threads:[~2015-06-26 19:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-26 18:13 [PATCH] Bluetooth: hci_ldisc: backport changes Florian Grandel
2015-06-26 18:30 ` Marcel Holtmann
2015-06-26 18:42   ` Florian Grandel
2015-06-26 19:07   ` Fwd: " Florian Grandel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.