Commit 001d5f66 authored by Oded Gabbay's avatar Oded Gabbay
Browse files

habanalabs: skip reading f/w errors on bad status



If we read all FF from the boot status register, then something is
totally wrong and there is no point of reading specific errors.

Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
parent 285c0fad
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -850,6 +850,11 @@ int hl_fw_read_preboot_status(struct hl_device *hdev, u32 cpu_boot_status_reg,
	if (rc) {
		dev_err(hdev->dev, "Failed to read preboot version\n");
		detect_cpu_boot_status(hdev, status);

		/* If we read all FF, then something is totally wrong, no point
		 * of reading specific errors
		 */
		if (status != -1)
			fw_read_errors(hdev, boot_err0_reg,
					cpu_security_boot_status_reg);
		return -EIO;