Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752336AbbL1PcH (ORCPT ); Mon, 28 Dec 2015 10:32:07 -0500 Received: from mail-lf0-f50.google.com ([209.85.215.50]:33834 "EHLO mail-lf0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750803AbbL1PcF (ORCPT ); Mon, 28 Dec 2015 10:32:05 -0500 Date: Mon, 28 Dec 2015 16:32:38 +0100 From: Johan Hovold To: One Thousand Gnomes Cc: Johan Hovold , Mathieu OTHACEHE , gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [PATCH v5] USB: serial: add Moxa UPORT 11x0 driver Message-ID: <20151228153238.GB18146@localhost> References: <1449401383-10047-1-git-send-email-m.othacehe@gmail.com> <20151228140630.GA18146@localhost> <20151228143944.111a6c7f@lxorguk.ukuu.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151228143944.111a6c7f@lxorguk.ukuu.org.uk> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1280 Lines: 27 On Mon, Dec 28, 2015 at 02:39:44PM +0000, One Thousand Gnomes wrote: > > https://lkml.kernel.org/r/201102171210.03474.frode@tennebo.com > > > > However, the TIOCSRS485-ioctl might not even be the right interface for > > changing transceiver modes, and instead a sysfs-based > > usb-serial-specific interface could be more appropriate for example. > > sysfs works out very badly if modes can be configured routinely at > runtime. In particular the sysfs interface is completely disconnected > from the vhangup() and security model of the tty interface. > > If its the kind if thing just administratively configured at boot then > it's a great interface, just be careful about who has access to it. I think this is something that you only want to configure once (e.g. at boot) and before even opening the tty device as this can change the functions of the pins (e.g. DCD becoming TxD-). If a generic usb-serial-specific interface for this makes sense, I think we should simply prevent mode changes while the port is in use. Johan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/