Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5217118rdb; Wed, 13 Dec 2023 02:19:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IExEKpmDQyhrENRv1Xt5oUq72w2dRHDsLRiEMJjWzptuUuJPMWTrf5mwKvedIfQKoELz5eZ X-Received: by 2002:a05:6808:d51:b0:3b8:b063:5046 with SMTP id w17-20020a0568080d5100b003b8b0635046mr8783551oik.71.1702462753953; Wed, 13 Dec 2023 02:19:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702462753; cv=none; d=google.com; s=arc-20160816; b=YGcWnRHP487YjPfiRjRh/rBwsd/5gy5ZjKZPhkrOE70uemd0uWaWUte02s1vceh2tA MnhXMPDf/sQ9xbgO03bdSP7lC0vKa/Ki870IslzzkIbZTwCKQNQv75BP/zR8ZQDYVPA8 ZdfStP5v+oq3mVu2dN8GdbyJws21QcpeinCphTm1hbouE6b+oEcr6aGAiJ7bPk3Jva/t EqkvbRTIJGMIuqueeUHTrlLg0j3rdd47QjU7D2/RQLLgRSGpI7eBa+iOvMSdjF4esEiY VurX6JyFEfNE934uW+acqiZdDfCJ9LF7XHHvb8r5V0QcKqmmtCbHflpm47h6jESCJP/+ RfMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=Fa1MGlYufdo9qzfLV1k8gZqPkV9QR461airO8oM9Eaw=; fh=mDo9AJ/yd0LvLDNxlF7M3XLvHnGX9YNrpHW+lPaHt54=; b=KIv9Wq+yFV/Zj97wIrsQX6E2EQu3EGrr9wJP+IDDsCDZOQbsNVEmV/0FYeGoP9AO/z amYdhGwcXGNHaiFnEht8Jm67hJ1M7rsmeYPufs7BYmKtyCmqpbpMnP/e1fygFVP+q5CO 6fLcQUqmylnj6YpOtWin/Av4czOiAIGWbCZOG2IF1TqgKi8mstxCfLyEBp5g8NU0qoke DDpxOeo+zu3ORQfMCVGixDSS9Z9RT53wohCN406JnNNpJBUaKW+/cTq1E7PzQJOSYYwX gHykX1dQD7QnHGRVUBt0WUOY00v7NB/6nyuSRFGaRI4MA5CY6LCDuiKa0pVObpXrqRVw EqCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=chVHorCM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id y13-20020a056a00190d00b006cd8cddf8c5si9448897pfi.14.2023.12.13.02.19.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 02:19:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=chVHorCM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 6DFD48047E52; Wed, 13 Dec 2023 02:19:11 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235202AbjLMKS4 (ORCPT + 99 others); Wed, 13 Dec 2023 05:18:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233338AbjLMKSy (ORCPT ); Wed, 13 Dec 2023 05:18:54 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE3E5D0; Wed, 13 Dec 2023 02:18:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702462738; x=1733998738; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=Wzy3O+3NeLNA063iowAcF8LxoAE+r7jkheYRzoqABpk=; b=chVHorCMLiqDxUlx4CsoWoxABm0++TIb5g9KNemCmuF3qNWANUY6G2MC X4NOqepuMMFvvmBaSyPWO9/5vk4lZIxkm0We28l3scDrmPf+4DR9h3/xj uH3AnC36/VgXFKRROoG8JQuxWoINTnZg33pxmHZFmeEL9Af76Wu3iw66q ainJQc5PtsRV1Uvsz8tEX6Xi+sX/aMSTFdQCbYcfW94zdHKffO8aSvEzq gNw7kP/C0dm2ksvO1xTlpKasBPUFX7KVsIKmvui2JPea+XwsL8puHRStK Rgj6Uobh1EjkMZZdqKgcZ0EARAmXeM/z4+lGlWpFzEvpuJBbx5pFwbvpQ g==; X-IronPort-AV: E=McAfee;i="6600,9927,10922"; a="385364199" X-IronPort-AV: E=Sophos;i="6.04,272,1695711600"; d="scan'208";a="385364199" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 02:18:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,272,1695711600"; d="scan'208";a="17666056" Received: from stetter-mobl1.ger.corp.intel.com ([10.252.50.95]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 02:18:55 -0800 Date: Wed, 13 Dec 2023 12:18:50 +0200 (EET) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: Lino Sanfilippo cc: Greg Kroah-Hartman , Jiri Slaby , 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, LKML , linux-serial , LinoSanfilippo@gmx.de, Lukas Wunner , p.rosenberger@kunbus.com, stable@vger.kernel.org Subject: Re: [PATCH v5 7/7] serial: 8250_exar: Set missing rs485_supported flag In-Reply-To: <20231209125836.16294-8-l.sanfilippo@kunbus.com> Message-ID: References: <20231209125836.16294-1-l.sanfilippo@kunbus.com> <20231209125836.16294-8-l.sanfilippo@kunbus.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-963407974-1702462740=:1903" X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 13 Dec 2023 02:19:11 -0800 (PST) This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-963407974-1702462740=:1903 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8BIT On Sat, 9 Dec 2023, Lino Sanfilippo wrote: > 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 > --- > 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[] = { Reviewed-by: Ilpo J?rvinen (I assume you picked the correct flag among the two alternatives). -- i. --8323329-963407974-1702462740=:1903--