]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
accel/habanalabs: poll for device status update following WFE cmd
authorKoby Elbaz <kelbaz@habana.ai>
Mon, 27 Mar 2023 08:56:16 +0000 (11:56 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Thu, 8 Jun 2023 09:35:54 +0000 (12:35 +0300)
commit67d19a2f49b07b2c4a15e6a96e1de46d95209ae4
tree1344825cc09958c0d27777e0dfe7bc8f3f0f1274
parent3b9abb4fa642ee28bcd22a0398087a2d87d3c987
accel/habanalabs: poll for device status update following WFE cmd

Currently, we rely on COMMS protocol's ack to verify that WFE command
has been acknowledged by the FW. However, this does not guarantee that
the device status has been updated.
Although unlikely, this could trigger a race since the driver expects
the device to be halted at that stage, but it might not be.
Therefore, we increase WFE's robustness by polling on the status
register that will be updated once the device is actually halted.

Signed-off-by: Koby Elbaz <kelbaz@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/accel/habanalabs/common/firmware_if.c