summaryrefslogtreecommitdiff
path: root/include/linux/qed/qed_if.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 23:25:46 +0300
commitd639836ab3363f935a9a4336cb4ea3828d0437dd (patch)
tree6d774673ebec055189125ba7c4e7d76d73504234 /include/linux/qed/qed_if.h
parentc8a867a38fc8d88a096ebf8813d02bbf50f7335e (diff)
downloadlinux-d639836ab3363f935a9a4336cb4ea3828d0437dd.tar.xz
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 'include/linux/qed/qed_if.h')
-rw-r--r--include/linux/qed/qed_if.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/qed/qed_if.h b/include/linux/qed/qed_if.h
index 8f29e0d8a7b3..1b7d9548ee43 100644
--- a/include/linux/qed/qed_if.h
+++ b/include/linux/qed/qed_if.h
@@ -607,6 +607,16 @@ struct qed_sb_info {
struct qed_dev *cdev;
};
+enum qed_hw_err_type {
+ QED_HW_ERR_FAN_FAIL,
+ QED_HW_ERR_MFW_RESP_FAIL,
+ QED_HW_ERR_HW_ATTN,
+ QED_HW_ERR_DMAE_FAIL,
+ QED_HW_ERR_RAMROD_FAIL,
+ QED_HW_ERR_FW_ASSERT,
+ QED_HW_ERR_LAST,
+};
+
enum qed_dev_type {
QED_DEV_TYPE_BB,
QED_DEV_TYPE_AH,
@@ -814,6 +824,8 @@ struct qed_common_cb_ops {
void (*link_update)(void *dev,
struct qed_link_output *link);
void (*schedule_recovery_handler)(void *dev);
+ void (*schedule_hw_err_handler)(void *dev,
+ enum qed_hw_err_type err_type);
void (*dcbx_aen)(void *dev, struct qed_dcbx_get *get, u32 mib_type);
void (*get_generic_tlv_data)(void *dev, struct qed_generic_tlvs *data);
void (*get_protocol_tlv_data)(void *dev, void *data);