Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753957AbdFNBPR (ORCPT ); Tue, 13 Jun 2017 21:15:17 -0400 Received: from www.llwyncelyn.cymru ([82.70.14.225]:58562 "EHLO fuzix.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752456AbdFNBPP (ORCPT ); Tue, 13 Jun 2017 21:15:15 -0400 Date: Wed, 14 Jun 2017 02:15:05 +0100 From: Alan Cox To: Tal Shorer Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, gregkh@linuxfoundation.org, balbi@kernel.org, corbet@lwn.net Subject: Re: [PATCH v2 1/8] tty: add a poll() callback in struct tty_operations Message-ID: <20170614021505.5a915c2b@alans-desktop> In-Reply-To: <1497336734-19368-2-git-send-email-tal.shorer@gmail.com> References: <1497336734-19368-1-git-send-email-tal.shorer@gmail.com> <1497336734-19368-2-git-send-email-tal.shorer@gmail.com> Organization: Intel Corporation X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 972 Lines: 22 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 order to do that, we allow the driver to supply a poll() callback > of its own, which will be called in n_tty_poll(). > > Signed-off-by: Tal Shorer You might be in any line discipline so you need to support that for each ldisc that supports poll(). Also what do I do when I get an exception event - what does it mean, how do I understand that, are you proposing a standardized meaning ? Have you checked whether that conflicts with SuS v3 or POSIX ? What will it do with existing code. At the very least it probably has to be something you turn on, and you might then want to model it on the pty/tty interface logic and extend TIOCPKT a shade. Alan