Message ID | 20231119112856.11587-8-l.sanfilippo@kunbus.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9910:0:b0:403:3b70:6f57 with SMTP id i16csp1606369vqn; Sun, 19 Nov 2023 03:40:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IFvgu3P/O1e+QJE3me+vtv1zQnMm+bZnYpmV8l5ddeH/QrUSuX+6flSzq635nV0Ivi6CVy8 X-Received: by 2002:a17:902:c94d:b0:1cf:531c:f5e2 with SMTP id i13-20020a170902c94d00b001cf531cf5e2mr4350001pla.43.1700394036287; Sun, 19 Nov 2023 03:40:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700394036; cv=pass; d=google.com; s=arc-20160816; b=c8LXzvZLrzuaVQVne6Dey+MOkSJRoPQh212c0Wr3JUXQGiwoUG7Vx4LfNdQchX9eZe TlOXTwRUc/9r2axKZbvzOoNLRWVvIrT7BX2tkTOcNASRbeJsYVsxKQEhYm+HTK5sbQU6 ey8+yyZcX65DhDq4Vh+Dxei6Sn1P2Y7WS3A2irP9bOvpeiky7qE+bqFKI7oyvXi7JTsa ofmGgUIJzvQO1tQUyQIqdynCcU8vZnMdVuoXIIf7jU8x6byHMXi5suNUABK/HNxzJX4N lPvCFGPxs37BDnhZFx3CniCdZXW6CGwwBHzCQyJ6On4UqAjF2ZbiA/oO1tgUcCd/OSc4 2pPA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CCBLbQLe3EP2f7hu3Tl5EQiwyecLdsnuvnoNW4MOtrQ=; fh=TkiyChPg6bbF3HR9T06bpNLcepPHbldn/GrIZCqgMvI=; b=pDrFszQvspJwXGvwHOhyfBbU1sZiq3utVU7qUHF/f/OLquneK4IkbYgGk1NXYSfJaf mT4ejRcceC4pXMXbfwIPxeqVzGSMFrDY1fRpjC7Cw2hFmBR4S1ZXxFEnjGIx0/iLFNzq SzRzFkZ5eMI3IGVLBejpzxxpOWFP4bV7foyaVkAhFS++sewM4YIhHW0ZvaIrOdn0iB+l fqb4YKuHnac1ncoxnUjE24PE1Zx7vtOd+9cDSmoI0G+lWrVEZfIidxUmaZr2/smmgjgp nmKPdmz/TiuO5CLehulxdj3sWrIDB1PMIYJOtIiE1VpihHXQ/MFToxF3hgH8OX0HudkZ 6ZeA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kunbus.com header.s=selector1 header.b=PtERTnGt; arc=pass (i=1 spf=pass spfdomain=kunbus.com dkim=pass dkdomain=kunbus.com dmarc=pass fromdomain=kunbus.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=kunbus.com Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id k11-20020a170902c40b00b001cf5d537eb6si303904plk.190.2023.11.19.03.40.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 03:40:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@kunbus.com header.s=selector1 header.b=PtERTnGt; arc=pass (i=1 spf=pass spfdomain=kunbus.com dkim=pass dkdomain=kunbus.com dmarc=pass fromdomain=kunbus.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=kunbus.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id DD64680579AD; Sun, 19 Nov 2023 03:34:04 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232098AbjKSLeC (ORCPT <rfc822;ouuuleilei@gmail.com> + 99 others); Sun, 19 Nov 2023 06:34:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230523AbjKSLdi (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 19 Nov 2023 06:33:38 -0500 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2065.outbound.protection.outlook.com [40.107.104.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93ACA1BDF; Sun, 19 Nov 2023 03:31:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XuyzIgxhSE9dxlsROJxWrIvo7la+evCTSzzXOCygkmwr+lgycWuoY6cwilWZETGLUSgH2qvKJp0bdIGdWFeweGlYRoIXs18EIwwEL3V5PrLYO3xilxltc4zmNERYS35ub/HJiIGs+B6rLmT7Ck9U2hxke4IXaRn/dKNU4drqtA4KbFF6LrcZvwZ3A3nSbBQt3Srzh/JePGkmZbqywHvfmBNqEAM02iQbpqT/v57ROYHZiLB0qizo14v3L6vfOxHanhc9HziMk7g+aONXGGP8aXj64lzMGc77jqinXdxnH/0PCCvat9XYtF4CCxvilDhb7uba/bnRA+Jrbs9O7EXERw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=CCBLbQLe3EP2f7hu3Tl5EQiwyecLdsnuvnoNW4MOtrQ=; b=fepJF2Wn/8eIdW3ceXD7VNYyv7X/lAeo2fe2iozGy4EXOgQD4ZuCDTZJlTIf0p3F0TpbjZ4hRLNRhB+iGPVLOzGo4UJ4JUoMr04UVd2M+OirMcjkkwbmhl2LZ0L64Hk+jqU2bIoMv7+YXXQyA7UIqPou8E1+9N7tmgAlLWN6hwBeI+rxOgrWsTlGAl7wlwIuTAiXMuSr+tIwuXnSdnIta2ld8weksE8sKfVN8NfnxjV5eysqQlEejxvsY9ElQcAM+qAdVojAqbqC6o0BCwgIXhj4m9GxSaaRij5V75OtspWHwOdUZBJNZIDe0xraQv973IY0k9D8gfvyxuyrMzvBCw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=kunbus.com; dmarc=pass action=none header.from=kunbus.com; dkim=pass header.d=kunbus.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kunbus.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CCBLbQLe3EP2f7hu3Tl5EQiwyecLdsnuvnoNW4MOtrQ=; b=PtERTnGtHgR0xI3i5j6IrH2PybvrEbCVTQz6A7GGgWcZmSzog74pEa53ndbvDZevdpjKWksS4jmvlsaBw7yAE2JeXCRIT/JXpyibLt8X1ZQMEyvGotdjCw2BUX0s8L3vccGg8uJlJnZo3FwLY4S29SmVRrF6J5U9Ah/POJYQ+cE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=kunbus.com; Received: from VI1P193MB0413.EURP193.PROD.OUTLOOK.COM (2603:10a6:803:4e::14) by AM8P193MB1060.EURP193.PROD.OUTLOOK.COM (2603:10a6:20b:1e5::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.26; Sun, 19 Nov 2023 11:30:02 +0000 Received: from VI1P193MB0413.EURP193.PROD.OUTLOOK.COM ([fe80::653f:d0f3:e7f6:8c06]) by VI1P193MB0413.EURP193.PROD.OUTLOOK.COM ([fe80::653f:d0f3:e7f6:8c06%5]) with mapi id 15.20.7002.025; Sun, 19 Nov 2023 11:30:02 +0000 From: Lino Sanfilippo <l.sanfilippo@kunbus.com> To: gregkh@linuxfoundation.org, jirislaby@kernel.org, ilpo.jarvinen@linux.intel.com Cc: u.kleine-koenig@pengutronix.de, shawnguo@kernel.org, s.hauer@pengutronix.de, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, cniedermaier@dh-electronics.com, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, LinoSanfilippo@gmx.de, lukas@wunner.de, p.rosenberger@kunbus.com, Lino Sanfilippo <l.sanfilippo@kunbus.com>, stable@vger.kernel.org Subject: [RESEND PATCH v4 7/7] serial: 8250_exar: Set missing rs485_supported flag Date: Sun, 19 Nov 2023 12:28:55 +0100 Message-ID: <20231119112856.11587-8-l.sanfilippo@kunbus.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231119112856.11587-1-l.sanfilippo@kunbus.com> References: <20231119112856.11587-1-l.sanfilippo@kunbus.com> Content-Transfer-Encoding: base64 Content-Type: text/plain X-ClientProxiedBy: FR5P281CA0007.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:f2::17) To VI1P193MB0413.EURP193.PROD.OUTLOOK.COM (2603:10a6:803:4e::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1P193MB0413:EE_|AM8P193MB1060:EE_ X-MS-Office365-Filtering-Correlation-Id: 4f578803-9a79-4f9d-fa19-08dbe8f2df35 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OSq0oRbRfkcJICtkyU/cBDmNyCzhEl3ssvSm/BUzyC/cCI+RdJ1DE5Vwvp5GnR+UD56UQRDgny3MLOCg+68NAtD2OElIGVkiuJpp0UYMrQ6Ke1gP55RgPg1YFIaGciFwX8oEXcX3mYPTIOow13FmgKVvzVsxRKoguTSMyKmRhwDsGqekc+m9WLTMN4rtKDP5H6K3K6iINBCZ6mUWhlpRYHiox4ckhkgVVlB1KRPSjkjcUmIkZP3iWvLjPlqh9XcmMXG/BdWqLuaEWXZgTGmsGN/7mQ/7+bn4qeZihLkkcpkz77FTEhHFn8X8Ofz4UF+poVqvLVn+RnJ77k6Vrm2/tPfJrsgwoZLhYuwf0wsiri6aBhdIBODusSX9aejxSmsgfOuxOazdgsF+ptHTnnzw8qIFZM6SAvWCEioXJ7yCvOkeiSKVjwiPKqxTUz9tDdtjDzAG7M9gSUs5EdenYKOk79TIQGbElsvTl0FB+qs/TEMWB2JlZB6JwgJqtesOE6lWg6p69ldfrHfA/jptmIupzNc9dmURWt8oKz5IDHgAbqUcuE2jsVf6M1fWHV9hoRsFp1jLBiwJ2Wm6d7SE003Et6lDCNPRoEUhYwe7HEY7gGk/QOZAuRYQgD3lt3LUtQux X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1P193MB0413.EURP193.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230031)(346002)(136003)(396003)(366004)(39830400003)(376002)(230173577357003)(230273577357003)(230922051799003)(1800799012)(64100799003)(186009)(451199024)(6506007)(6512007)(52116002)(66946007)(66556008)(316002)(4326008)(8676002)(8936002)(66476007)(6486002)(478600001)(83380400001)(1076003)(2616005)(38100700002)(6666004)(5660300002)(7416002)(2906002)(86362001)(41300700001)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vh5jelDQHAy7TiIUuM68eBUvVDrpigeeqH/81av+zLrCCu807fxNkT/HLNkFGKHLk8ty4nz7UrFF64KvFnGw3nbGHFEJ/qsmDQT1H49dYFMG9Zg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/asWwTYyJMegdPScHDNGlRAmPYg0DqaVu4y89XdkwblVawaLilQSlbhmpjHvkaWW4xi7ztmLJXiUETm839Nk8MORk2n3JcIwGPg4fmg/EtMa1VgD8ZZ9RRS/btByxwllVxo24lma4753J/0W8l9F2nNDUOPnnkogPoXEy1mmuPbOv+ZrknsqvEglTpJaikujMH/QKpiaEHRWUNdUfKv5F1i4ZSQb4Ia/w6rEBlfLk5wjrawPl80gk+1ORLrh1Co06qZnjZhD4oBfL4bYudVGSyBW9HvK0R+1uqQN7zSHJ0bDUxYWZgu99f35/bOsZVI3y1fcSaNXDJ5qPFk23Kmhe/htDpicH3BqOISRSkjtixqCSNXeLIkplVXmOkkMcBmd5nIX7I0gPy7yWhi2icqTl4iJsu7S0nGw68JE4Ll7Sp0uyV9K5Ky58SDeARFfaSen9s+WKGNIXulmmhrfbHL61UJSr X-OriginatorOrg: kunbus.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4f578803-9a79-4f9d-fa19-08dbe8f2df35 X-MS-Exchange-CrossTenant-AuthSource: VI1P193MB0413.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Nov 2023 11:30:02.8804 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: aaa4d814-e659-4b0a-9698-1c671f11520b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 6bw151wiF43gNnoIrhPWPTpYV0V15zdXLLvWliVLJPKgk4bNMbJucQpto+Cp3t49twg/1EqsTYrU28cVw0hAQQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8P193MB1060 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MIME_BASE64_TEXT,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Sun, 19 Nov 2023 03:34:05 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782992377397177051 X-GMAIL-MSGID: 1782992377397177051 |
Series |
Fixes and improvements for RS485 (RESEND)
|
|
Commit Message
Lino Sanfilippo
Nov. 19, 2023, 11:28 a.m. UTC
The UART supports an auto-RTS mode in which the RTS pin is automatically
activated during transmission. So mark this mode as being supported even
if RTS is not controlled by the driver but the UART.
Also the serial core expects now at least one of both modes rts-on-send or
rts-after-send to be supported. This is since during sanitization
unsupported flags are deleted from a RS485 configuration set by userspace.
However if the configuration ends up with both flags unset, the core prints
a warning since it considers such a configuration invalid (see
uart_sanitize_serial_rs485()).
Cc: stable@vger.kernel.org
Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com>
---
drivers/tty/serial/8250/8250_exar.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c index 6085d356ad86..23366f868ae3 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -480,7 +480,7 @@ static int sealevel_rs485_config(struct uart_port *port, struct ktermios *termio } static const struct serial_rs485 generic_rs485_supported = { - .flags = SER_RS485_ENABLED, + .flags = SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND, }; static const struct exar8250_platform exar8250_default_platform = { @@ -524,7 +524,8 @@ static int iot2040_rs485_config(struct uart_port *port, struct ktermios *termios } static const struct serial_rs485 iot2040_rs485_supported = { - .flags = SER_RS485_ENABLED | SER_RS485_RX_DURING_TX | SER_RS485_TERMINATE_BUS, + .flags = SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND | + SER_RS485_RX_DURING_TX | SER_RS485_TERMINATE_BUS, }; static const struct property_entry iot2040_gpio_properties[] = {