summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/qlogic/qed/qed_hw.h
diff options
context:
space:
mode:
authorIgor Russkikh <irusskikh@marvell.com>2020-05-14 12:57:17 +0300
committerDavid S. Miller <davem@davemloft.net>2020-05-14 13:25:46 -0700
commitd639836ab3363f935a9a4336cb4ea3828d0437dd (patch)
tree6d774673ebec055189125ba7c4e7d76d73504234 /drivers/net/ethernet/qlogic/qed/qed_hw.h
parentc8a867a38fc8d88a096ebf8813d02bbf50f7335e (diff)
net: qed: adding hw_err states and handling
Here we introduce qed device error tracking flags and error types. qed_hw_err_notify is an entrace point to report errors. It'll notify higher level drivers (qede/qedr/etc) to handle and recover the error. List of posible errors comes from hardware interfaces, but could be extended in future. Signed-off-by: Ariel Elior <ariel.elior@marvell.com> Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com> Signed-off-by: Igor Russkikh <irusskikh@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qed/qed_hw.h')
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_hw.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_hw.h b/drivers/net/ethernet/qlogic/qed/qed_hw.h
index 505e94db939d..f5b109b04b66 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_hw.h
+++ b/drivers/net/ethernet/qlogic/qed/qed_hw.h
@@ -315,4 +315,19 @@ int qed_init_fw_data(struct qed_dev *cdev,
int qed_dmae_sanity(struct qed_hwfn *p_hwfn,
struct qed_ptt *p_ptt, const char *phase);
+#define QED_HW_ERR_MAX_STR_SIZE 256
+
+/**
+ * @brief qed_hw_err_notify - Notify upper layer driver and management FW
+ * about a HW error.
+ *
+ * @param p_hwfn
+ * @param p_ptt
+ * @param err_type
+ * @param fmt - debug data buffer to send to the MFW
+ * @param ... - buffer format args
+ */
+void qed_hw_err_notify(struct qed_hwfn *p_hwfn,
+ struct qed_ptt *p_ptt,
+ enum qed_hw_err_type err_type, char *fmt, ...);
#endif