habanalabs: fix rc when new CPUCP opcodes are not supported
authorTomer Tayar <ttayar@habana.ai>
Fri, 18 Nov 2022 13:08:33 +0000 (15:08 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Wed, 23 Nov 2022 14:44:02 +0000 (16:44 +0200)
commit56fb517775f4d71dbca2b1fb3562276138361072
tree33241b54dc4fb5b41b399b464bf63c63f77dbdb2
parent6825b5f81f273fcc1ec61e7e203b0ea40d9987fc
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 <ttayar@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/firmware_if.c