Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp239954pxk; Tue, 1 Sep 2020 23:05:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxcjnF7sRnqwYfPAkHf0IpUPPofWYspo/Et+HqorGs5NKgon/bqPa/QJYoE1sV9SAZ21Zcy X-Received: by 2002:a17:906:7cb:: with SMTP id m11mr4913427ejc.41.1599026758277; Tue, 01 Sep 2020 23:05:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599026758; cv=none; d=google.com; s=arc-20160816; b=mcUZx052NW0nwHh7w7cUnat1vliK60DPZOAH6RGPAuU0VaVGYvMuvdLgNd5+YHzi43 Y2a1LJHReXkqa147KRLYFg99a/lag8mMKL3pnKxDClJwEUeoNQkiVaUehaMwJnx0r3Wj m+t+LTlCmWz5BMtjY8sBG38n6cYn7Eo5Wffryt1KGuaWvUCY0mgbdwmVGAeaYsQCaieU 1xJxR8srOzJS+uk8FiV/joQ/TlXE67blXcn55y+OFwiVlfZvQ2jCzed9YCwey3lBnEut ukIRa7qkJ9CBgkUqJGRhDXUE9jcYswZffIpci3i9Oo4G5/KTd9st7k3EY94mCyfh4HTw 7tlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=E/3jR3Ejgc+pIY9GxZ2tDuM1NlrK5nB9vZqsPNWdRzQ=; b=zS0XTlk89rtGh5yKEQK9lOMoHynOTEkEY3bd62KBntBhCjRSrTi2NoDq9n4w2iTW0z Sh8JdFJuRAaeOXBFMZmS3bLQOOV+NSEOzPgoaWgBrwa+jTgq230NQ44xMjZ/4EROn24Y RVmAEm+khIzEQlUSSRB6eD1+VwnL+WgRpINUllGA7QGRjDmADjGryhkiasp6eZybP8Gd raDENHDa0kPtb6WENfkovJq4OS/87po11CuqNwqIkFFj/g6j0/j63VKNN2m+PBx0KDK5 luW76Y8gq84k+QnJ+zofG57GjHUpgLDqtxU4+rHtuPNxEpKS9I3pM8oZNeqdEsUGt9S7 UZQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=j9iBVWGu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s22si1881395edt.207.2020.09.01.23.05.34; Tue, 01 Sep 2020 23:05:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=j9iBVWGu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726311AbgIBGEl (ORCPT + 99 others); Wed, 2 Sep 2020 02:04:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:32994 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725774AbgIBGEj (ORCPT ); Wed, 2 Sep 2020 02:04:39 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 262D020758; Wed, 2 Sep 2020 06:04:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599026678; bh=g/2VIEsAnNCGwuFSRBmMfPgFPQ8GBcaaWeh2wrNOjTw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=j9iBVWGuPfp5nJ4T0mZuvjpw1blz/pYyRcNz1vV99SC0yk1Vdp2UP7C18515KjpTW tOrbuJCV4ZC8WznMoC04LCvNouLaYPX6sQBpBtgE1yK93CdwzTSzYbbu3k+BcokMcE 6xF0r1OwfcmyqYsYVBbcxs/4tjj7/9e6DI+flOpk= Date: Wed, 2 Sep 2020 08:04:35 +0200 From: Greg Kroah-Hartman To: Paras Sharma Cc: Jiri Slaby , linux-arm-msm@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, akashast@codeaurora.org Subject: Re: [PATCH] serial: qcom_geni_serial: To correct QUP Version detection logic Message-ID: <20200902060435.GA141898@kroah.com> References: <1599026211-12800-1-git-send-email-parashar@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1599026211-12800-1-git-send-email-parashar@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 02, 2020 at 11:26:51AM +0530, Paras Sharma wrote: > The current implementation reduces the sampling rate by half > if qup HW version is greater is than 2.5 by checking if the > geni SE major version is greater than 2 and geni SE minor version > is greater than 5. > > This implementation fails when the version is 3 or greater. > > Hence new implementation checks if version is greater than or equal > to 0x20050000 which would work for any future version. > > Signed-off-by: Paras Sharma > --- > drivers/tty/serial/qcom_geni_serial.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Is this a v2 patch? What changed from the first one? > > diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c > index f0b1b47..e18b431 100644 > --- a/drivers/tty/serial/qcom_geni_serial.c > +++ b/drivers/tty/serial/qcom_geni_serial.c > @@ -1000,7 +1000,7 @@ static void qcom_geni_serial_set_termios(struct uart_port *uport, > sampling_rate = UART_OVERSAMPLING; > /* Sampling rate is halved for IP versions >= 2.5 */ > ver = geni_se_get_qup_hw_version(&port->se); > - if (GENI_SE_VERSION_MAJOR(ver) >= 2 && GENI_SE_VERSION_MINOR(ver) >= 5) > + if (ver >= 0x20050000) That's an odd "magic value", can't you use the existing macros to define this somehow so it makes sense? thanks, greg k-h