2015-04-03 10:03:15

by Frederic Danis

[permalink] [raw]
Subject: [Patch] tty: Re-add external interface for tty_set_termios()

This is a partial revert of patch "tty: Remove external interface for
tty_set_termios()" from Peter Hurley (2015-01-25 SHA1 632f32e2107) to
set tty_set_termios() publicly available.

This will be needed by Bluetooth hci_uart module to be able to change
Bluetooth controller and local UART speed during vendor specific
initialization.

Signed-off-by: Frederic Danis <[email protected]>
---
drivers/tty/tty_ioctl.c | 3 ++-
include/linux/tty.h | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tty_ioctl.c
index 632fc81..8e53fe4 100644
--- a/drivers/tty/tty_ioctl.c
+++ b/drivers/tty/tty_ioctl.c
@@ -536,7 +536,7 @@ EXPORT_SYMBOL(tty_termios_hw_change);
* Locking: termios_rwsem
*/

-static int tty_set_termios(struct tty_struct *tty, struct ktermios *new_termios)
+int tty_set_termios(struct tty_struct *tty, struct ktermios *new_termios)
{
struct ktermios old_termios;
struct tty_ldisc *ld;
@@ -569,6 +569,7 @@ static int tty_set_termios(struct tty_struct *tty, struct ktermios *new_termios)
up_write(&tty->termios_rwsem);
return 0;
}
+EXPORT_SYMBOL_GPL(tty_set_termios);

/**
* set_termios - set termios values for a tty
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 358a337..fe5623c 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -491,6 +491,7 @@ static inline speed_t tty_get_baud_rate(struct tty_struct *tty)

extern void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old);
extern int tty_termios_hw_change(struct ktermios *a, struct ktermios *b);
+extern int tty_set_termios(struct tty_struct *tty, struct ktermios *kt);

extern struct tty_ldisc *tty_ldisc_ref(struct tty_struct *);
extern void tty_ldisc_deref(struct tty_ldisc *);
--
1.9.1



2015-04-10 12:13:49

by Peter Hurley

[permalink] [raw]
Subject: Re: [Patch] tty: Re-add external interface for tty_set_termios()

On 04/03/2015 06:03 AM, Frederic Danis wrote:
> This is a partial revert of patch "tty: Remove external interface for
> tty_set_termios()" from Peter Hurley (2015-01-25 SHA1 632f32e2107) to
> set tty_set_termios() publicly available.
>
> This will be needed by Bluetooth hci_uart module to be able to change
> Bluetooth controller and local UART speed during vendor specific
> initialization.

Please resend to tty maintainers (and cc me).

2015-04-03 11:49:20

by Peter Hurley

[permalink] [raw]
Subject: Re: [Patch] tty: Re-add external interface for tty_set_termios()

[ +cc GregKH, JiriS ]

On 04/03/2015 06:30 AM, Peter Hurley wrote:
> Hi Frederic,
>
> On 04/03/2015 06:03 AM, Frederic Danis wrote:
>> This is a partial revert of patch "tty: Remove external interface for
>> tty_set_termios()" from Peter Hurley (2015-01-25 SHA1 632f32e2107) to
>> set tty_set_termios() publicly available.
>>
>> This will be needed by Bluetooth hci_uart module to be able to change
>> Bluetooth controller and local UART speed during vendor specific
>> initialization.
>
> NAK.
>
> 1. Where is this _proposed_ usage?

Found it. RFC series in linux-bluetooth.


2015-04-03 10:30:34

by Peter Hurley

[permalink] [raw]
Subject: Re: [Patch] tty: Re-add external interface for tty_set_termios()

Hi Frederic,

On 04/03/2015 06:03 AM, Frederic Danis wrote:
> This is a partial revert of patch "tty: Remove external interface for
> tty_set_termios()" from Peter Hurley (2015-01-25 SHA1 632f32e2107) to
> set tty_set_termios() publicly available.
>
> This will be needed by Bluetooth hci_uart module to be able to change
> Bluetooth controller and local UART speed during vendor specific
> initialization.

NAK.

1. Where is this _proposed_ usage?
2. The HCI line discipline has no business changing the line rate.

Regards,
Peter Hurley