From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934005AbdBVWvJ convert rfc822-to-8bit (ORCPT ); Wed, 22 Feb 2017 17:51:09 -0500 Received: from mout.gmx.net ([212.227.15.18]:50683 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932924AbdBVWu7 (ORCPT ); Wed, 22 Feb 2017 17:50:59 -0500 Date: Wed, 22 Feb 2017 23:32:17 +0100 User-Agent: K-9 Mail for Android In-Reply-To: <20170222211924.zdikc5qfzuxiggte@intel.com> References: <1487261306-2494-1-git-send-email-peter.huewe@infineon.com> <20170222211924.zdikc5qfzuxiggte@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [PATCH 0/5] Fix whole native SPI TPM driver To: Jarkko Sakkinen , Peter Huewe CC: Jason Gunthorpe , tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Christophe Ricard From: Peter Huewe Message-ID: <3FCA2DD7-28AD-4F6A-B529-98DAACEF6505@gmx.de> X-Provags-ID: V03:K0:u54ls9eYlweEJKF7Pk0XsQodLAVLDrQU/IbmdiyeJa/Nnd8mKIu bCFomSOCtbyPadkRS7YPjFQocpEwuGKdKU8c74hfdk3ZWxaSjXmS1l66OisK+5O/K3EMcFX A8ozPaojnaLRVrn4bH4zdeQ80+L+KJnMyXy1/b08oHBZSKKQNF3zjO6c16w3zitgzFk9IA3 84FOFmHSiJbqAfEbSEAkA== X-UI-Out-Filterresults: notjunk:1;V01:K0:4d3GYQSB7p4=:Yvn8PsuGXy5AjQs6q3J9cn HawKLED1GsdA4LClKItIOddTH8jXX6RU8ke6jq8QzNUybFMvccTeRoP7DpyRS3E+DzfwaCPHd 1eOSSflIEvOHPGXj6ft6+iTM8Sr3pLSo86i9KzyKC9mZa2hTFCVb1XqLXXT6UpXcWI9U+UiQR B3z/PAvkRjYG6puU+3q/X5Bd3KUM1wQGSM/2tjmH5m5FS7KAEvZiYQvOuUADVWc7goDhuZ9X6 ZbSxxRyLgezjQg57d9egt+t3FizC1F6h7VivP7uQyLEIhtrYgLREmqpL8fW/4+ApPT/42zokP BLmv8SfRgh2cbgAEg0Ng+dsvplNmOeglqCDolbwrVyu03S5rVLniA1d6WCygDwD3Mn71Aq/F4 9uwpSuYMOsG3GYdj9ywG+9bKjlgclq/iqc/rTRhVKYqKyVPmCpKspr6ak+FzMjuu8FiTGsBdv wiNZyTmfb9BBbrHD4OcYZXGWPEzqRUndBERvG9EVuHnjz9xp5kJ8pEimpzWGf0MOYPjZHqMrv 4uAI1dyOHuEephApzS0z/k8SjJoRxDvD+XqToEkQlFmNHZDlODkynba7HCsmlSPaVZB6AQaXB CbTjYs1A+eEbI9aD2jCA6YjyCo5yVaCqSR0Q9prX82KdXBDRhJ3vmbnVipWm7xMbEb9Vciplh mugnJNgh+RYzO/z/Y+aBJJymLnvnC7B33P+lG/xzjhXLzVEkz/znIrXPMnlzV0P4P7HVuZAib xe6BYWggJztkHIl4TdNRAFx3pu5IVK4b3NUkrh1E2STsANLGkCQcdCa3F3mRkEBxefkrKW+h2 bsAK6e3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 22. Februar 2017 22:19:24 MEZ schrieb Jarkko Sakkinen : >On Thu, Feb 16, 2017 at 04:08:21PM +0000, Peter Huewe wrote: >> During our testing it showed that unfortunately the whole native spi >tpm driver >> was more or less non-functional since it was merged, e.g. the wrong >byte for >> waitstate handling was used and transfers larger than 64 bytes did >not work at all. >> >> This was probably caused by the merging of the different approaches >back then, >> as the initial RFC patch did not have these problems, and also my >sudden lack >> of time/commitment back then. >> I'm sorry that the final driver code went untested for that long >time. >> >> This patch set fixes these issues one by one. >> In order to avoid duplication the read/write function was >consolidated to one >> transfer function, so we do not have to apply the same fix at two >locations. >> Maybe consider squashing it - we splitted it for easier review. >> >> Affected Kernels: 4.8, 4.9, 4.10 >> Patchset was tested on Raspberry Pi2 with SLB9670 (TPM1.2 and TPM2.0) >> >> Peter Huewe (5): >> tpm_tis_spi: Use single function to transfer data >> tpm_tis_spi: Abort transfer when too many wait states are signaled >> tpm_tis_spi: Check correct byte for wait state indicator >> tpm_tis_spi: Remove limitation of transfers to MAX_SPI_FRAMESIZE >bytes >> tpm_tis_spi: Add small delay after last transfer >> >> drivers/char/tpm/tpm_tis_spi.c | 163 >+++++++++++++++++------------------------ >> 1 file changed, 69 insertions(+), 94 deletions(-) >> >> -- >> 2.7.4 >> > >I also found type errors a whilea ago: > >https://patchwork.kernel.org/patch/9547993/ > >Do this take care of these issues? Not that I'm aware of. We did not test it on any big endian system yet so the problem never became visible. In any case it would be really nice to see this patchset to be applied so people have a working,but maybe not perfect, spi tpm on the common little endian platforms. When do you think you can merge and pull-request them? Peter > >/JArkko -- Sent from my mobile