platform/x86/amd/pmf: Fix TEE enact command failure after suspend and resume
authorShyam Sundar S K <Shyam-sundar.S-k@amd.com>
Fri, 16 Feb 2024 06:41:12 +0000 (12:11 +0530)
committerHans de Goede <hdegoede@redhat.com>
Mon, 19 Feb 2024 12:30:06 +0000 (13:30 +0100)
commit11e298f3548a6fe5e6ad78f811abfba15e6ebbc1
treec294b856fbaddbca31f8229428ae79b12eb33ef5
parent3da01394c0f727baaee728de290eb1ecaad099fb
platform/x86/amd/pmf: Fix TEE enact command failure after suspend and resume

TEE enact command failures are seen after each suspend/resume cycle;
fix this by cancelling the policy builder workqueue before going into
suspend and reschedule the workqueue after resume.

[  629.516792] ccp 0000:c2:00.2: tee: command 0x5 timed out, disabling PSP
[  629.516835] amd-pmf AMDI0102:00: TEE enact cmd failed. err: ffff000e, ret:0
[  630.550464] amd-pmf AMDI0102:00: AMD_PMF_REGISTER_RESPONSE:1
[  630.550511] amd-pmf AMDI0102:00: AMD_PMF_REGISTER_ARGUMENT:7
[  630.550548] amd-pmf AMDI0102:00: AMD_PMF_REGISTER_MESSAGE:16

Fixes: ae82cef7d9c5 ("platform/x86/amd/pmf: Add support for PMF-TA interaction")
Co-developed-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
Signed-off-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20240216064112.962582-2-Shyam-sundar.S-k@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/amd/pmf/core.c