Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp672531pxk; Thu, 17 Sep 2020 13:00:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEDin5Po0bj+xm65UX8VGbG4CFVXMkw48dzY8BSz5Zochf++AvILTqUzEc82jvkJjQMSqF X-Received: by 2002:a17:906:1f94:: with SMTP id t20mr16974528ejr.493.1600372829024; Thu, 17 Sep 2020 13:00:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600372829; cv=none; d=google.com; s=arc-20160816; b=RA990RLitYMPjOHSCXb8EEyIy6q+evkmyUCbeRguNGy6NC06TSO2tsdaWw8bcoYMPp mWur5X+3OeOU3+sUdqyBDkDqtMW7JvgnnpUNelnPSY3wU6Jdd73qMOGB822lvvg0lJal KPc4d8c78ieT9jgkpuZzNhE7u3Vj6lcT9SMGU9ZGLdyEaQ3+2GPrnfGyBHPIhpBzBEy/ ChoXF1RQ3LO/4+z6BQ0Xu/CxmNXJDuRPMSaHhMF8YWf45hcElp/UxkYuHOK2OFC3Yxa+ RTpQM2h740oqVMZJi5yc8/NVHJcqcHaUsIUV2t1RIxAnExoiaGn/iZv0Tx856sMK2P6W 69pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=ie920T48cFiC4F08nq8bJ1wTwz97WLHx28G0jtYOafk=; b=Z+VNaJFgwzDJc+QcwbycVLiOnrqLy/AXC2PfvoU/2UYhj/aZNf7g/nMjbucl1e+QBQ Cj6vomxP8zwUGk2TpoPu31N1XbeuaUtFvptoYbL1Ed0sCN513f86Fr/vpsV/TU+QLgxk iXjGqxJ4IdP9W8KQ80Nxpf0DkOwy78fUw2eXXaHrzDJ++Iq5LaG6yqKGF9CG25HIc9XL XOhILJBIUi92QKnQtTc7REiHmmSceKhYeTmgpEA9G1SkYF1885ngjsM7oGLfOqyvMIFw zBmbkcHObm12/96hbOR9TWojTtlOwBqv7+R6DWyfgsKx5VbqYgx7sQ+PUUqe5dsYgxza 70+A== ARC-Authentication-Results: i=1; mx.google.com; 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jr18si698339ejb.45.2020.09.17.13.00.05; Thu, 17 Sep 2020 13:00:29 -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; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726821AbgIQT4Q (ORCPT + 99 others); Thu, 17 Sep 2020 15:56:16 -0400 Received: from mga02.intel.com ([134.134.136.20]:10770 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727487AbgIQOqS (ORCPT ); Thu, 17 Sep 2020 10:46:18 -0400 X-Greylist: delayed 7082 seconds by postgrey-1.27 at vger.kernel.org; Thu, 17 Sep 2020 10:45:51 EDT IronPort-SDR: B+ZFbACdWBlZuVV/TCXBd/VpeYAwOaT1O3QOIQXzLiAOomkKv7NeGj4fVD89HoGtESO38iiWVl /8TCPP9R/LUw== X-IronPort-AV: E=McAfee;i="6000,8403,9747"; a="147398662" X-IronPort-AV: E=Sophos;i="5.77,437,1596524400"; d="scan'208";a="147398662" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Sep 2020 07:45:39 -0700 IronPort-SDR: wUnwzzA+zhduLkhwDoEyFcAwETHWsz3DLEWqMEamXY2uxGQu14k40LWrcdYwWVuDWxO8Ua2Xjs XKWyDyW06dPw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,437,1596524400"; d="scan'208";a="336440069" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga008.jf.intel.com with ESMTP; 17 Sep 2020 07:45:35 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1kIvAC-00HLjp-9b; Thu, 17 Sep 2020 17:45:32 +0300 Date: Thu, 17 Sep 2020 17:45:32 +0300 From: Andy Shevchenko To: Jarkko Nikula Cc: Sultan Alsawaf , linux-i2c@vger.kernel.org, jikos@kernel.org, aaron.ma@canonical.com, admin@kryma.net, benjamin.tissoires@redhat.com, hdegoede@redhat.com, hn.chen@weidahitech.com, kai.heng.feng@canonical.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, mika.westerberg@linux.intel.com, vicamo.yang@canonical.com, wsa@kernel.org Subject: Re: [PATCH v2 2/4] i2c: designware: Ensure tx_buf_len is nonzero for SMBus block reads Message-ID: <20200917144532.GO3956970@smile.fi.intel.com> References: <20200917052256.5770-1-sultan@kerneltoast.com> <20200917052256.5770-3-sultan@kerneltoast.com> <4698b23c-7af6-3f44-975d-b1f692ae3f00@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4698b23c-7af6-3f44-975d-b1f692ae3f00@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 17, 2020 at 04:44:18PM +0300, Jarkko Nikula wrote: > On 9/17/20 8:22 AM, Sultan Alsawaf wrote: > > From: Sultan Alsawaf > > > > The point of adding a byte to len in i2c_dw_recv_len() is to make sure > > that tx_buf_len is nonzero, so that i2c_dw_xfer_msg() can let the i2c > > controller know that the i2c transaction can end. Otherwise, the i2c > > controller will think that the transaction can never end for block > > reads, which results in the stop-detection bit never being set and thus > > the transaction timing out. > > > > Adding a byte to len is not a reliable way to do this though; sometimes > > it lets tx_buf_len become zero, which results in the scenario described > > above. Therefore, just directly ensure tx_buf_len cannot be zero to fix > > the issue. > > > > Fixes: c3ae106050b9 ("i2c: designware: Implement support for SMBus block read and write") > > Signed-off-by: Sultan Alsawaf > > --- > > drivers/i2c/busses/i2c-designware-master.c | 5 +++-- > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > Were other patches in series dropped somewhere? I received only this. @linux.intel.com has some issues in delivery (accepting) messages. You may download thru lore.kernel.org entire series and reply. -- With Best Regards, Andy Shevchenko