Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2400546ybl; Thu, 29 Aug 2019 07:42:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqwM2l8BDUbWTeT58NqG38N4cCKiEq5kMmO5ZVnWHoyoXjYQP/RQlh6a7aUNqP0SETIpMzap X-Received: by 2002:a65:60d3:: with SMTP id r19mr8722064pgv.91.1567089764409; Thu, 29 Aug 2019 07:42:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567089764; cv=none; d=google.com; s=arc-20160816; b=o5NxTiT/4faejb/HYqAzKUEr5FXS0VirfFi++uRNZa1YmUQHBG0la6XaMKTy+feyxO G2ubeNAmvlBcfAxbR2gNH9SAiQ3o5d6dcSmUd6IHn/v8C1qvNMzzoNmH8aHH6BUhE5YA jNyRgFmx60lYKfKTpZo63aiFTUFXNAk4pituXzmAHkiL2gL9Z89qcGuCDNlrAZPmCZ1t RT9C1n67tgjg8hJSoCO9V7S4pfonTtjLtOP9OPey4GSNncXsgr3iZ6HcZwgy34IKoU7h cpvyCipTEuZjOAfBCXoTh3/TkKEtFY+y6AoISgf8rYxWz7SE3xdWY1QBqaI7fH83mWyJ G3Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=yRaJT0d7uUJkH9Hgb0bFL29hz6sLLIYkxFDHRGmhnH8=; b=aQcwXc+rh8/NNKp9x0caIe3WNhdjOdmyr0mwoK3VBn/Z30EqljSmHnQHDCaV6iWDdM ExgkP0kDGgz3pyTdSIR5a5MxH1Hk/5ZeyXMf+26YUO0BG4Li8uNNpQNaw6c5pX6sfq+T 1sSeTHCTAkmJIfufloHpCoDIsk4n/QUeh2iqU0PUXIieZYJsoLiGrqucP7zqXNV1/t+K yMwtYYJ1f33+0M1N76CJNvP0bsGo/mMxvH/B7dCBIAxuYcdtD+1EB5ElI2U2WCa1FxmH m1QH/+6vqxaEgv1rmFiL8zIF6yEcBVORl6CJpPMFkKXgqBCqeqjKa4gNHwqlMuBwR75u kofw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x20si2341114pjq.109.2019.08.29.07.42.26; Thu, 29 Aug 2019 07:42:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728694AbfH2Okq (ORCPT + 99 others); Thu, 29 Aug 2019 10:40:46 -0400 Received: from mga11.intel.com ([192.55.52.93]:28271 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728671AbfH2Okp (ORCPT ); Thu, 29 Aug 2019 10:40:45 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Aug 2019 07:40:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,443,1559545200"; d="scan'208";a="380788306" Received: from friedlmi-mobl1.ger.corp.intel.com (HELO localhost) ([10.252.54.26]) by fmsmga005.fm.intel.com with ESMTP; 29 Aug 2019 07:40:41 -0700 Date: Thu, 29 Aug 2019 17:40:40 +0300 From: Jarkko Sakkinen To: Jerry Snitselaar Cc: linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Huewe , Jason Gunthorpe , Alexey Klimov Subject: Re: [PATCH 2/2 v2] tpm_tis: override durations for STM tpm with firmware 1.2.8.28 Message-ID: <20190829144002.zhuqxnsswgl65pnm@linux.intel.com> References: <20190828004621.29050-1-jsnitsel@redhat.com> <20190828004621.29050-3-jsnitsel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190828004621.29050-3-jsnitsel@redhat.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 27, 2019 at 05:46:21PM -0700, Jerry Snitselaar wrote: > There was revealed a bug in the STM TPM chipset used in Dell R415s. > Bug is observed so far only on chipset firmware 1.2.8.28 > (1.2 TPM, device-id 0x0, rev-id 78). After some number of > operations chipset hangs and stays in inconsistent state: > > tpm_tis 00:09: Operation Timed out > tpm_tis 00:09: tpm_transmit: tpm_send: error -5 > > Durations returned by the chip are the same like on other > firmware revisions but apparently with specifically 1.2.8.28 fw > durations should be reset to 2 minutes to enable tpm chip work > properly. No working way of updating firmware was found. > > This patch adds implementation of ->update_durations method > that matches only STM devices with specific firmware version. > > Cc: Peter Huewe > Cc: Jarkko Sakkinen > Cc: Jason Gunthorpe > Signed-off-by: Alexey Klimov > Signed-off-by: Jerry Snitselaar > --- > v2: Make suggested changes from Jarkko > - change struct field name to durations from durs > - formatting cleanups > - turn into void function like update_timeouts and > use chip->duration_adjusted to track whether adjustment occurred. The code repetition looks horrible so I wrote a patch that should help: https://patchwork.kernel.org/patch/11121475/ Read the remar that prepends the diffstat. /Jarkko