Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1124235pxu; Sat, 12 Dec 2020 02:56:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJxmSSSkjz/93zC5O5QbTboHiwrVyYGcL30klupMdTHL3+/aFYrLafW7tIedRD/1EW2DspFo X-Received: by 2002:aa7:c2d8:: with SMTP id m24mr1591367edp.300.1607770560504; Sat, 12 Dec 2020 02:56:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607770560; cv=none; d=google.com; s=arc-20160816; b=DtjjQqLgXhUbmWQ1GeQDT3zwzowi+pQzn6esW9INRIzjrMQI32Vf0bVPNQsm9S6Oyn fMSg03O/TtrpRf8D6lNRe98ECedqb3zRk0AKtZb2mD6XeX+ajFBWbyXqy8vIyAqDlnnm dVEYna6tI+FycK5VSLRGLfELJTn3dwqAWg1/Aw0u8xAGoBhqU3JnoHCuqjsbWlEZQpqI aKknIFu18xNlteCLPpF38hRbirv3WgISjy4sVsOZNaikvBJ3/55qDOm6YNzpQUkwv2po 2IaviZUS/H51FPmSP8KZ7ChdXf7wPYp/KGvMP9t3GItvchFENWea9ymrdFZEZm4BT1kC ZKVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=onb0vWvYKVgv9jIlAPZEnDCvyKGaQ1qrw8/SN9or3bY=; b=CGD67HtT4yuFj2NimbAFLM30/vp0HKwaGIXlJG9yQdslqfpYwx7XxX9wFYm4NirLTO CrbGdqBbG6PIXuX9z0HkLL21jn74/wDix/fGicvTHYBEklEyrqW9UcMdidEM8Pvve/rW uhSWx6SqcqeCZPEfsZI8n33HaJm4uTevJhYMr9ck7eDcxgGJSyN7KmtZRCe2c3vx2F7f spe75le0h/QXzA2PdOq9TE3wMRlHw+W294RUvHyLJzo7IzIX1Q9tb4r01B85XLQnCiNy QTJX4AtCJfyAN1ug6dsMQh+s+PR6hjT9F1aOnuTSFmCqG7E6D17amD8MYc1NWEc48zhl 02Rw== 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 gj10si5967207ejb.578.2020.12.12.02.55.37; Sat, 12 Dec 2020 02:56:00 -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 S2389513AbgLKKnM (ORCPT + 99 others); Fri, 11 Dec 2020 05:43:12 -0500 Received: from mail-lf1-f65.google.com ([209.85.167.65]:34080 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390487AbgLKKmc (ORCPT ); Fri, 11 Dec 2020 05:42:32 -0500 Received: by mail-lf1-f65.google.com with SMTP id m19so12709329lfb.1; Fri, 11 Dec 2020 02:42:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=onb0vWvYKVgv9jIlAPZEnDCvyKGaQ1qrw8/SN9or3bY=; b=nGXM0zml1ETlqZT5hZN5HNpGFKOts8TOnvd9C1joR0hhyccROwmiL/oGM9GQ2wSgs2 6pBxKyT54+lJ4EA6vUXm8LnkYw/bWtS7irb0l5apE0/OskykQ2WgXKzEDcrgTIo/NQyL Dqt2dGNa8/mMSI4mxbGmauPscSZHnA2I+4smr7vS9xFTfemCpammSA/S+OsGiEZdwrWd Zwfw+csv6sirqYvfKUxudShfIDzpokWw26JLz95PfuU976KDEMNST4gKZhNq8oIA0YN+ 2IoTVoiR91MR5xCbefLk0bD1//tD8nYhkJge0F8StHOji/fPprzUoncyXc/HKYSn0jQ9 ymjw== X-Gm-Message-State: AOAM533dPYohZRCLnYanEl5+v3fkOHbOarU8aVf94L+/Sgmhc/g9e37B i5oattw9ThPWBR/I7sl5kjw= X-Received: by 2002:ac2:4307:: with SMTP id l7mr4093684lfh.304.1607683309183; Fri, 11 Dec 2020 02:41:49 -0800 (PST) Received: from xi.terra (c-d2ade455.07-184-6d6c6d4.bbcust.telenor.se. [85.228.173.210]) by smtp.gmail.com with ESMTPSA id i9sm953906lja.56.2020.12.11.02.41.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Dec 2020 02:41:48 -0800 (PST) Received: from johan by xi.terra with local (Exim 4.93.0.4) (envelope-from ) id 1knfru-0000tU-OJ; Fri, 11 Dec 2020 11:41:47 +0100 Date: Fri, 11 Dec 2020 11:41:46 +0100 From: Johan Hovold To: Maarten Brock Cc: Mychaela Falconia , Greg Kroah-Hartman , Johan Hovold , Jiri Slaby , "Mychaela N . Falconia" , linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 0/7] tty: add flag to suppress ready signalling on open Message-ID: References: <20201202113942.27024-1-johan@kernel.org> <6b81cca21561305b55ba8f019b78da28@vanmierlo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6b81cca21561305b55ba8f019b78da28@vanmierlo.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 10, 2020 at 11:41:24AM +0100, Maarten Brock wrote: > Hello Mychaela, > > On 2020-12-09 23:49, Mychaela Falconia wrote: > > But the problem is that the current status quo is fundamentally broken > > for those hardware devices in which DTR and/or RTS have been repurposed > > for something other than modem and flow control. Right now whenever a > > "cold" (never previously opened) serial port is opened for the first > > time, that open action immediately and unstoppably asserts both DTR > > and RTS hardware outputs, without giving userspace any opportunity to > > say "no, please don't do it". Yes, this behaviour is codified in a > > bunch of standards that ultimately trace back to 1970s Original UNIX, > > but just because it is a standard does not make it right - this > > Unix/POSIX/Linux "standard" serial port behaviour is a bug, not a > > feature. > > I agree. And an application not configuring the required handshakes, but > still relying on them is an equal bug. Ehh, don't be silly. Relying on having Linux assert DTR/RTS on open is in no way a bug; it's the standard behaviour that we must continue to support unless explicitly overridden. Period. > > But if there exist some custom hw devices out there that are in the > > same predicament as my DUART28 adapter, but are different in that they > > are classic old-fashioned RS-232 rather than integrated USB-serial, > > with no place to assign a custom USB ID, *then* we need a non-USB-ID- > > dependent solution such as Johan's sysfs attribute or O_DIRECT. > > Any device with a classic old-fashioned RS-232 has probably already > solved this in another way or is accepted as not working on Linux. > > And then there is also the device tree (overlay?) through which a quirk > like this can be communicated to the kernel driver. Not sure if this > could help for a plug-and-play device like on USB. Not every system use devicetree and no, it doesn't help with hotpluggable buses either. Johan