libpayload: ahci: Fix command engine shutdown

A timeout while waiting for a device' signature has shown that our
error path wasn't correct. The shutdown of the ports command engine
always timed out. Fix that by waiting for FR (FIS Receive Running)
to be cleared independently from CR (Command List Running) and after
clearing FRE (FIS Receive Enable).

Change-Id: I50edf426ef0241424456f1489a7fc86a2cfc5753
Signed-off-by: Nico Huber <>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <>
Reviewed-by: Marc Jones <>
Reviewed-by: Stefan Reinauer <>
1 file changed