Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tee: optee: Fix supplicant based device enumeration
[ Upstream commit 7269cba ] Currently supplicant dependent optee device enumeration only registers devices whenever tee-supplicant is invoked for the first time. But it forgets to remove devices when tee-supplicant daemon stops running and closes its context gracefully. This leads to following error for fTPM driver during reboot/shutdown: [ 73.466791] tpm tpm0: ftpm_tee_tpm_op_send: SUBMIT_COMMAND invoke error: 0xffff3024 Fix this by adding an attribute for supplicant dependent devices so that the user-space service can detect and detach supplicant devices before closing the supplicant: $ for dev in /sys/bus/tee/devices/*; do if [[ -f "$dev/need_supplicant" && -f "$dev/driver/unbind" ]]; \ then echo $(basename "$dev") > $dev/driver/unbind; fi done Reported-by: Jan Kiszka <[email protected]> Closes: OP-TEE/optee_os#6094 Fixes: 5f178bb ("optee: enable support for multi-stage bus enumeration") Signed-off-by: Sumit Garg <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Acked-by: Jerome Forissier <[email protected]> [jw: fixed up Date documentation] Signed-off-by: Jens Wiklander <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
- Loading branch information