qed*: make use of devlink recovery infrastructure
Remove forcible recovery trigger and put it as a normal devlink
callback.
This allows user to enable/disable it via
devlink health set pci/0000:03:00.0 reporter fw_fatal auto_recover false
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: Alexander Lobakin <alobakin@marvell.com>
Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
4f5a8db27e
commit
b228cb1602
@@ -981,6 +981,7 @@ void qed_bw_update(struct qed_hwfn *hwfn, struct qed_ptt *ptt);
|
||||
u32 qed_unzip_data(struct qed_hwfn *p_hwfn,
|
||||
u32 input_len, u8 *input_buf,
|
||||
u32 max_size, u8 *unzip_buf);
|
||||
int qed_recovery_process(struct qed_dev *cdev);
|
||||
void qed_schedule_recovery_handler(struct qed_hwfn *p_hwfn);
|
||||
void qed_hw_error_occurred(struct qed_hwfn *p_hwfn,
|
||||
enum qed_hw_err_type err_type);
|
||||
|
||||
@@ -32,8 +32,22 @@ int qed_report_fatal_error(struct devlink *devlink, enum qed_hw_err_type err_typ
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
qed_fw_fatal_reporter_recover(struct devlink_health_reporter *reporter,
|
||||
void *priv_ctx,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct qed_devlink *qdl = devlink_health_reporter_priv(reporter);
|
||||
struct qed_dev *cdev = qdl->cdev;
|
||||
|
||||
qed_recovery_process(cdev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct devlink_health_reporter_ops qed_fw_fatal_reporter_ops = {
|
||||
.name = "fw_fatal",
|
||||
.recover = qed_fw_fatal_reporter_recover,
|
||||
};
|
||||
|
||||
#define QED_REPORTER_FW_GRACEFUL_PERIOD 1200000
|
||||
|
||||
@@ -2817,7 +2817,7 @@ static int qed_set_led(struct qed_dev *cdev, enum qed_led_mode mode)
|
||||
return status;
|
||||
}
|
||||
|
||||
static int qed_recovery_process(struct qed_dev *cdev)
|
||||
int qed_recovery_process(struct qed_dev *cdev)
|
||||
{
|
||||
struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev);
|
||||
struct qed_ptt *p_ptt;
|
||||
|
||||
Reference in New Issue
Block a user