Commit 15f8eb19 authored by Dani Liberman's avatar Dani Liberman Committed by Oded Gabbay

habanalabs: fix soft reset flow in case of failure

In case of soft reset failure, hard reset should be initiated, but
reset flags were not set to enable it, which caused another soft reset
followed by another failure.
Updated reset flags to enable hard reset flow in case of soft reset
failure.
Signed-off-by: default avatarDani Liberman <dliberman@habana.ai>
Reviewed-by: default avatarOded Gabbay <ogabbay@kernel.org>
Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
parent aa3e1f12
...@@ -1293,11 +1293,14 @@ int hl_device_reset(struct hl_device *hdev, u32 flags) ...@@ -1293,11 +1293,14 @@ int hl_device_reset(struct hl_device *hdev, u32 flags)
hdev->reset_info.hard_reset_cnt++; hdev->reset_info.hard_reset_cnt++;
} else if (reset_upon_device_release) { } else if (reset_upon_device_release) {
dev_err(hdev->dev, "Failed to reset device after user release\n"); dev_err(hdev->dev, "Failed to reset device after user release\n");
flags |= HL_DRV_RESET_HARD;
flags &= ~HL_DRV_RESET_DEV_RELEASE;
hard_reset = true; hard_reset = true;
goto again; goto again;
} else { } else {
dev_err(hdev->dev, "Failed to do soft-reset\n"); dev_err(hdev->dev, "Failed to do soft-reset\n");
hdev->reset_info.soft_reset_cnt++; hdev->reset_info.soft_reset_cnt++;
flags |= HL_DRV_RESET_HARD;
hard_reset = true; hard_reset = true;
goto again; goto again;
} }
......
Markdown is supported
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