Message ID | 20231119112856.11587-8-l.sanfilippo@kunbus.com |
---|---|
State | Superseded |
Headers | show
Return-Path: <linux-serial-owner@vger.kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F7AEC072A2 for <linux-serial@archiver.kernel.org>; Sun, 19 Nov 2023 11:34:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231972AbjKSLeB (ORCPT <rfc822;linux-serial@archiver.kernel.org>); Sun, 19 Nov 2023 06:34:01 -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-serial@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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P5quvOXb2yOMIyHJDCgaSSNZlKLA1DVSm4gaTAvexMMnUujQhIol7oaFJiRrCrID1Ltn+GYA2egm9oZOuXS5809m105EtaOiCuD/v0thxbipgSOdIJoj2FYR5f0y6DlXmC1DoHXsqfA2ASw83h0rcUFjBqlh/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 Precedence: bulk List-ID: <linux-serial.vger.kernel.org> X-Mailing-List: linux-serial@vger.kernel.org |
Series |
Fixes and improvements for RS485 (RESEND)
|
expand
|
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[] = {
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(-)