Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3797750iog; Tue, 28 Jun 2022 03:02:28 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vELRr60eP56SOTcQLcnQdb3cA0YUgbvEWnZLjQYXn65M22f4GJAKmNtOkxLMM0A5xrlOPk X-Received: by 2002:a63:8c5c:0:b0:40c:95c3:8c02 with SMTP id q28-20020a638c5c000000b0040c95c38c02mr17717021pgn.419.1656410547947; Tue, 28 Jun 2022 03:02:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656410547; cv=none; d=google.com; s=arc-20160816; b=EXc808j6juzlJOb/6va9s2YuLC9yyUi5+bgoEsMyqY39w6a0Pc+Zn6oq/zsQIeLWuF WYxfLYADVE/rUqv8km0Lu1N2Fa0JUoQp3E26RnO6RVCZB6f1lr4kZxIFYT6I5dwR5ZNE mFr7Q1DEijO9n7cjlkg3cwQXYzelTNMXIUPE5tCaiNDmZLbpc1HNbM6NWshEB1JB5+Um pwrEP/7Pi+tZzXkU0IkiKQ2T09eHgwzVrGlv1FSreN02xz6gjcjtErgyTeyJbQiU4yqV eYayur73IsNdzN0TcpNjPEWbC/dsWaNunUrJgL1qECUDplNsubI+X31ES1+nDBb5+V8w Nfzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ANgbVDIaAchr9xNXanJ5pWyQJHl2bmAyieiAvnWzbvM=; b=ZUU+iqvZ0Y24Y4JUm3sU1JF6umjs704n/NZkfvxsoJoFoKvsYIBA8TW0UQ7uv2zJwP vaDjHrc0WwN/ztEkRz9K1XkpsRl5y2d06VvOKJoAhjRUlQ1kuoWRGAnR+8vsRO35hlBO plrfBHTmw7qwPIHpOBlw5Lvp64I6cmt4QNQSAPrJPr6W6oCyCRpjmBlthNwy4klLkDIW HdJ6uxaDPaH8ouyZxwDVQCmzi9Yq6O+tR2U+hkUEAnRF0nujLEAzr5dafu0GsZzX7NOY peAs/4MQzW7tIa4Ig9FTf8I3BILQ5MI9MpJQ7ivNYTLyoUsL1sSAKpDcH4LggSbk7SA1 wwaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aRypT3SO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p4-20020a63e644000000b003ab97181f95si18247188pgj.845.2022.06.28.03.02.09; Tue, 28 Jun 2022 03:02:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aRypT3SO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344142AbiF1KBA (ORCPT + 99 others); Tue, 28 Jun 2022 06:01:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344051AbiF1KAS (ORCPT ); Tue, 28 Jun 2022 06:00:18 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EA482F03B; Tue, 28 Jun 2022 02:59:48 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 714FEB81D94; Tue, 28 Jun 2022 09:59:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E61B3C341CA; Tue, 28 Jun 2022 09:59:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656410386; bh=J71N4/MLBTUM7CmeOPi8uU3hkTppoPhFLwPp334uvFQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aRypT3SOgIp397meDtplJ0V7X/dhr7yrZ8oTBl0dgnX+3SkJhfuk9Ltf/gsjKkCvW lIqZxtHNk2MZ5Ik3fFtokQc4wGvxQKPGRMsi/+uGIvBXcVN+Rrk18IZXiGy8WnHOaU EtIbWgqtwW2leZ1BLas+uefpA1tSG+yCOfsNFr5khG+X4Gj6TGs7QvS3BHKtROBdx8 PMRk472Z1VnVArM7LYh8MFNZwyUcjP4JKrtzACgJJXzowypoSoxf/Zoo5NmOVqN/o8 g3pBIZQMEt+xLU7aDfhTbRNDPRUCs1AIw1GFEucBTnHSoTb0+ncUWBsvSOEsbCRgtA 43Dr2r4gawb5g== Received: by pali.im (Postfix) id 0BD2F7AE; Tue, 28 Jun 2022 11:59:42 +0200 (CEST) Date: Tue, 28 Jun 2022 11:59:42 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Ilpo =?utf-8?B?SsOkcnZpbmVu?= Cc: Greg Kroah-Hartman , Jiri Slaby , Allen Yan , Miquel Raynal , Gregory CLEMENT , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] serial: mvebu: Apply old baudrate to termios Message-ID: <20220628095942.rbpl2iocxoqtzxiy@pali> References: <20220628094155.26297-1-ilpo.jarvinen@linux.intel.com> <20220628095136.fhtjjjkj3mre7hwa@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220628095136.fhtjjjkj3mre7hwa@pali> User-Agent: NeoMutt/20180716 X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 28 June 2022 11:51:36 Pali Rohár wrote: > On Tuesday 28 June 2022 12:41:55 Ilpo Järvinen wrote: > > A fallback baud rate was derived from old termios but got never applied > > to (new/current) termios. Old termios is dropped once ->set_termios() > > call chain completes, only termios persists the values. Encode also the > > old baud rate into termios. > > > > Fixes: 68a0db1d7da2 ("serial: mvebu-uart: add function to change baudrate") > > Signed-off-by: Ilpo Järvinen > > Hello! Could you explain a bit more what is this patch fixing? I have > not caught it yet. Do you have a test scenario which can demonstrate > this issue? Because I have tested this driver more deeply (on Mox > and Espressobin) and I have not seen any remaining issue with reporting > incorrect baudrate. Ou, now I see where is the issue. Patch which I tested and which fixes reporting baudrate is not in kernel tree yet and it looks like I totally forgot to sent it to ML. I will send it. Sorry for confusion. > > --- > > drivers/tty/serial/mvebu-uart.c | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/tty/serial/mvebu-uart.c b/drivers/tty/serial/mvebu-uart.c > > index 0429c2a54290..12a79018697f 100644 > > --- a/drivers/tty/serial/mvebu-uart.c > > +++ b/drivers/tty/serial/mvebu-uart.c > > @@ -592,10 +592,9 @@ static void mvebu_uart_set_termios(struct uart_port *port, > > if (old) > > baud = uart_get_baud_rate(port, old, NULL, > > min_baud, max_baud); > > - } else { > > - tty_termios_encode_baud_rate(termios, baud, baud); > > - uart_update_timeout(port, termios->c_cflag, baud); > > } > > + tty_termios_encode_baud_rate(termios, baud, baud); > > + uart_update_timeout(port, termios->c_cflag, baud); > > > > /* Only the following flag changes are supported */ > > if (old) { > > > > -- > > tg: (f287f971e256..) fix/mvebu-apply-old-baud (depends on: tty-next)