This patch adds the detection and handling of a parity error ("process kill event"), including the update of the protocol drivers, and the prevention of any HW access that will lead to device access towards the host while recovery is in progress. It also provides the means for the protocol drivers to trigger a recovery process on their decision.
Showing the changes to include/linux (1 of 11 files). Show all
Unified · Split
| @@ -763,6 +763,7 @@ struct qed_probe_params { · 762 unmodified lines | ||
| 763 | 763 | u32 dp_module; |
| 764 | 764 | u8 dp_level; |
| 765 | 765 | bool is_vf; |
| 766 | + bool recov_in_prog; | |
| 766 | 767 | }; |
| 767 | 768 | |
| 768 | 769 | #define QED_DRV_VER_STR_SIZE 12 |
| @@ -809,6 +810,7 @@ struct qed_common_cb_ops { · 40 unmodified lines | ||
| 809 | 810 | void (*arfs_filter_op)(void *dev, void *fltr, u8 fw_rc); |
| 810 | 811 | void (*link_update)(void *dev, |
| 811 | 812 | struct qed_link_output *link); |
| 813 | + void (*schedule_recovery_handler)(void *dev); | |
| 812 | 814 | void (*dcbx_aen)(void *dev, struct qed_dcbx_get *get, u32 mib_type); |
| 813 | 815 | void (*get_generic_tlv_data)(void *dev, struct qed_generic_tlvs *data); |
| 814 | 816 | void (*get_protocol_tlv_data)(void *dev, void *data); |
| @@ -1056,6 +1058,24 @@ struct qed_common_ops { · 241 unmodified lines | ||
| 1056 | 1058 | int (*db_recovery_del)(struct qed_dev *cdev, |
| 1057 | 1059 | void __iomem *db_addr, void *db_data); |
| 1058 | 1060 | |
| 1061 | +/** | |
| 1062 | + * @brief recovery_process - Trigger a recovery process | |
| 1063 | + * | |
| 1064 | + * @param cdev | |
| 1065 | + * | |
| 1066 | + * @return 0 on success, error otherwise. | |
| 1067 | + */ | |
| 1068 | + int (*recovery_process)(struct qed_dev *cdev); | |
| 1069 | + | |
| 1070 | +/** | |
| 1071 | + * @brief recovery_prolog - Execute the prolog operations of a recovery process | |
| 1072 | + * | |
| 1073 | + * @param cdev | |
| 1074 | + * | |
| 1075 | + * @return 0 on success, error otherwise. | |
| 1076 | + */ | |
| 1077 | + int (*recovery_prolog)(struct qed_dev *cdev); | |
| 1078 | + | |
| 1059 | 1079 | /** |
| 1060 | 1080 | * @brief update_drv_state - API to inform the change in the driver state. |
| 1061 | 1081 | * |