Message ID | 20231225113524.8800-8-l.sanfilippo@kunbus.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-11021-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp347851dyb; Mon, 25 Dec 2023 03:38:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IE9j1k8oDQGR8TPlU6TiMWr6Au5So6i3HYAoeZ65PCjfCODVZWH6xBFNpQ6BkithiPl+MxG X-Received: by 2002:a05:6a20:671b:b0:194:dd2b:a48c with SMTP id q27-20020a056a20671b00b00194dd2ba48cmr5010469pzh.16.1703504281345; Mon, 25 Dec 2023 03:38:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1703504281; cv=pass; d=google.com; s=arc-20160816; b=a9G0vD2ARIyRTEuvPSatIHXn1veYdrvnUocoLNG8fq5hJ1c+1FMzaTj2w/sPqK7aWv yND2GZjg+EKWlrAcQc72yEZEMU2bcnn3LKdnIRSs+HxH1gAhihhLt9yRiNmfodsmuI7z 3v44WQatC314koWAjvKXHzrN7GndI63QHKGDhK9B8C62YiSF0APEMBvUPBue4XJMiy6D JSXoE/zpl7OcNP3d479OLWSduJwSS1nViLbfRCQ/nQiJM0isSe+alKet6xf/kn/3kbhm xPYjzW7C2NPoZxM5NpQu7G81PyDxrKkcpJgaRTvauPBz1XKoDMh82jm69In5XkXas/7U bXIA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=6BcGoe+ESDzoCivkDyl+SvQ6vxiyAUtVpHN4Fyf7TKI=; fh=B2vyzCgBWMD+NZwvvpzOCCEHx/Ak8bOEWPEoN6LGloM=; b=E9Y6A58kG9E16bNmO41HFUVKE8YFhFicPxPIQ0+0YNIR0G0Up2g6umRYW0gR893DKj SAt1OQJHNUTrQfj3/3CehxwxUYr2sONSv7TkFDwd1nTqkcxib1t3sVut+81YIHnVurb1 bDkWoylYqmDQyDaV7MBgL5xiwCOeY59etKbfgrvhZjQNtaHV1UfnZcmsvwU88nxE2RAL r6OHGPZmLMUXYVujnv0A+R0MfFSykDK3wSwFFF9ulBercQL6lbxmhQRL9LrKiapNIG+5 2SYvs/JwoH4lRIqCGTvNpap01nzKzXv6vx+RGrmtw9yyA5yVvbfsF6/cO2JPOMhaYrfB ORyg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kunbus.com header.s=selector1 header.b=ymtlYky5; 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+bounces-11021-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11021-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=kunbus.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id bq5-20020a056a000e0500b006d2886995a2si7868099pfb.289.2023.12.25.03.38.01 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Dec 2023 03:38:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11021-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kunbus.com header.s=selector1 header.b=ymtlYky5; 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+bounces-11021-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11021-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=kunbus.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1C1062820AD for <ouuuleilei@gmail.com>; Mon, 25 Dec 2023 11:38:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3D32753E15; Mon, 25 Dec 2023 11:36:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=kunbus.com header.i=@kunbus.com header.b="ymtlYky5" X-Original-To: linux-kernel@vger.kernel.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2052.outbound.protection.outlook.com [40.107.7.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 24DD7537FE; Mon, 25 Dec 2023 11:36:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=kunbus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kunbus.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aNJRRw5ymkA3Uy05q0jMMQa5CX78MCbwxqk9nm442VexDQuxS4R9IjoBcoxrHx9LkDLlDXlOYFgylXFXj3AaFG+aWQzs0FAqGjMV37QhIcHJJbyQDyFFhZXF635LyOo3jZGQ6buqT1MnkKIXI1736tZAgAOnwNl+qj9uThDO5DvO5alPpG5jZaZFy5PJ5jfoWVjkMVKYDGwXsKhAtC4WV4bYbRuO9A+R5NA5x7vp3W+3ck/EFmYZki+er8xOo8jzy7FmSh8jkcWY1LB/uN38VBeyzHS7qUKgtUR6OYc5C9hnga2WV926RW41k/tgPscsuWrzq3TufqFbzEYX6aG/2w== 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=6BcGoe+ESDzoCivkDyl+SvQ6vxiyAUtVpHN4Fyf7TKI=; b=QiOByNnSXuhOU2V7uzwkcQkLBUYUrviqa79k+nrvaZaH0jJUvAcAB4PTEkouJHxYOvo6wU1MZCWsn1rJYBgBtN2jktlVYmi/G0k9bsCfwTVBtoxf/sLkLxBLqYDmAwe6RXmUqjbInKnv6B64XhYbwTCJ2I2j8oJqn2SXqtqgYW58FZvxAW6U3p+8gvjj+OyF+iQv0hFSQBCKlxHQN7AsFtSXvE7tVKB29iWV1VruOOO3CL1VT1SbmXyabuPGQODumjPRBum3vRT3Nnxc+5EwLHtgo6YzYfks3ZlXkNtVdTWgoXGYlmGN+WvKtZwKgTEmRBLHiGZwWeOyvAO11GlfIw== 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=6BcGoe+ESDzoCivkDyl+SvQ6vxiyAUtVpHN4Fyf7TKI=; b=ymtlYky5Jx7ECUkTPyeLk5uXWVw33reXsylPatPOT9sq3qdhnozvCEUcMkfjdJUTsBKJHcACzEazKwz32GsQhlNewkOuWfaxCAbGl8zOe62tuNhvLE3nXi+C1PnHDOfOLx2Ai9xLec8sKorGhQfvGrgOG01qcbzkNXnUVK91TgA= 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 AS8P193MB2061.EURP193.PROD.OUTLOOK.COM (2603:10a6:20b:44d::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.26; Mon, 25 Dec 2023 11:35:56 +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.7113.026; Mon, 25 Dec 2023 11:35:56 +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, hugo@hugovil.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 v6 7/7] serial: 8250_exar: Set missing rs485_supported flag Date: Mon, 25 Dec 2023 12:35:23 +0100 Message-ID: <20231225113524.8800-8-l.sanfilippo@kunbus.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231225113524.8800-1-l.sanfilippo@kunbus.com> References: <20231225113524.8800-1-l.sanfilippo@kunbus.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 X-ClientProxiedBy: FR5P281CA0055.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:f0::17) To VI1P193MB0413.EURP193.PROD.OUTLOOK.COM (2603:10a6:803:4e::14) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1P193MB0413:EE_|AS8P193MB2061:EE_ X-MS-Office365-Filtering-Correlation-Id: 81315aaf-8be6-4414-619a-08dc053da860 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: v5bPqL66AomTiIOdGfSSBg5v7G/XFizRuF1lz8EvnjVkNkUMD1mFowQaWYTTHpzMF6ZKO2OVB1R4+oV2c56CQGA9Pq1ZbxIgr2N0WenDpAth6N8xhCCTGDywZDQSRc641mklS39T/ErKvpEv17HRdQdXL6QCrn81dKFVUhW3IPk4CeeCeFnPcOOq//vCfbiApxzGITVgus4hci1KJsEjtMSs1HJLfx7EB3kUYikWKYgufnqvDFCY4k8xZHrz4yawVGWEQa4dSDKW+aSgsq+mqUCD73s7yuAj6BiujFoxTxlsFUeuBxuATWx2AanFjyskv2qUy21wfiabdWlBmagOSfoqeesx/biYscINCyEKHC25TTd3oya1qzMNuPALt+PqNbtkMYUI00unaHQFCxpbdJeQg6hBlIzCpreb2aaQ5a6cSnblX9ZOkB1HmCeJdhaqgI075M0ousPzGc+tEzqMsW86q0aBZyBbP/bA101NtzXoC4eACix0NP4NSDlDiutYrxh7rAjjstRsfQkZuDQrHHssaztRr3kkpCTvztth5jBXvGRsa+yw+k/zkTlRo6SWQpk+gAZDTZD3/13iz13JvuwrZtsrAiQdWR19zGRX0ayD48lqzDIQH0XQYHt6bCu3 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)(39830400003)(366004)(346002)(136003)(376002)(230922051799003)(230273577357003)(230173577357003)(186009)(451199024)(1800799012)(64100799003)(2616005)(6666004)(6486002)(478600001)(2906002)(8676002)(8936002)(5660300002)(36756003)(7416002)(52116002)(6512007)(6506007)(66556008)(66476007)(4326008)(66946007)(316002)(66574015)(83380400001)(86362001)(1076003)(41300700001)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?gPR9yNmrUcPV1Yo4TCJ1pN618826?= =?utf-8?q?YN2o/0BxTGvB3UjfymdQW6rLXnTbLxJHr5BH86gZTztAJ0V4ub8Lz+xpXcBBcCXRl?= =?utf-8?q?1rZoM+ACj+/N24HVJ++ZUQ87IL3LR2QCjR0H60+ffrC5pqVlLEX0mtnOFlR3Zvqeb?= =?utf-8?q?n+0XIU7a9oWNU6H0GNCxIlQycndBICUq/yZoiMwWf3iL8Eo7hUWV9slfd1tBUpoYL?= =?utf-8?q?+yftrv2g087uXr5yqG1vqadHdD6vIB8Wu4wO4Nv9m+suNKsl+epZJ04v8eYrevaXs?= =?utf-8?q?ReYDGSeGCh3jd/l/U2Rs1BZTz2P3rOo0FajwbM0Sil641FKABG6SZXET572HJiZlD?= =?utf-8?q?Wic/k8vveO/nwdQYZSuA2Ty83pvl7li6P5DpO0ajMUst8esfPa4x5Q50v6O+A5DMj?= =?utf-8?q?fEDfkA74EUk5dnp+aQ2k7eGJ5Ev9a/XZLlvo1e8hnfDgA6fkXVUM75G4rtxLKhN4L?= =?utf-8?q?wZyUrVShYULMzmarGsILD6h0DLC4GQbtPdODMfMoavcuL2UH11jR7v55WaZzCTy9R?= =?utf-8?q?Q3XsqygxvgL6ZzLANtAfzQ8qahuNCPf+roK+Xc5T6UAg9Q5JKBu3BglwWw+hgJys8?= =?utf-8?q?ymzOI7q7eY4J47v4lAVZ40Z7bZcpu84RtilTomivrzU0dNjuDAe/H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utf-8?q?F2K3ILFaWSPFky5Tk8sx7Fp5IdUcVENmeP3rcRXhxzrlTLoKUBcwhQTj/prB8OVAx?= =?utf-8?q?OAH8B5wwTa8?= X-OriginatorOrg: kunbus.com X-MS-Exchange-CrossTenant-Network-Message-Id: 81315aaf-8be6-4414-619a-08dc053da860 X-MS-Exchange-CrossTenant-AuthSource: VI1P193MB0413.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Dec 2023 11:35:55.7011 (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: S9PtAv4d1Mr5FjJOCaUd6BWAdu/RCgZDRXN0ZF3JMMESeExq84rhkPQMSsUJzTTn7Muibbgy6ARAcunKNtM8vA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8P193MB2061 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786253705096159851 X-GMAIL-MSGID: 1786253705096159851 |
Series |
Fixes and improvements for RS485
|
|
Commit Message
Lino Sanfilippo
Dec. 25, 2023, 11:35 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 Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> 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[] = {