Received: by 10.223.185.116 with SMTP id b49csp5523651wrg; Tue, 27 Feb 2018 15:06:44 -0800 (PST) X-Google-Smtp-Source: AH8x2267zcwgZhSMGLJj7XHtGfOstfxQPbZLqIVc+ggHUHFqBIsu5QhfUJIozQAQKVT64tTyVd92 X-Received: by 2002:a17:902:b109:: with SMTP id q9-v6mr16049312plr.340.1519772804593; Tue, 27 Feb 2018 15:06:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519772804; cv=none; d=google.com; s=arc-20160816; b=GFN71RtCzAkiMF8gW/dGRtN0zMOjMxgCXncQw8O8Mi17ZyYckxTt2Qm3RQrh+u8ick Cf3vF0tRzREYvL0Vj01SmCrCseCs2azOwx/dgsJCvjT5a/rizlx26fje+Pmaz/q7z/9J N0UY9ODoorDHRJ8/iaB9EmZdnBV8v1+DNsvX7Dw+YhrFpqmMVHeWCvvgsZYwGCVqgQCP F+as9oTzuihDt/9vuCT59LQlZhwKYr86ULpTcBtg0trK2x9JWfqrvZTP8DxGmivGKKJq cfReMftGamD+I45fcOVSikiRPwFPbAH5bId6wGuA6Cru/3ttT1/nCXSovGX1fEe+UAUp UK/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=nK809MGpwxhJS9xTdGuv1TT5VpXriUcj3EiQifRaIn4=; b=tCvrlMpYJcyM5i9rt6qKAyodmxPspMq75LxubJbrvcdG8FO4GlnUwvduEtEm70/RR8 SzfY0juf+/MSIU0KlNk9RYjYvXk4U+I5EYY3yRG+CgLo1kJX4mYEG503xgnDEtCmkIru vAZVMdVpMag5/K99j0Fv4gwDHlM43Z0VShayxHrRYv0DDZqSK8sWJB/zhpC4Ei9VVxp4 G6i5PDRW7TKioPDRJSVsojliNvIWgf2vdZY7YauuIfBzprvi9m2sg5ynfo2rrRDeOGiz aH60LD4a/e5EZ9mAUO52+0J4ov+BpahJ2BVXVb0F3XD69GZLDyW3ai2EhFIDZFEXAm6v WLxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YIlTp91o; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z100-v6si188429plh.415.2018.02.27.15.06.30; Tue, 27 Feb 2018 15:06:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YIlTp91o; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751982AbeB0XFr (ORCPT + 99 others); Tue, 27 Feb 2018 18:05:47 -0500 Received: from mail-it0-f67.google.com ([209.85.214.67]:40220 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751800AbeB0XFo (ORCPT ); Tue, 27 Feb 2018 18:05:44 -0500 Received: by mail-it0-f67.google.com with SMTP id v186so1190715itc.5 for ; Tue, 27 Feb 2018 15:05:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=nK809MGpwxhJS9xTdGuv1TT5VpXriUcj3EiQifRaIn4=; b=YIlTp91oNi7qbBaX97Cg066fyeBNfWbdbCs8LA6M+z1PN9nks1YsFsabuDU2sBMIVr ZX/7nk9HK4QbD+CPa1nS/yAkm7S2enlF+1NhU0zGM4agv86eQlhukVwDKDzY9+h7kIHh v4k/R65Nl8rrxQMgLsnWLhGLLkKGtyMM6c74U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=nK809MGpwxhJS9xTdGuv1TT5VpXriUcj3EiQifRaIn4=; b=j82hdZy8R5A1PlDVVJngWD1D4tKVdtzKFKpohX7YrSyahxrI4Ev0k/pDSo+MPADXXZ bC/a1PAXhHRZxNvL/oSYQZaWKFUUIkYGvxq/sYbAUR/YVI9KHlrVrhBKwTP0BIPAoslA MQvn7NGhEBy4TTaxBJjBxZ1k10P5GpPt5xZSPrdg0y7Z60y7lbZMyMOLM8+QvJhmHp9K nQ4WorYwLOcIWnPN6XSoNtU6Q0qIiZU0e+FZYluMPrhuAirdDtKOs2k0GmeuL8yf0hMt 1mIVtI5eQ+gW27zI+vcr+n1p+t4xF/+OADoUb6b2naF+8cAns0w+lss4QEMxDuOGLBuM qOvQ== X-Gm-Message-State: APf1xPCS5Ilt72hCYdI4LHz9AXyJWu63t1aW2+noX3Kqc6giwgIjr3wz zjCN255yyftd/nGjmwTiJjbd1w== X-Received: by 10.36.211.5 with SMTP id n5mr18358143itg.3.1519772744151; Tue, 27 Feb 2018 15:05:44 -0800 (PST) Received: from localhost ([2600:1700:8c61:6240:20cb:1985:36b:544f]) by smtp.gmail.com with ESMTPSA id d184sm2492203ite.4.2018.02.27.15.05.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Feb 2018 15:05:43 -0800 (PST) Date: Tue, 27 Feb 2018 17:05:43 -0600 From: Andy Gross To: Abhishek Sahu Cc: Sricharan R , Wolfram Sang , David Brown , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 08/12] i2c: qup: change completion timeout according to transfer length Message-ID: <20180227230543.GI20901@hector.attlocal.net> References: <1517644697-30806-1-git-send-email-absahu@codeaurora.org> <1517644697-30806-9-git-send-email-absahu@codeaurora.org> <7dcbac1f-edaf-aecf-8e58-04d243384758@codeaurora.org> <6a1983c0ca81afce908f622a53abd563@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6a1983c0ca81afce908f622a53abd563@codeaurora.org> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 19, 2018 at 04:26:18PM +0530, Abhishek Sahu wrote: > On 2018-02-16 10:18, Sricharan R wrote: > >On 2/3/2018 1:28 PM, Abhishek Sahu wrote: > >>Currently the completion timeout is being taken according to > >>maximum transfer length which is too high if SCL is operating in > >>high frequency. This patch calculates timeout on the basis of > >>one-byte transfer time and uses the same for completion timeout. > >> > >>Signed-off-by: Abhishek Sahu > >>--- > >> drivers/i2c/busses/i2c-qup.c | 9 ++++++--- > >> 1 file changed, 6 insertions(+), 3 deletions(-) > >> > >>diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c > >>index a91fc70..6df65ea 100644 > >>--- a/drivers/i2c/busses/i2c-qup.c > >>+++ b/drivers/i2c/busses/i2c-qup.c > >>@@ -130,8 +130,8 @@ > >> #define MX_TX_RX_LEN SZ_64K > >> #define MX_BLOCKS (MX_TX_RX_LEN / QUP_READ_LIMIT) > >> > >>-/* Max timeout in ms for 32k bytes */ > >>-#define TOUT_MAX 300 > >>+/* Min timeout for i2c transfers */ > >>+#define TOUT_MIN 2 > >> > > > > may be you can mention, why is this 2 ? > > > > This 2 seconds is timeout which I am adding on the top of maximum > xfer time calculated from bus speed to compensate the interrupt > latency and other factors. It will make xfer timeout minimum as > 2 seconds. > > I will update the comment to explain it in more detail. Once you do that add: Reviewed-by: Andy Gross