On Wed, Jun 14, 2017 at 4:33 PM, Alan Cox wrote:
>> That would cut it, but TIOCPKT is too coupled with having a linked tty.
>> I could make acm behave like a pty (accept TIOCPKT and issue the
>> ctrl_status bits), but for that I need n_tty to know that packet does
>> not always mean a linked tty i
On Wed, Jun 14, 2017 at 11:20 AM, Tal Shorer wrote:
> On Wed, Jun 14, 2017 at 4:15 AM, Alan Cox wrote:
>> On Tue, 13 Jun 2017 09:52:07 +0300
>> Tal Shorer wrote:
>>
>>> If a tty driver wants to notify the user of some exceptional event,
>>> such as a usb c
On Wed, Jun 14, 2017 at 4:15 AM, Alan Cox wrote:
> On Tue, 13 Jun 2017 09:52:07 +0300
> Tal Shorer wrote:
>
>> If a tty driver wants to notify the user of some exceptional event,
>> such as a usb cdc acm device set_line_coding event, it needs a way to
>> modify the
On Tue, Jun 13, 2017 at 12:19 PM, Greg KH wrote:
> On Tue, Jun 13, 2017 at 09:52:12AM +0300, Tal Shorer wrote:
>> The user can issue USB_F_GET_LINE_CODING to get the current line coding
>> as set by the host (or the default if unset yet).
>>
>> Signed-off-by: Tal Shore
In order for a serial function to add flags to the poll() mask of their
tty files, propagate the poll() callback to the next layer so it can
return a mask if it sees fit to do so.
Signed-off-by: Tal Shorer
---
drivers/usb/gadget/function/u_serial.c | 16
drivers/usb/gadget
We shouldn't accept malformed set_line_coding requests.
All values were taken from table 17 (section 6.3.11) of the cdc1.2 spec
available at http://www.usb.org/developers/docs/devclass_docs/
The table is in the file PTSN120.pdf.
Signed-off-by: Tal Shorer
---
drivers/usb/gadget/function/f_
will be called in n_tty_poll().
Signed-off-by: Tal Shorer
---
drivers/tty/n_tty.c| 2 ++
include/linux/tty_driver.h | 3 +++
2 files changed, 5 insertions(+)
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index bdf0e6e..7af8c29 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty
The user can issue USB_F_GET_LINE_CODING to get the current line coding
as set by the host (or the default if unset yet).
Signed-off-by: Tal Shorer
---
Documentation/ioctl/ioctl-number.txt | 1 +
drivers/usb/gadget/function/f_acm.c | 19 +++
include/uapi/linux/usb/f_acm.h
, the initialized never-used values were invalid, with bDataBits
and bCharFormat having each other's value.
Signed-off-by: Tal Shorer
---
drivers/usb/gadget/function/u_serial.c | 22 ++
drivers/usb/gadget/function/u_serial.h | 3 ---
2 files changed, 2 insertions(+), 23
Initialize acm->port_line_coding with something that makes sense so
that we can return a valid line coding if the host requests
GetLineCoding before requesting SetLineCoding
Signed-off-by: Tal Shorer
---
drivers/usb/gadget/function/f_acm.c | 6 ++
1 file changed, 6 insertions(+)
diff --
In order for a serial function to implement its own ioctl() calls,
propagate the ioctl() callback to the next layer so it can handle it if
it sees fit to do so.
Signed-off-by: Tal Shorer
---
drivers/usb/gadget/function/u_serial.c | 15 +++
drivers/usb/gadget/function/u_serial.h | 1
Notify the user with a POLLPRI event when the host issues a
SetLineCoding request so that they can act upon it, for example by
configuring the line coding on a real serial port.
The event is cleared when the user reads the line coding using
USB_F_ACM_GET_LINE_CODING ioctl()
Signed-off-by: Tal
se to have there (and had a REVISIT
comment at every turn), it was never used and it was initialized with
invalid values.
Changes from v1:
- patch 5 was messed up, which made patch 6 also messed up. fixed both
of these.
Tal Shorer (8):
tty: add a poll() callback in struct tty_operations
usb: ga
On Mon, Jun 12, 2017 at 9:02 PM, Tal Shorer wrote:
> On Mon, Jun 12, 2017 at 8:26 PM, Tal Shorer wrote:
>> The user can issue USB_F_GET_LINE_CODING to get the current line coding
>> as set by the host (or the default if unset yet).
>>
>> Signed-off-by: Tal Sho
On Mon, Jun 12, 2017 at 8:26 PM, Tal Shorer wrote:
> The user can issue USB_F_GET_LINE_CODING to get the current line coding
> as set by the host (or the default if unset yet).
>
> Signed-off-by: Tal Shorer
> ---
> @@ -764,10 +783,10 @@ static struct usb_function *acm
will be called in n_tty_poll().
Signed-off-by: Tal Shorer
---
drivers/tty/n_tty.c| 2 ++
include/linux/tty_driver.h | 3 +++
2 files changed, 5 insertions(+)
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index bdf0e6e..7af8c29 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty
Initialize acm->port_line_coding with something that makes sense so
that we can return a valid line coding if the host requests
GetLineCoding before requesting SetLineCoding
Signed-off-by: Tal Shorer
---
drivers/usb/gadget/function/f_acm.c | 6 ++
1 file changed, 6 insertions(+)
diff --
In order for a serial function to add flags to the poll() mask of their
tty files, propagate the poll() callback to the next layer so it can
return a mask if it sees fit to do so.
Signed-off-by: Tal Shorer
---
drivers/usb/gadget/function/u_serial.c | 16
drivers/usb/gadget
Notify the user with a POLLPRI event when the host issues a
SetLineCoding request so that they can act upon it, for example by
configuring the line coding on a real serial port.
The event is cleared when the user reads the line coding using
USB_F_ACM_GET_LINE_CODING ioctl()
Signed-off-by: Tal
We shouldn't accept malformed set_line_coding requests.
All values were taken from table 17 (section 6.3.11) of the cdc1.2 spec
available at http://www.usb.org/developers/docs/devclass_docs/
The table is in the file PTSN120.pdf.
Signed-off-by: Tal Shorer
---
drivers/usb/gadget/function/f_
In order for a serial function to implement its own ioctl() calls,
propagate the ioctl() callback to the next layer so it can handle it if
it sees fit to do so.
Signed-off-by: Tal Shorer
---
drivers/usb/gadget/function/u_serial.c | 15 +++
drivers/usb/gadget/function/u_serial.h | 1
The user can issue USB_F_GET_LINE_CODING to get the current line coding
as set by the host (or the default if unset yet).
Signed-off-by: Tal Shorer
---
Documentation/ioctl/ioctl-number.txt | 1 +
drivers/usb/gadget/function/f_acm.c | 27 +++
include/uapi/linux/usb
, the initialized never-used values were invalid, with bDataBits
and bCharFormat having each other's value.
Signed-off-by: Tal Shorer
---
drivers/usb/gadget/function/u_serial.c | 22 ++
drivers/usb/gadget/function/u_serial.h | 3 ---
2 files changed, 2 insertions(+), 23
se to have there (and had a REVISIT
comment at every turn), it was never used and it was initialized with
invalid values.
Tal Shorer (8):
tty: add a poll() callback in struct tty_operations
usb: gadget: u_serial: propagate poll() to the next layer
usb: gadget: f_acm: validate set_line_codi
24 matches
Mail list logo