Message ID | 20231018174840.28977-7-l.sanfilippo@kunbus.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp4963951vqb; Wed, 18 Oct 2023 10:50:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHpbN2iWkVL+rOVA9AlJCFfQKahxcmebMlaWZjyTAPtA8BCMSzNyWET4qQ7gAzAq7l2RWdS X-Received: by 2002:a17:902:c401:b0:1c7:37e2:13ff with SMTP id k1-20020a170902c40100b001c737e213ffmr114963plk.6.1697651413980; Wed, 18 Oct 2023 10:50:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697651413; cv=pass; d=google.com; s=arc-20160816; b=Z8fgE4ljJ+dzLGaPSVJ5pv5AQjqdBZalvG/BBOCWqOTPvOkqezQ307g8BKwhi/wD5p 3xffeiQqawOqmQpqyNXCc5sRsmFlT2wGWVYAHF/M3bueYP4Byo6DG1ICs2/fx0ZvYmsA Z7jS78SF9Qx8Tz9xTEi8MDwQv0xBEM/q8cwmbYwqqjv2pqYwal8amAtiZITO325MH1RN QUO+larIEoLc9GeJqRg3LSBzFAt5zrzU8KxL9bUF5B11IK0zSbwykz8yF+DmsbJLVaZp wQesl0SvEQNGj8klww7mvfeRsQJvA9XX4TLNdp6QcnABq/ypl6YxBrQhpi2ajlzcAmPA jsVQ== 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=7/vH9Q9jKs2GzlPx8DEoi1T0SBAlJ5DZXJzhZrsbsp4=; fh=TkiyChPg6bbF3HR9T06bpNLcepPHbldn/GrIZCqgMvI=; b=BCKhaotXadfD8gd/WhArkiqHxjUCUsk8z1rGJ4Aq1dD12Q4I5tGmcrN6sCJTWnpREQ 9SU7ZEnXZ7SPULIE4BBs1+mK2dUJDENvZ0KQFRGv6zdcf+GdvuJrsOn0Wnv1IVQGIs7f GEuADGwqXLUKBeTHnjr3Maq0sNHVETVmgc4kUFea7D0zH2FQ/3Ka4Lo1WCsoQBh9atDq dojFeV7w0L04G+93opB36+oMT0XOCxy1grGnn8ZDLbLieh9CAKebvN+GyOnJV4VDYbMQ Nl2eij5rKrA7S8RieM5oi+aqCZQV67pUHZO+mRxcHwwu2JgQAt8wrPKJ70rOExzUArF1 cOHw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kunbus.com header.s=selector1 header.b=GYTZBziU; 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 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id jm17-20020a17090304d100b001b9d180fd9asi321584plb.121.2023.10.18.10.50.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 10:50:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kunbus.com header.s=selector1 header.b=GYTZBziU; 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 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 7589D81BA640; Wed, 18 Oct 2023 10:50:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231335AbjJRRuJ (ORCPT <rfc822;zwp10758@gmail.com> + 24 others); Wed, 18 Oct 2023 13:50:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230462AbjJRRtx (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 18 Oct 2023 13:49:53 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2047.outbound.protection.outlook.com [40.107.22.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CBDD115; Wed, 18 Oct 2023 10:49:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ir/xu8jj/brKyr8EdoM/iyZl/ho1UERPFGAsXiJ88LqFkHlz5o2wjXe/OVyxAT3CluBoKXeMYqYpAWMZr3GjzMtPRCKzGw07cE28jgmZy7TEQSRdMl+IluNcXqAREYIxcrRCKyz/HgcVpRnRPAJesQcvnn6iwaTMci+a2t6huOLpjQamfwmR5k9+iQ7haj9JDezTS6OOTscJ3gEt1e3MVp9UJvXLExmnFoTWcsN7m5D32gtRDXjhqzs2sIRfQ9dbPRXRh9xEjSB+RebeScHNZKlssRHSzItTuN/qL+q2BTKUdWTp6zIKKFTMnoYHpU7Q9aqjTOtjW4QmYsNjU5qnKw== 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=7/vH9Q9jKs2GzlPx8DEoi1T0SBAlJ5DZXJzhZrsbsp4=; b=Y7dqoMSie3hYNki6v3NH0JcfTG2LLhojE2KGPhRVdx+BN+epFzYHYB/70FOJmxCpjRvYvoa4xYg5f+A646gloWWZWhMV1BxuM4FeuI7rS5rqpVNZ++dDL0bjHf+pys5KiPv6nR0ihEYWFGnkmJzbBFzaHS/nB5Fy6h/FaUJxxQglxnornDtIcxEfNgMk/m2vTx/gJQSTBbSlXNiQ2tPuLi8dd21hopL2CATCy+/HndWt0kIVX44WyoqMbUTs4RgQbhBFe11iml8SyR6SNU0oblTznxEPHK8hxhXhLYh33qaKoi/c4A0cAhPw02tKTSNkh4apEwRTdZXT3cbfWlcpUg== 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=7/vH9Q9jKs2GzlPx8DEoi1T0SBAlJ5DZXJzhZrsbsp4=; b=GYTZBziUvrEq5AnLQr0+QYDpXMfz27fmrhSSRAnHGzw1iglOkVbwooCNpNclsqZtOaqGuOKuxFmHudFBPLmHuYS2XsqwqubUu3qdnZjB8qhLw7+xKPVnNG4ZrwpNTI0RyRizIY7KfdW28jb18dTxgwUH6fUwZl5KRKMy4Rzm1as= 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 AS8P193MB1478.EURP193.PROD.OUTLOOK.COM (2603:10a6:20b:350::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.23; Wed, 18 Oct 2023 17:49:40 +0000 Received: from VI1P193MB0413.EURP193.PROD.OUTLOOK.COM ([fe80::550d:2425:c0ed:3e59]) by VI1P193MB0413.EURP193.PROD.OUTLOOK.COM ([fe80::550d:2425:c0ed:3e59%3]) with mapi id 15.20.6886.034; Wed, 18 Oct 2023 17:49:40 +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: [PATCH v4 6/7] serial: omap: do not override settings for RS485 support Date: Wed, 18 Oct 2023 19:48:39 +0200 Message-Id: <20231018174840.28977-7-l.sanfilippo@kunbus.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231018174840.28977-1-l.sanfilippo@kunbus.com> References: <20231018174840.28977-1-l.sanfilippo@kunbus.com> Content-Transfer-Encoding: base64 Content-Type: text/plain X-ClientProxiedBy: FR0P281CA0130.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:97::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_|AS8P193MB1478:EE_ X-MS-Office365-Filtering-Correlation-Id: b418d7cd-1bf0-4084-071a-08dbd0029a82 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VHAsiq3XvAxdS3WWCIwFicMti2yPapSJO9fk5y/kCh2nB3Dwkp2jr+5XpBhMnSjD3MI6k3vOAYaZLmeJK0ywHtITk34ZQ0aqAI7bHUoVrHqqXDqowR7fleEMQ9Sw6H5Ks2DoZ1cj3gSQnDv/yNP7yTjD9VpVc1HTS0ppbTBujU1+iEpfwPvwIyFgwd8VUsmBjhNNFtJLQjNUv6XgtjMsHH0SP88trX7dSKUW8J27Uf66Y6Cmts340mAvMoYRufGAu/Geu+NhRjeWDMRrrrSYe8uLHjMsvcigB/rMM3Ci+of1y/8SJoQI6jzY7QfepFu14wdLg+X4Os2/WxqKedvfSowpqpJEMBh9Tl0VqpFG2RRbQGzovAh00AbwOMpRLjTnXv+UNh0GGfvHw12HLsJWLGpXJ4CJqYTUOCAyipJm+5pdErhv86+fRVQBDjJN963W1w064ulohxrRHROTsBkeHq2iaWTDHbTNf72BQ+iHyti4R1UP6Tk+bRDIXA0tNer87VrpTj0AJAM9ejLFh1QAQS5HYteWGwAjnYZEOaPWJhtZvYE7NeBzZ+Vq+YvixNnG 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)(396003)(39840400004)(376002)(346002)(366004)(136003)(230922051799003)(186009)(1800799009)(64100799003)(451199024)(36756003)(66946007)(66556008)(66476007)(86362001)(38100700002)(1076003)(2616005)(83380400001)(6512007)(52116002)(6506007)(7416002)(6486002)(316002)(478600001)(5660300002)(4326008)(8676002)(41300700001)(2906002)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: SOdOzTbHzjsp/2/fgazchfTclQfhrp25bQ4MxcewI2BzGYsmJlRxMKAUzulQ3+rcBNioIcEdmgXXbRmCFSxI4FJt0KYADOGemdVirBMvN6npYsLT0wbH4dNb7TFi+payxIAqTnLKY6jgiFqLCQXCQWFaREHs5TXKAIsIhDlBrfaTfUDdm3cvvNIGyfgS+PNvLhP7PhmXeW/l5roZBWijWqAGV0tJGP6My+ae05RXehNBkPzXTX15RH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X7c5fIOWfEEziJkmY42H9GuN/4EJ+49FLlYAOfs/ZcHCeFCxMlpYJQgzgYfwGQbT8E+heIdGBqp6l2ZXY6Eq16FAUBiybJzeiO79GZpHoaXDVGv9/ODNOCo42iBH4G5fOkbigN62eoz6TsQ3NiOO6Jel0HvIAFEvS8E/pSmdiscd8MQVUZFrGoYAK27bz0vlu4Pfpg7vvT+nK1ZwRwRd/HzADrljZ7xUtQduMXAavl8+af5sy3dNPU/YMDL2+qFmUOmGpQdE7TQcTD6xA4lWGGFBJFPLw9ofpIwGD02va3l0d2uDrndEjEAcjPJBLa/QCP/HARf35aod1 X-OriginatorOrg: kunbus.com X-MS-Exchange-CrossTenant-Network-Message-Id: b418d7cd-1bf0-4084-071a-08dbd0029a82 X-MS-Exchange-CrossTenant-AuthSource: VI1P193MB0413.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2023 17:49:40.5117 (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: HDxx/nWxUXTX6mEinBFWvpZd35WRx4a2pS2N1/jsgQBIJP11JRchSNQ2WqY0KE3jW9K+eJHzEM3+f4JEmsmb2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8P193MB1478 X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MIME_BASE64_TEXT, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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: <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 (snail.vger.email [0.0.0.0]); Wed, 18 Oct 2023 10:50:12 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780116529028336504 X-GMAIL-MSGID: 1780116529028336504 |
Series |
Fixes and improvements for RS485
|
|
Commit Message
Lino Sanfilippo
Oct. 18, 2023, 5:48 p.m. UTC
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(-)
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 0ead88c5a19a..4f7ee4392034 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);