Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754127AbdFNBPc (ORCPT ); Tue, 13 Jun 2017 21:15:32 -0400 Received: from www.llwyncelyn.cymru ([82.70.14.225]:58586 "EHLO fuzix.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753996AbdFNBP3 (ORCPT ); Tue, 13 Jun 2017 21:15:29 -0400 Date: Wed, 14 Jun 2017 02:14:56 +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 6/8] usb: gadget: f_acm: add an ioctl to get the current line coding Message-ID: <20170614021456.18356ef1@alans-desktop> In-Reply-To: <1497288375-3559-7-git-send-email-tal.shorer@gmail.com> References: <1497288375-3559-1-git-send-email-tal.shorer@gmail.com> <1497288375-3559-7-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: 786 Lines: 20 On Mon, 12 Jun 2017 20:26:13 +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). No this is not how to do it. We don't want weirdass ioctls for each different tty device type. There are two ways this can work. The first is actually done by plenty of real physical hardware and that is to simply update the termios of the logical channel to reflect the settings negotiated by the link layer below (in your course USB ACM). If that isn't sufficient then implement an ioctl that could work for *ALL* tty devices - for example return a termios structure indicating the relevant values on top of the current tty termios settings not some USB ACM magic object. Alan