Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp483190rwb; Fri, 18 Nov 2022 04:26:20 -0800 (PST) X-Google-Smtp-Source: AA0mqf6XvtwsHpCHIqtxrkRbjPg/ZUdJ44c89ujN9UKHn3EiUvq0j6dGJc2aZa3IvyZ6EjOlP1mr X-Received: by 2002:a17:90a:4496:b0:20a:f638:3c9f with SMTP id t22-20020a17090a449600b0020af6383c9fmr13740551pjg.38.1668774379994; Fri, 18 Nov 2022 04:26:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668774379; cv=none; d=google.com; s=arc-20160816; b=vyL9JdIrVINgK4dBWG4ahAZxMuxp0GAWxfEPGCEGPld7nP5rUjQDwoMxa/zaL5BSoQ Pnlt9DWQ8304X6o91BsI5JFymxqOH0yzC7DnZF/E+8uXLG1fF+VjeIfGVCWHH3IHxmNj NVVn4bLMGBiBN7LrJJHdw2uWWNMrydnQ7GGLbaDuybNUI7u7peI+Zamc8NwsJfr6zelz YxnSO151mfuXmkHUqg8WgB62610GUKzPfv8n40qRexyRDD3SiqeJbW4lBbsnRHvAwZgd WcFHhlVNtkM/Dlk6u0a3HOt/AafKVKAezW22qPyZQ07pSPtFRw8ngD6f9k15IirJAAvj uWqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:date:cc:to:from:subject:message-id :dkim-signature:dkim-signature; bh=QIh1dsN6FNGfG4QOukreO86wpMqHHOp+PVH82+/U2Pc=; b=E4tvG5wAFEShGSJb+iL0fDjri/hsZxge26jVAsrtSwvmYkhwDg7FQCXjcEMFQgI+SE +ap054tF6L43H/PeRPifhGlxCO/+bw95ujQk14TxwcFhPZ/hdG14bwo2XEBqolHWLc8j jQYDLq0prmQF8RUA22J1ZTvrOc3Y5OJdNhrN5t72jaVP6p/G4ESblX/At8lhCjIx+7pr 0wACz36kaCN+qbNGVSsFxg3Z4TU504oiAUzrUIGHcAVXqOInLsP+KvqVh9vKtUKu9miQ 9l1A5gkeKYQ5McfSDZ9uQDvvE9nfdvIcelPaQ1Qg8FAeJSd2OewboGgAdz/+Qh2AE7XI 9/DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tq-group.com header.s=key1 header.b=cCZuycHk; dkim=pass header.i=@tq-group.com header.s=key1 header.b=ntatMiEj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tq-group.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l14-20020a056a0016ce00b0056ec68563d6si3843075pfc.135.2022.11.18.04.26.07; Fri, 18 Nov 2022 04:26:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@tq-group.com header.s=key1 header.b=cCZuycHk; dkim=pass header.i=@tq-group.com header.s=key1 header.b=ntatMiEj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tq-group.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235230AbiKRL56 (ORCPT + 92 others); Fri, 18 Nov 2022 06:57:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232495AbiKRL54 (ORCPT ); Fri, 18 Nov 2022 06:57:56 -0500 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9322978185; Fri, 18 Nov 2022 03:57:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1668772674; x=1700308674; h=message-id:subject:from:to:cc:date: content-transfer-encoding:mime-version; bh=QIh1dsN6FNGfG4QOukreO86wpMqHHOp+PVH82+/U2Pc=; b=cCZuycHkCdTAdepToZjznIArcdEmqFpGpjzsClzN9QpEW5wrPvCrR6P4 luso5iqvlTFCLbbaESljnRpeuFEn630Mg5BFMheMd+kFIoO/rzeFQgILQ V+SZxgCH1e0thkAtKZoMdfiki8ECtv0ydFYm0PwSbK6oaNibXO+O9ozPE wnJ775Ah+nGgDt+aY3DYL6xfw4tgxGdMxWvF33+U7TNSFymYe9Tq908xX E1kTcEbvQcgtoXsoaXrA9Kmkf8HcrdECBE7QQ0zzeQPhoUhHxVrMTOsvy MokndAWVA2c+ilpwg/3N+ztFazJ4rH3H8qcM5n8pPjaYoGb9JvdRrKM3W Q==; X-IronPort-AV: E=Sophos;i="5.96,174,1665439200"; d="scan'208";a="27447524" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 18 Nov 2022 12:57:52 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Fri, 18 Nov 2022 12:57:52 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Fri, 18 Nov 2022 12:57:52 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1668772672; x=1700308672; h=message-id:subject:from:to:cc:date: content-transfer-encoding:mime-version; bh=QIh1dsN6FNGfG4QOukreO86wpMqHHOp+PVH82+/U2Pc=; b=ntatMiEjZT3uLgqt6l1KSDyPPYrwrvbGuoZMK4twvWjhEjuC/nRsumVY h7HpF+uC6LmgUVYNmuvb3vgPaYUsr+lzWvvLZCazX+Ob6aUmqaa3IAKWj 7c5yixB1yd8P8fWy/2btj7a+NExika6kApeu9ieSFAIhfxPh5D5HH9IGv g51tTPGZeZ9Tq6wCMxeqkvb/3+O5x0eRKwF0fBATdsX1ioXBAt0xFtcsn JW6+0wGI4GxDHQCx8vcWFH4kL4ryCU8yQ19eu1O0FaJHcnqlP/DQ6lcrS FtBR8sXVg4JqbunOuhcZ6+OOJH1I56nBv/kgvYjLzy464mrmneopILKOj A==; X-IronPort-AV: E=Sophos;i="5.96,174,1665439200"; d="scan'208";a="27447523" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 18 Nov 2022 12:57:52 +0100 Received: from [192.168.2.129] (SCHIFFERM-M2.tq-net.de [10.121.49.14]) by vtuxmail01.tq-net.de (Postfix) with ESMTPA id 31339280056; Fri, 18 Nov 2022 12:57:52 +0100 (CET) Message-ID: Subject: 8250_omap: incorrect RS485 RTS on close during transmission From: Matthias Schiffer To: Lukas Wunner Cc: Greg Kroah-Hartman , Jiri Slaby , Ilpo =?ISO-8859-1?Q?J=E4rvinen?= , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Date: Fri, 18 Nov 2022 12:57:49 +0100 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Lukas, I've discovered a new issue with EM485 in 8250_omap (and probably other serial drivers as well?): When closing the TTY device while there is still an ongoing transmission, the RTS pin will get stuck active until the TTY is opened again. This can be easily reproduced by running `cat /dev/zero > /dev/ttySx` and then stopping it using Ctrl-C. The issue exists in current mainline (6.1-rc5+), and applying "serial: 8250: 8250_omap: Avoid RS485 RTS glitch on ->set_termios()" from next doesn't solve it. I think it should work with "serial: 8250: 8250_omap: Support native RS485", but we also need RS485 on AM57xx CPUs, which don't have native RS485. I intend to look into this myself next week, but as you've worked on this code a lot lately, maybe you already have an idea how to fix it? Regards, Matthias