diff options
author | Tomer Tayar <ttayar@habana.ai> | 2022-01-18 11:31:15 +0100 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2022-02-28 13:22:03 +0100 |
commit | 930feb41efe2e799992ae07c1a274f68be7980ea (patch) | |
tree | 537333bbfe3b8a4cbcd21d4ea7620a00b393ab9b /drivers/misc/habanalabs/common/command_submission.c | |
parent | habanalabs: fix race between wait and irq (diff) | |
download | linux-930feb41efe2e799992ae07c1a274f68be7980ea.tar.xz linux-930feb41efe2e799992ae07c1a274f68be7980ea.zip |
habanalabs: prevent false heartbeat failure during soft-reset
The heartbeat thread is active during soft-reset, and it tries to send
messages to CPU-CP core.
Within the soft-reset, in the time window in which the device is marked
as disabled, any CPU-CP command is "silently" skipped and a success
value it returned.
However, in addition to the return value, the heartbeat function also
checks the F/W result, but because no command is sent in this time
window, the result variable won't hold the expected value and we will
have a false heartbeat failure.
To avoid it, modify the "silent" skip to be done only in hard-reset.
The CPU-CP should be able to handle messages during soft-reset.
In addition to the heartbeat problem, this should also solve other
issues in other flows that send messages during soft-reset and use the
F/W result as it w/o being aware to the reset.
Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc/habanalabs/common/command_submission.c')
0 files changed, 0 insertions, 0 deletions