Message ID | 20231119112856.11587-7-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 BCCFFC5ACB3 for <linux-serial@archiver.kernel.org>; Sun, 19 Nov 2023 11:33:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232035AbjKSLdw (ORCPT <rfc822;linux-serial@archiver.kernel.org>); Sun, 19 Nov 2023 06:33:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231233AbjKSLdf (ORCPT <rfc822;linux-serial@vger.kernel.org>); Sun, 19 Nov 2023 06:33:35 -0500 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2064.outbound.protection.outlook.com [40.107.104.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67B4A171C; Sun, 19 Nov 2023 03:31:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Rp2xRMGjs/OAEPIR4iZshHe4TRW1v14fvnVa9Rsaftbh7ft4DlNWpT8YZsdGAFZD2uYNc0YYiY2E7TVpT1bnfEMclvteirYUivhWBGaGOHBVvZeVH2X6o3ZmsGJw3iOOAWM3+RsMAjwrQsFw0LpmFcEOgVU56ytTrJtS5KE+Tu0WE1R4xQ5WvjZkGpesU931H2D1PW0Lq/ohsrSyK5uUqjiUz+iR0BZJnT7SETMF4IXNWFgtFwGiyS9cOV5vQvTFH6S2YGb8STbrcGhPDlWBGG9p35gs/x68/xNKSqy1pa8zUJlwxaCEqc6KCFzdvMj/PoZabOM3srKHCbe+YOsH2g== 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=9sRBm8gY2tDiUYzcClFGE54s4heCXu5xxHjSH1pF67Q=; b=AZ7Ag5nRr0tyLckH38dbkBC1J+I61gvA34zjA0LoeTXeTw0k98d6cb5tLFpov+RWhsGvxLDUc0TU4ArQJd1u7WcCwbylvr8yDeqt3+iztiJfTf4tsGVq4BvsL/eI4WKKmx1y/FXdmtg2z8CW3u1S1FsgSQo3hmqDKNPBmQHIMmx4mTP4I5sd0jYkb1H5CyOyMu2V4dE4u2pLagtFioVw/ElOdZ/V+rVwAzbslhgswqp0sbvZae97Bve5fZf00S/K8sc74UR7anwMshYZOq2+WmOplCTJbARExHLLB30k52pRXBGPxXgcMgqtIxws9e/B3UzNmTAGyiHZANr2MKgfLA== 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=9sRBm8gY2tDiUYzcClFGE54s4heCXu5xxHjSH1pF67Q=; b=XofNqO6PcCF4MmU/CFqn9rx8fA2Z9aHxirsgAb/NJqOt/9Zy1L9S5uTO78yibqKE8Bp0K+mePZoolzFeky2DjI+U+1tis791TT6UaoFQr8wY4Nd3Cc/kujLlVNJuCSBi+S7m7EyENmjzUqiL6t7wy6FS85s/dO/cH8Z6yviCaJk= 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 6/7] serial: omap: do not override settings for RS485 support Date: Sun, 19 Nov 2023 12:28:54 +0100 Message-ID: <20231119112856.11587-7-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: ad1d9d0e-d8b0-438a-fea6-08dbe8f2ded8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Sx2pcj8IhFGyLLrJ93U04KCqNpFpRn6F9CjOfv60TqM00A5aLN0cDERetSZrdsPcreArJX3XPOZVx5TC3V2otFjhGZ5eaHNQMpNjWsZXW8SiaaIxsmsJxcd6gTGTqE+DTCvCRn0C57TVRRa2/z+Cie5bko5QpdqPzcPMLBZYMYsoUO62OMxG3KdilArTWrH+Fj6Nl7xNE1hGX8ZoPN9pm1rPgQxU7sUdhF4/5K7g+w265iSQvGbj0EgjJoyNRWEhOtkwtlX4BDB6Dff69vRZuoi7YUvSAp443bzOyh5xDhHTXKOArO3ZC0y/moJ8fCfDmki+L5SL5tAcXImbk1bPDA/3C9I+Tij1nerjeCocYokdGksrYqJuJCLftjsi7GWphzl8ZMEmjsb4W2Sfw8wb7b4wJIYj/WcVxKd81TxMM+v6oKDgret/DZXbBTivxFNHEFDEHtxeqDZvgzP5kNuDz246P/LtHirH4L8CgyC3Cv6264ghiZZ9rksryXftLohY+dmcZM//8teGmKWvGx4j9wHyIIK3N1oarZ4VbRNhZ4OYhy8GBeZPVHAEWxYCh02n 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)(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: tJfAXPFQ9frJgoDsfZKkDxUsfRSudgM6Vyl9ML77X0M1Sm/+8x8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0bKLzSQ7EHfP8MQ/BeUPVFyaihDLtVq9n87cNeJegPj+7Lj0d+v+7t0HxNT3J8kgYK0zNFuH1QxqDHkFX2f+vqqojCiDe/MLL9UXw6UtH9qfmiIqcPKR322BlgN8bIONiml6wEq+HGnwmNR8pLJ49Ho7rOWXbhOPSwqSsoFZfKXOfZv/lapryNlKBUmHjHES+p+D1QePiXQC4KS3xkcbcWK9JfagkgiBthIA6icRU+s5Loeamhr83G5LZ+XucJGA8KRfaQGcA614G5y9N8mrhTKAoDimgBfIqbedFzXfYd48luN0gFBx1hN4cSwnuopX/R7aVKCz/cHD8530Doxk8/NKICfYcFVql7Ibkud3AJYoqIefciYmpgh4vNKq+9NOD1VEWV/jcbSpuW10mgz04OqMYc3jgyZM7y8fWqEPTzt0OxfHyGHjWLgzQtdEEt3qS+IyYQCIwXAH7vNVmUE1gPVykmiA5xDG7SpfDm9vCMx6bW6JjAptFKgNA8O1s2VXy7YOMgMOJmvTW7 X-OriginatorOrg: kunbus.com X-MS-Exchange-CrossTenant-Network-Message-Id: ad1d9d0e-d8b0-438a-fea6-08dbe8f2ded8 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.3019 (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: /Wshz98cV/eg2kskAUluFsjLgwjQEN6fLYnzTLdTFXIVdHr407mDbSZEhGSY/8rLo6Mzdk93h9e3WBES0k7Bhw== 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/omap-serial.c b/drivers/tty/serial/omap-serial.c index ad4c1c5d0a7f..d9b2936308c4 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -1604,10 +1604,6 @@ static int serial_omap_probe(struct platform_device *pdev) dev_info(up->port.dev, "no wakeirq for uart%d\n", up->port.line); - ret = serial_omap_probe_rs485(up, &pdev->dev); - if (ret < 0) - goto err_rs485; - sprintf(up->name, "OMAP UART%d", up->port.line); up->port.mapbase = mem->start; up->port.membase = base; @@ -1622,6 +1618,10 @@ static int serial_omap_probe(struct platform_device *pdev) DEFAULT_CLK_SPEED); } + ret = serial_omap_probe_rs485(up, &pdev->dev); + if (ret < 0) + goto err_rs485; + up->latency = PM_QOS_CPU_LATENCY_DEFAULT_VALUE; up->calc_latency = PM_QOS_CPU_LATENCY_DEFAULT_VALUE; cpu_latency_qos_add_request(&up->pm_qos_request, up->latency);
In serial_omap_rs485() RS485 support may be deactivated due to a missing RTS GPIO. This is done by nullifying the ports rs485_supported struct. After that however the serial_omap_rs485_supported struct is assigned to the same structure unconditionally, which results in an unintended reactivation of RS485 support. Fix this by callling serial_omap_rs485() after the assignment of rs485_supported. Fixes: e2752ae3cfc9 ("serial: omap: Disallow RS-485 if rts-gpio is not specified") Cc: stable@vger.kernel.org Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com> --- drivers/tty/serial/omap-serial.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)