summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2020-06-19 13:30:40 +1000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-09 09:39:35 +0200
commit44d0642038b8c256ebd14ed16ff539ae88b7bfb5 (patch)
tree14b8809595df40fc1c4eabd3dcc577c9fc286518 /drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
parent9d23e385d8637aa5b93cbb4d11490f9a637c77ee (diff)
tpm: ibmvtpm: Wait for ready buffer before probing for TPM2 attributes
[ Upstream commit 72d0556dca39f45eca6c4c085e9eb0fc70aec025 ] The tpm2_get_cc_attrs_tbl() call will result in TPM commands being issued, which will need the use of the internal command/response buffer. But, we're issuing this *before* we've waited to make sure that buffer is allocated. This can result in intermittent failures to probe if the hypervisor / TPM implementation doesn't respond quickly enough. I find it fails almost every time with an 8 vcpu guest under KVM with software emulated TPM. To fix it, just move the tpm2_get_cc_attrs_tlb() call after the existing code to wait for initialization, which will ensure the buffer is allocated. Fixes: 18b3670d79ae9 ("tpm: ibmvtpm: Add support for TPM2") Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c')
0 files changed, 0 insertions, 0 deletions