Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753886AbdCBA2W (ORCPT ); Wed, 1 Mar 2017 19:28:22 -0500 Received: from vps0.lunn.ch ([178.209.37.122]:56669 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753524AbdCBA1o (ORCPT ); Wed, 1 Mar 2017 19:27:44 -0500 Date: Thu, 2 Mar 2017 01:27:10 +0100 From: Andrew Lunn To: Enric Balletbo i Serra Cc: Peter Huewe , wsa@the-dreams.de, tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Bryan Freed Subject: Re: [PATCH v2] tpm: Apply a sane minimum adapterlimit value for retransmission. Message-ID: <20170302002710.GA26136@lunn.ch> References: <20170301153617.10106-1-enric.balletbo@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170301153617.10106-1-enric.balletbo@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: 1034 Lines: 25 On Wed, Mar 01, 2017 at 04:36:17PM +0100, Enric Balletbo i Serra wrote: > From: Bryan Freed > > When the I2C Infineon part is attached to an I2C adapter that imposes > a size limitation, large requests will fail with -EOPNOTSUPP. Retry > them with a sane minimum size without re-issuing the 0x05 command > as this appears to occasionally put the TPM in a bad state. > > Signed-off-by: Bryan Freed > [rework the patch to adapt to the feedback received] > Signed-off-by: Enric Balletbo i Serra > --- > This is a reworked version of the original patch based on the > suggestion made by Wolfram Sang to simply fall back to a sane minimum > when the maximum fails. 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. Andrew