summaryrefslogtreecommitdiff
path: root/drivers/misc/habanalabs/include/common
diff options
context:
space:
mode:
authorOfir Bitton <obitton@habana.ai>2022-08-23 16:58:38 +0300
committerOded Gabbay <ogabbay@kernel.org>2022-09-19 15:08:38 +0300
commit0626fa1a4d311b55b5f20a90380915f1bc135607 (patch)
treee51eb26c6973fa2341510e3f8249fe5d02506767 /drivers/misc/habanalabs/include/common
parenta0fc8688c003172455f99b6b7e185b167ed964a0 (diff)
downloadlwn-0626fa1a4d311b55b5f20a90380915f1bc135607.tar.gz
lwn-0626fa1a4d311b55b5f20a90380915f1bc135607.zip
habanalabs: add support for new cpucp return codes
Firmware now responds with a more detailed cpucp return codes. Driver can now distinguish between error and debug return codes. Signed-off-by: Ofir Bitton <obitton@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc/habanalabs/include/common')
-rw-r--r--drivers/misc/habanalabs/include/common/cpucp_if.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/misc/habanalabs/include/common/cpucp_if.h b/drivers/misc/habanalabs/include/common/cpucp_if.h
index b837bb1f4cd3..9593d1a26945 100644
--- a/drivers/misc/habanalabs/include/common/cpucp_if.h
+++ b/drivers/misc/habanalabs/include/common/cpucp_if.h
@@ -824,10 +824,25 @@ enum cpucp_led_index {
CPUCP_LED2_INDEX
};
+/*
+ * enum cpucp_packet_rc - Error return code
+ * @cpucp_packet_success -> in case of success.
+ * @cpucp_packet_invalid -> this is to support Goya and Gaudi platform.
+ * @cpucp_packet_fault -> in case of processing error like failing to
+ * get device binding or semaphore etc.
+ * @cpucp_packet_invalid_pkt -> when cpucp packet is un-supported. This is
+ * supported Greco onwards.
+ * @cpucp_packet_invalid_params -> when checking parameter like length of buffer
+ * or attribute value etc. Supported Greco onwards.
+ * @cpucp_packet_rc_max -> It indicates size of enum so should be at last.
+ */
enum cpucp_packet_rc {
cpucp_packet_success,
cpucp_packet_invalid,
- cpucp_packet_fault
+ cpucp_packet_fault,
+ cpucp_packet_invalid_pkt,
+ cpucp_packet_invalid_params,
+ cpucp_packet_rc_max
};
/*