Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751821AbdCBUha (ORCPT ); Thu, 2 Mar 2017 15:37:30 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:49003 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751027AbdCBUh1 (ORCPT ); Thu, 2 Mar 2017 15:37:27 -0500 Subject: Re: [tpmdd-devel] [PATCH v2] tpm: Apply a sane minimum adapterlimit value for retransmission. To: Andrew Lunn References: <20170301153617.10106-1-enric.balletbo@collabora.com> <20170302125543.bsn7z5zkerabzh4u@intel.com> <2c648dea-35df-cdf7-3882-40bb855d3573@collabora.com> <20170302172419.GA11265@lunn.ch> Cc: Peter Huewe , Jarkko Sakkinen , wsa@the-dreams.de, tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Bryan Freed From: Enric Balletbo i Serra Message-ID: <584dcb98-a78c-a070-465f-52e977650e5e@collabora.com> Date: Thu, 2 Mar 2017 18:31:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170302172419.GA11265@lunn.ch> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1245 Lines: 36 Hi Andrew, On 02/03/17 18:24, Andrew Lunn wrote: >>>> 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. > Ah ok, sorry I did not understand you, got it now. Yes, so with this every time you do, i.e. a tpm_getpubek, you will see the i2c-core message, right. Thanks. Sounds a good suggestion for me. Cheers, Enric > Andrew >