Re: [PATCH v2 1/8] tty: add a poll() callback in struct tty_operations

2017-06-15 Thread Tal Shorer
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 >>

Re: [PATCH v2 1/8] tty: add a poll() callback in struct tty_operations

2017-06-14 Thread Alan Cox
> 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 is present, and that in case it isn't we > take our

Re: [PATCH v2 1/8] tty: add a poll() callback in struct tty_operations

2017-06-14 Thread Tal Shorer
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

Re: [PATCH v2 1/8] tty: add a poll() callback in struct tty_operations

2017-06-14 Thread Tal Shorer
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

Re: [PATCH v2 1/8] tty: add a poll() callback in struct tty_operations

2017-06-13 Thread Alan Cox
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 mask returned by poll() and possible also add wait queues. > In

[PATCH v2 1/8] tty: add a poll() callback in struct tty_operations

2017-06-13 Thread Tal Shorer
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 mask returned by poll() and possible also add wait queues. In order to do that, we allow the driver to supply a poll() callback of its own, which