summaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorTomer Tayar <ttayar@habana.ai>2021-04-06 13:32:20 +0300
committerOded Gabbay <ogabbay@kernel.org>2021-04-09 14:09:24 +0300
commit1b4971573fde0c4d4ed7de70c3a9cfd08330a541 (patch)
tree26c94446ac4b114a657512ffd2efb144ddfd1913 /drivers/misc
parent7d21114b03618a1b528804a631098b471eac6481 (diff)
downloadlinux-1b4971573fde0c4d4ed7de70c3a9cfd08330a541.tar.xz
habanalabs/gaudi: clear QM errors only if not in stop_on_err mode
Clearing QM errors by the driver will prevent these H/W blocks from stopping in case they are configured to stop on errors, so perform this clearing only if this mode is not in use. 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')
-rw-r--r--drivers/misc/habanalabs/gaudi/gaudi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/misc/habanalabs/gaudi/gaudi.c b/drivers/misc/habanalabs/gaudi/gaudi.c
index 03d3fb643e79..791434278904 100644
--- a/drivers/misc/habanalabs/gaudi/gaudi.c
+++ b/drivers/misc/habanalabs/gaudi/gaudi.c
@@ -7086,7 +7086,8 @@ static void gaudi_handle_qman_err_generic(struct hl_device *hdev,
}
/* Write 1 clear errors */
- WREG32(glbl_sts_addr + 4 * i, glbl_sts_clr_val);
+ if (!hdev->stop_on_err)
+ WREG32(glbl_sts_addr + 4 * i, glbl_sts_clr_val);
}
arb_err_val = RREG32(arb_err_addr);