Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp378607pxu; Fri, 11 Dec 2020 04:41:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJzydjngit/UEoWr2zpbyhmcDGRh/SiUmR0DS70IBPpTe8eeDVmmdrObIk12dZ9MGIPXGtB9 X-Received: by 2002:a50:8163:: with SMTP id 90mr11418661edc.142.1607690478807; Fri, 11 Dec 2020 04:41:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607690478; cv=none; d=google.com; s=arc-20160816; b=s4hj/mPF4Kctv/DquSvzLOmIbKwVIRb2gqdKpFCRQx7QOEeJvVpto66vCS57/Zn+pK ZeC3OcIM7dUeEyZtrZTSJgP1BnyzMrugbXM8/caV0CCFSFyuBCfOJG+EVfa01L98Vf24 sYCaZuPtbEI2Zhm1oE2glHoR3Kv3TuJyRVGgTFAM0l0624z3OYNH4UNaisU3ZDsXCfgk CLoNEgVNkgUaLLl2Qw2Lv+zq2h2pmtJIJByBTNouTINjb7L1es27lGo+epmdvYA+pVji t7TnNOFNy5717kJ6dgTADtXwXDIXWvHrMyvGG40SHtHiOKyc8Acor+JzleLq5JZZemOh vs0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=V3miwBN5IwwSL9GTcKFlkJLkNfHwlmPFsY5VZw1t92s=; b=FceMT5E4Mgw5hlvX8XS20EFwWed0LRBJ2FE05TcGwR6BK778TpY02J3SWmhi+cqHEV TjGIXFTyR99z9kqMEo2pv5Yijfu8ED46y+9HrkmHrqo/4j/lfCy1GYZa067P2a4eyBab 7cqI9Cl252SdLY/j3GanMpBtEhMa15meB3QeVmgiOEovXyoxJ+yd0nafHmxOk0ztXBNC XhZ7qPprjFpDDKbnSn/4XxdKQN5hzlWfb7EzP0rJ99I/M/U6oIf6ahOH59MGCSQFYWIh k/VZiX4PG7wti7WPunpg9ix90KF204L6DsAhQX/Wg1mB25s1eV5kFMCmRA9uwreHWrAE EGNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ga34si4344659ejc.171.2020.12.11.04.40.55; Fri, 11 Dec 2020 04:41:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437132AbgLKIr6 (ORCPT + 99 others); Fri, 11 Dec 2020 03:47:58 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:42287 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392611AbgLKIrj (ORCPT ); Fri, 11 Dec 2020 03:47:39 -0500 Received: by mail-ed1-f67.google.com with SMTP id v22so8486828edt.9; Fri, 11 Dec 2020 00:47:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=V3miwBN5IwwSL9GTcKFlkJLkNfHwlmPFsY5VZw1t92s=; b=Fb4A/HWVy2YO3sJ33ygvYz11XRoNjfJvGGxr88EM8/+2h637JdBrfw7CC6WCchqKoU GYWniTb3TvM+HLCq/AQNU69Dn5ANM+dTo/rAnleBEuK2XPrB78POP6qQx76MkVPDjY3q eqO7s4tp3twfveEUoycT2JFl4bg9nDZMEPaVzn8G48RS6eLv87si+nfQAgRQ9vAbTSmY LQ2OHycCiWJrBLCp/sXN5L4LkhKaCzUAubxFpLmYXTI9PoggTbNvgsyjE1FuYqNatw2D DWjRi7EAKTGsnGOyt9lf36xL+216E8d1/bItgHZMoT0Gl5mt625PMTY5PsP4tQWeYIur cw/A== X-Gm-Message-State: AOAM533hCrdhZizqa86yUVDLNcl3W7qHw7RW8eb6entwasW+NMSowSeZ x00iqEEz6fbEsM3WiNlOVZp3UMa1qHPC6g== X-Received: by 2002:aa7:cb49:: with SMTP id w9mr11045398edt.357.1607676417217; Fri, 11 Dec 2020 00:46:57 -0800 (PST) Received: from ?IPv6:2a0b:e7c0:0:107::49? ([2a0b:e7c0:0:107::49]) by smtp.gmail.com with ESMTPSA id b14sm1336275edu.3.2020.12.11.00.46.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Dec 2020 00:46:56 -0800 (PST) Subject: Re: [PATCH v2 0/7] tty: add flag to suppress ready signalling on open To: Mychaela Falconia , Greg Kroah-Hartman Cc: Maarten Brock , Johan Hovold , "Mychaela N . Falconia" , linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org References: <20201202113942.27024-1-johan@kernel.org> <6b81cca21561305b55ba8f019b78da28@vanmierlo.com> <3fc3097ce1d35ce1e45fa5a3c7173666@vanmierlo.com> From: Jiri Slaby Message-ID: <54f40116-9a11-8daa-d3cd-5557cc60a4ef@kernel.org> Date: Fri, 11 Dec 2020 09:46:54 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10. 12. 20, 19:59, Mychaela Falconia wrote: >> O_DIRECT is an interesting hack, has anyone seen if it violates the >> posix rules for us to use it on a character device like this? > > According to open(2) Linux man page, O_DIRECT does not come from POSIX > at all, instead it is specific to Linux, FreeBSD and SGI IRIX. Thus > it seems like there aren't any POSIX rules to be violated here. > > If we go with O_DIRECT, what semantics are we going to implement? > There are 3 possibilities that come to mind most readily: > > 1) O_DIRECT applies only to the open call in which this flag is set, > and suppresses DTR/RTS assertion on that open. If someone needs to do > multiple opens with DTR/RTS suppression being required every time, > then they need to include O_DIRECT every time. > > 2) O_DIRECT applies not only immediately, but also sets a latched flag > whereby all subsequent opens continue to suppress auto-assertion > without requiring O_DIRECT every time. This approach by itself runs > counter to the generic Unix way of doing things, but it may be OK if > there is also some ioctl to explicitly set or clear the latched flag. > > 3) O_DIRECT applies only to the open call in which it is set, no > built-in latching, but there is also some ioctl to control a flag > enabling or disabling DTR/RTS auto-assertion on subsequent opens. 3) -- to allow standard tools to work on the device after the quirk is set up once. thanks, -- js