Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp653896lqt; Fri, 19 Apr 2024 06:49:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVsAoOAwC2wao1qnVDGb9Qr3z/Ulelh4KRXzEMacHkHKDctRRIk0CoBTkhkxj7GpYLL+7GLQ86BrJQ1jf3bFI7Akhd+93hhIAeRZ5Uu2w== X-Google-Smtp-Source: AGHT+IGoGb9ajX0fvCOrpZISIHQ1GXkk/6n53QzOl/lUgXFd1crb2k0i+SxJGeuzfKz8b/pX3yQo X-Received: by 2002:ac2:5445:0:b0:517:8e01:266f with SMTP id d5-20020ac25445000000b005178e01266fmr1831732lfn.2.1713534567529; Fri, 19 Apr 2024 06:49:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713534567; cv=pass; d=google.com; s=arc-20160816; b=tIbi06X1OEL4w9DPzKuyxPqwuQfPzkli3on0hYdq8uK5b2z7wUFkUBxzOU35Woehgj s2tmd6d2Va+db84OI4v8+ow4OKRUpjv4LsPdlFHmWxx6sfvwjUOXa2O9h3ftc+2PlCw7 lgHWsG9kVnuezCZpthkw8YEmlmjEw9oZfk7nD/nZwNA3IkDLLYzu1LJuy21yPjJvf9O5 PyLnQo9U61hbhOqPmcFhS29eRKZVXwlqIbITqJZnQDC6woX0dWBDjuxCKL43xlU4bCgO njAmUDib5TlK2ASdZJNLxC8PUGaLSDd/TmsZvNUpC7P+kxPrblGizlPqXN/5ihLfTArZ jQSA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :cc:to:from:date:dkim-signature; bh=8+E9VtuaG9ezLqos4LlwN9niDTf2ke/sHGmBDJU06d0=; fh=Z4LZ5fPcGfkyE2/hGKEGt+Qre9r43SkcZiKqicW7IDk=; b=UF7SebAmAWIw3hJEa2dDYd2IUxKi3VtzFp2IMY1I+6YAbvlHRxzMo2qQBsBajwvIRx BsR/kv5M3s0MOpsEw4O1skxn86sUbZPlu92BqvYbeyPsECKWrxMVe4dYZOSQowFdndk/ sOpjxyNJ95Qitu21MrlHmzc5miB9kH7LgfZVZzlCn0NoxaaWfxwGQl5NQZxAv5cDySOY rrVZUB5aOGiX/dlVqqzrRnJgen31EIXa4WSKaC7CMmN8tXk62+8bqXz2b+9/megAUETM oculJPCxwlboKP3HSIXn00ff7hsTr6fm5ssXCmNH0HO4MWY4Y4TS5MsZkzKfu6IhMkJ3 9X0w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@hugovil.com header.s=x header.b=nLO7R+Fw; arc=pass (i=1 spf=pass spfdomain=hugovil.com dkim=pass dkdomain=hugovil.com); spf=pass (google.com: domain of linux-kernel+bounces-151503-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151503-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id gs39-20020a1709072d2700b00a4e3a58fcf2si2415237ejc.1032.2024.04.19.06.49.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 06:49:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151503-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@hugovil.com header.s=x header.b=nLO7R+Fw; arc=pass (i=1 spf=pass spfdomain=hugovil.com dkim=pass dkdomain=hugovil.com); spf=pass (google.com: domain of linux-kernel+bounces-151503-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151503-linux.lists.archive=gmail.com@vger.kernel.org" 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 43DD61F213DF for ; Fri, 19 Apr 2024 13:49:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B50FE12BEBE; Fri, 19 Apr 2024 13:49:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=hugovil.com header.i=@hugovil.com header.b="nLO7R+Fw" Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170]) (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 021C112A151; Fri, 19 Apr 2024 13:49:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=162.243.120.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713534559; cv=none; b=WpRB9fiGVW0Gj0pMYxqxLC4qydCF4OQjGklpeeJsFu3EXNRiaNupmuPnM+Nlhh43CmdVDBS0aTQ1ij3l424uDNiBkiiTq0u6qUkTrpo4G1NbgUOsmacxBvbKmuH+AyVHb3M/sRws6814cSur6nO2dUJ31zNSDvSYZjEYVXFXAb0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713534559; c=relaxed/simple; bh=jxH8FhJWpDgQUXcEQKQMzaAbxlJ84zYWCvqJAeOPUM0=; h=Date:From:To:Cc:Message-Id:In-Reply-To:References:Mime-Version: Content-Type:Subject; b=OuIjlLT+wo9YZlHTmm3b7HI6qP0JPWQfEOn2oblJi6WaftFDe9eAtnHXo9/PZLiqGtaCyZtgjDssYWP9dgWsSuOEbQ5T9TYSq80BQABcGvIa6yzAL90MMBV2pz+1aOxVEQ7c+0ZW+Rp2wUjfFgkKB9wapJtrNa2E9YmLcvIbuZI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hugovil.com; spf=pass smtp.mailfrom=hugovil.com; dkim=pass (1024-bit key) header.d=hugovil.com header.i=@hugovil.com header.b=nLO7R+Fw; arc=none smtp.client-ip=162.243.120.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hugovil.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hugovil.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hugovil.com ; s=x; h=Subject:Content-Transfer-Encoding:Mime-Version:Message-Id:Cc:To:From :Date:subject:date:message-id:reply-to; bh=8+E9VtuaG9ezLqos4LlwN9niDTf2ke/sHGmBDJU06d0=; b=nLO7R+Fw8X7BJGF9S7+R8F65gq I1hNXhZ3UI8GTbcadgAtI4FBr6U/xfzpqil0XAkgmK3+ujwE8Jojd26qz8XFl3Yv+6QGHv0pLYYpf YAgdnAEjydvzU3INpQzgb7y1tQqTJPOsXnELImTRuz3mkWRFRkaeDxMM/F4i8X3/rOD8=; Received: from modemcable061.19-161-184.mc.videotron.ca ([184.161.19.61]:43560 helo=debian-acer) by mail.hugovil.com with esmtpa (Exim 4.92) (envelope-from ) id 1rxoJM-0002l3-Km; Fri, 19 Apr 2024 09:29:52 -0400 Date: Fri, 19 Apr 2024 09:29:52 -0400 From: Hugo Villeneuve To: Konstantin Pugin Cc: Konstantin Pugin , Greg Kroah-Hartman , Jiri Slaby , Hugo Villeneuve , Andy Shevchenko , Lech Perczak , Ilpo =?ISO-8859-1?Q?J=E4rvinen?= , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Message-Id: <20240419092952.e458f83d8b414b178d598c19@hugovil.com> In-Reply-To: <20240419124506.1531035-2-rilian.la.te@ya.ru> References: <20240419124506.1531035-1-rilian.la.te@ya.ru> <20240419124506.1531035-2-rilian.la.te@ya.ru> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 184.161.19.61 X-SA-Exim-Mail-From: hugo@hugovil.com X-Spam-Level: X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * -2.2 NICE_REPLY_A Looks like a legit reply (A) Subject: Re: [PATCH v4 1/3] serial: sc16is7xx: announce support of SER_RS485_RTS_ON_SEND X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.hugovil.com) On Fri, 19 Apr 2024 15:45:01 +0300 Konstantin Pugin wrote: > From: Konstantin Pugin > > The hardware supports both RTS_ON_SEND and RTS_AFTER_SEND modes, but > after the commit 4afeced55baa ("serial: core: fix sanitizing check for > RTS settings") we always end up with SER_RS485_RTS_AFTER_SEND set and > always write to the register field SC16IS7XX_EFCR_RTS_INVERT_BIT, which > breaks some hardware using these chips. Hi Konstantin, I am using RS-485 mode, and currently I may need SC16IS7XX_EFCR_RTS_INVERT_BIT to be set for my setup to work (not sure, must check this). Does it mean that with this patch it will be cleared? I am not sure by reading your commit message... I need to look at this in more details, and test it on my hardware, which I will be able to do only next week. I will keep you posted. Hugo. > > Fixes: 267913ecf737 ("serial: sc16is7xx: Fill in rs485_supported") > Signed-off-by: Konstantin Pugin > --- > drivers/tty/serial/sc16is7xx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c > index 03cf30e20b75..dfcc804f558f 100644 > --- a/drivers/tty/serial/sc16is7xx.c > +++ b/drivers/tty/serial/sc16is7xx.c > @@ -1449,7 +1449,7 @@ static int sc16is7xx_setup_mctrl_ports(struct sc16is7xx_port *s, > } > > static const struct serial_rs485 sc16is7xx_rs485_supported = { > - .flags = SER_RS485_ENABLED | SER_RS485_RTS_AFTER_SEND, > + .flags = SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND | SER_RS485_RTS_AFTER_SEND, > .delay_rts_before_send = 1, > .delay_rts_after_send = 1, /* Not supported but keep returning -EINVAL */ > }; > -- > 2.34.1 > > > -- Hugo Villeneuve