From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jarkko Sakkinen Subject: Re: [PATCH] tpm_tis: override reported C and D timeouts for Atmel 3203 Date: Fri, 13 Jan 2017 17:50:45 +0200 Message-ID: <20170113155045.ncqgiioezajgelhp@intel.com> References: <08953fb6-c332-ef29-2614-6335570023be@maciej.szmigiero.name> <20170112184229.GB12836@obsidianresearch.com> <259e1606-255b-5bf4-54bb-1bed967c228a@maciej.szmigiero.name> <20170112202055.uxabnu553qwqql72@intel.com> <20f8645d-f3fd-550b-b830-d1e55b8f2d17@maciej.szmigiero.name> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20f8645d-f3fd-550b-b830-d1e55b8f2d17-APzI5cXaD1zVlRWJc41N0YvC60bnQu0Y@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: "Maciej S. Szmigiero" Cc: Christophe Ricard , linux-kernel , tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: tpmdd-devel@lists.sourceforge.net On Thu, Jan 12, 2017 at 10:37:31PM +0100, Maciej S. Szmigiero wrote: > On 12.01.2017 21:20, Jarkko Sakkinen wrote: > > On Thu, Jan 12, 2017 at 09:09:33PM +0100, Maciej S. Szmigiero wrote: > >> Hi Jason, > >> > >> On 12.01.2017 19:42, Jason Gunthorpe wrote: > (..) > >>> Can you also add a check for 0 timeouts in the core code and print a > >>> FW_BUG :\ > >> > >> Hmm, I dug in history of tpm-interface.c and the code had actually rejected > >> zero timeouts until commit 8e54caf407b98e (this is the commit that > >> introduced the Atmel 3204 workaround) and let default timeout values remain > >> instead (it looks like they were exactly like these in above override at > >> that time). > >> > >> Did Atmel 3204 report wrong but non-zero timeouts? > > > > Wouldn't it make more sense to fix this by re-adding this fallback? > > I think it would be a cleaner fix and also catch other problematic > devices (if there are any) without needing to add individual overrides. Please go with that but add also FW_BUG print just to be aware of chips that report zero values. /Jarkko ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752044AbdAMPv3 (ORCPT ); Fri, 13 Jan 2017 10:51:29 -0500 Received: from mga04.intel.com ([192.55.52.120]:63612 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751771AbdAMPv2 (ORCPT ); Fri, 13 Jan 2017 10:51:28 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,222,1477983600"; d="scan'208";a="1082607198" Date: Fri, 13 Jan 2017 17:50:45 +0200 From: Jarkko Sakkinen To: "Maciej S. Szmigiero" Cc: Jason Gunthorpe , tpmdd-devel@lists.sourceforge.net, linux-kernel , Peter Huewe , Marcel Selhorst , Christophe Ricard Subject: Re: [PATCH] tpm_tis: override reported C and D timeouts for Atmel 3203 Message-ID: <20170113155045.ncqgiioezajgelhp@intel.com> References: <08953fb6-c332-ef29-2614-6335570023be@maciej.szmigiero.name> <20170112184229.GB12836@obsidianresearch.com> <259e1606-255b-5bf4-54bb-1bed967c228a@maciej.szmigiero.name> <20170112202055.uxabnu553qwqql72@intel.com> <20f8645d-f3fd-550b-b830-d1e55b8f2d17@maciej.szmigiero.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20f8645d-f3fd-550b-b830-d1e55b8f2d17@maciej.szmigiero.name> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.6.2-neo (2016-08-21) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 12, 2017 at 10:37:31PM +0100, Maciej S. Szmigiero wrote: > On 12.01.2017 21:20, Jarkko Sakkinen wrote: > > On Thu, Jan 12, 2017 at 09:09:33PM +0100, Maciej S. Szmigiero wrote: > >> Hi Jason, > >> > >> On 12.01.2017 19:42, Jason Gunthorpe wrote: > (..) > >>> Can you also add a check for 0 timeouts in the core code and print a > >>> FW_BUG :\ > >> > >> Hmm, I dug in history of tpm-interface.c and the code had actually rejected > >> zero timeouts until commit 8e54caf407b98e (this is the commit that > >> introduced the Atmel 3204 workaround) and let default timeout values remain > >> instead (it looks like they were exactly like these in above override at > >> that time). > >> > >> Did Atmel 3204 report wrong but non-zero timeouts? > > > > Wouldn't it make more sense to fix this by re-adding this fallback? > > I think it would be a cleaner fix and also catch other problematic > devices (if there are any) without needing to add individual overrides. Please go with that but add also FW_BUG print just to be aware of chips that report zero values. /Jarkko