Skip to content

Commit 56fb517

Browse files
Tomer Tayarogabbay
authored andcommitted
habanalabs: fix rc when new CPUCP opcodes are not supported
When the new CPUCP opcodes are not supported and a CPUCP packet fails, the return value is the F/W error resposone which is a positive value. If this packet is sent from IOCTL and the positive value is used, the ICOTL will not be considered as unsuccessful. Signed-off-by: Tomer Tayar <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
1 parent 6825b5f commit 56fb517

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/misc/habanalabs/common/firmware_if.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ int hl_fw_send_cpu_message(struct hl_device *hdev, u32 hw_queue_id, u32 *msg,
324324

325325
if (!prop->supports_advanced_cpucp_rc) {
326326
dev_dbg(hdev->dev, "F/W ERROR %d for CPU packet %d\n", rc, opcode);
327+
rc = -EIO;
327328
goto scrub_descriptor;
328329
}
329330

0 commit comments

Comments
 (0)