Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751816AbdLNLVb (ORCPT ); Thu, 14 Dec 2017 06:21:31 -0500 Received: from mga01.intel.com ([192.55.52.88]:32877 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751459AbdLNLVa (ORCPT ); Thu, 14 Dec 2017 06:21:30 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,400,1508828400"; d="scan'208";a="158668571" Date: Thu, 14 Dec 2017 13:21:24 +0200 From: Jarkko Sakkinen To: James Ettle Cc: linux-integrity@vger.kernel.org, azhar.shaikh@intel.com, linux-kernel@vger.kernel.org, james.l.morris@oracle.com Subject: Re: [BISECTED] tpm CLKRUN breaks PS/2 keyboard and touchpad on Braswell system Message-ID: <20171214112124.7t2oxch2gadyfqsr@linux.intel.com> References: <57d96314-cc9c-0656-186e-4eb77a132b70@ettle.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <57d96314-cc9c-0656-186e-4eb77a132b70@ettle.org.uk> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1931 Lines: 42 On Mon, Dec 11, 2017 at 07:37:29PM +0000, James Ettle wrote: > Hello, > > [First: Apologies if cross-posting from Kernel.org BZ is bad form; my > distro BZ advised I post this to your mailing list as well.] > > Situation: enabling TPM on a Clevo W510LU with an Intel N3160 CPU > breaks PS/2 keyboard and mouse. They just don't respond until after a > suspend/resume cycle, and after that they later stop after a while. > > I have confirmed this by blacklisting tpm modules. I noticed this > first with kernel 4.13, and have bisected it down to: In my GIT tree there is now: commit db3248e8a036c39141c8f7e9f1cf5c5ae6815f76 (HEAD -> next, origin/next, origin/master, master) Author: Azhar Shaikh Date: Wed Dec 6 17:38:10 2017 -0800 tpm: Keep CLKRUN enabled throughout the duration of transmit_cmd() Commit 5e572cab92f0bb5 ("tpm: Enable CLKRUN protocol for Braswell systems") disabled CLKRUN protocol during TPM transactions and re-enabled once the transaction is completed. But there were still some corner cases observed where, reading of TPM header failed for savestate command while going to suspend, which resulted in suspend failure. To fix this issue keep the CLKRUN protocol disabled for the entire duration of a single TPM command and not disabling and re-enabling again for every TPM transaction. For the other TPM accesses outside TPM command flow, add a higher level of disabling and re-enabling the CLKRUN protocol, instead of doing for every TPM transaction. Fixes: 5e572cab92f0bb5 ("tpm: Enable CLKRUN protocol for Braswell systems") Signed-off-by: Azhar Shaikh Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen Can you try this? /Jarkko