net/bnxt: support periodic FW health monitoring
[dpdk.git] / drivers / net / bnxt / bnxt.h
index ac2bf15..50b9b38 100644 (file)
@@ -365,7 +365,12 @@ struct bnxt_error_recovery_info {
        uint8_t         delay_after_reset[BNXT_NUM_RESET_REG];
 #define BNXT_FLAG_ERROR_RECOVERY_HOST  (1 << 0)
 #define BNXT_FLAG_ERROR_RECOVERY_CO_CPU        (1 << 1)
+#define BNXT_FLAG_MASTER_FUNC          (1 << 2)
+#define BNXT_FLAG_RECOVERY_ENABLED     (1 << 3)
        uint32_t        flags;
+
+       uint32_t        last_heart_beat;
+       uint32_t        last_reset_counter;
 };
 
 /* address space location of register */
@@ -414,6 +419,7 @@ struct bnxt {
 #define BNXT_FLAG_FW_CAP_IF_CHANGE     (1 << 17)
 #define BNXT_FLAG_IF_CHANGE_HOT_FW_RESET_DONE  (1 << 18)
 #define BNXT_FLAG_FW_CAP_ERROR_RECOVERY                (1 << 19)
+#define BNXT_FLAG_FW_HEALTH_CHECK_SCHEDULED    (1 << 20)
 #define BNXT_FLAG_EXT_STATS_SUPPORTED  (1 << 29)
 #define BNXT_FLAG_NEW_RM       (1 << 30)
 #define BNXT_FLAG_INIT_DONE    (1U << 31)
@@ -530,6 +536,8 @@ int bnxt_rcv_msg_from_vf(struct bnxt *bp, uint16_t vf_id, void *msg);
 int is_bnxt_in_error(struct bnxt *bp);
 
 int bnxt_map_fw_health_status_regs(struct bnxt *bp);
+uint32_t bnxt_read_fw_status_reg(struct bnxt *bp, uint32_t index);
+void bnxt_schedule_fw_health_check(struct bnxt *bp);
 
 bool is_bnxt_supported(struct rte_eth_dev *dev);
 bool bnxt_stratus_device(struct bnxt *bp);