From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755895AbaH1Aia (ORCPT ); Wed, 27 Aug 2014 20:38:30 -0400 Received: from mx1.scotdoyle.com ([23.226.141.211]:55912 "EHLO mx1.scotdoyle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752592AbaH1Ai3 (ORCPT ); Wed, 27 Aug 2014 20:38:29 -0400 Date: Thu, 28 Aug 2014 00:35:16 +0000 (UTC) From: Scot Doyle To: Jason Gunthorpe cc: Peter Huewe , Ashley Lai , Marcel Selhorst , Stefan Berger , Luigi Semenzato , tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v3] tpm_tis: verify interrupt during init In-Reply-To: <20140827214743.GC11183@obsidianresearch.com> Message-ID: References: <20140822160626.GA8477@obsidianresearch.com> <20140822203241.GB1733@obsidianresearch.com> <20140825182414.GB1298@obsidianresearch.com> <20140827173142.GA11183@obsidianresearch.com> <20140827214743.GC11183@obsidianresearch.com> User-Agent: Alpine 2.11 (LNX 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 27 Aug 2014, Jason Gunthorpe wrote: > On Wed, Aug 27, 2014 at 09:32:10PM +0000, Scot Doyle wrote: >>>> - if (tpm_do_selftest(chip)) { >>>> - dev_err(dev, "TPM self test failed\n"); >>>> - rc = -ENODEV; >>>> - goto out_err; >>>> - } >>> >>> Move gettimeout too >> >> Can it be moved? It sends startup(clear) if the TPM isn't yet operational. > > To move it means we have to understand why you are getting timeouts: > > [ 33.247720] tpm_tis 00:08: tpm_transmit: tpm_send: error -62 > [ 33.247731] tpm_tis 00:08: [Hardware Error]: TPM command timed out during continue self test > > I had thought based on your other patch that these should not happen > since the raw register is polled after the timer expires? It is polled after the timer expires in tpm_tis_send_data, but not in tpm_tis_send, and the return value is used in tpm_tis_send... > What is going on here? Do you still have that other patch applied? ...so with the other patch applied too, the output is: [ 1.464217] tpm_tis 00:08: 1.2 TPM (device-id 0xB, rev-id 16) [ 3.570836] tpm_tis 00:08: tpm_transmit: tpm_send: error -62 [ 3.660885] tpm_tis 00:08: [Firmware Bug]: TPM interrupt not working, polling instead Much better! Any thoughts before I proceed?