Skip to content
Commit 888d867d authored by Tomas Winkler's avatar Tomas Winkler Committed by Jarkko Sakkinen
Browse files

tpm: cmd_ready command can be issued only after granting locality

The correct sequence is to first request locality and only after
that perform cmd_ready handshake, otherwise the hardware will drop
the subsequent message as from the device point of view the cmd_ready
handshake wasn't performed. Symmetrically locality has to be relinquished
only after going idle handshake has completed, this requires that
go_idle has to poll for the completion and as well locality
relinquish has to poll for completion so it is not overridden
in back to back commands flow.

Two wrapper functions are added (request_locality relinquish_locality)
to simplify the error handling.

The issue is only visible on devices that support multiple localities.

Fixes: 877c57d0

 ("tpm_crb: request and relinquish locality 0")
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Reviewed-by: default avatarJarkko Sakkinen <jarkko.sakkine@linux.intel.com>
Tested-by: default avatarJarkko Sakkinen <jarkko.sakkine@linux.intel.com>
Signed-off-by: default avatarJarkko Sakkinen <jarkko.sakkine@linux.intel.com>
parent 5893ed18
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment