Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753924AbdCBRZR (ORCPT ); Thu, 2 Mar 2017 12:25:17 -0500 Received: from vps0.lunn.ch ([178.209.37.122]:57494 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751957AbdCBRZN (ORCPT ); Thu, 2 Mar 2017 12:25:13 -0500 Date: Thu, 2 Mar 2017 18:24:19 +0100 From: Andrew Lunn To: Enric Balletbo i Serra Cc: Peter Huewe , Jarkko Sakkinen , wsa@the-dreams.de, tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Bryan Freed Subject: Re: [tpmdd-devel] [PATCH v2] tpm: Apply a sane minimum adapterlimit value for retransmission. Message-ID: <20170302172419.GA11265@lunn.ch> References: <20170301153617.10106-1-enric.balletbo@collabora.com> <20170302125543.bsn7z5zkerabzh4u@intel.com> <2c648dea-35df-cdf7-3882-40bb855d3573@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2c648dea-35df-cdf7-3882-40bb855d3573@collabora.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 952 Lines: 26 > >> Hi Enric > >> > >> Maybe you should remember that you need to use smaller transfers? If > >> you don't remember, but use the full size message every time and only > >> drop back on error, the i2c core is going to log rate limited > >> messages. By remembering, there will only be one such message in the > >> log. > >> > > Maybe I did not explain well but this is what the code does, when > i2c-core fails with -EOPNOTSUPP because the msg is too long for this > adapter it loop with a smaller chunk of fixed size, so you only see > the i2c-core message once. Hi Enric Would it not be more accurate to say, that you only see the i2c-core message once, for this transfer request. Is the next transfer request again going to use the longer length? then fail, maybe generate another i2c core message, depending on rate limiting, and then use the lower message size? I think it does. Which is why i suggested remembering the length. Andrew