net/bnxt: support FW reset
[dpdk.git] / drivers / net / bnxt / bnxt.h
index ea556d0..637ee9a 100644 (file)
@@ -368,6 +368,9 @@ struct bnxt_error_recovery_info {
 #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 */
@@ -385,6 +388,7 @@ struct bnxt_error_recovery_info {
 #define BNXT_FW_STATUS_REG_OFF(reg)    ((reg) & ~BNXT_FW_STATUS_REG_TYPE_MASK)
 
 #define BNXT_GRCP_WINDOW_2_BASE                0x2000
+#define BNXT_GRCP_WINDOW_3_BASE                0x3000
 
 #define BNXT_HWRM_SHORT_REQ_LEN                sizeof(struct hwrm_short_input)
 struct bnxt {
@@ -416,6 +420,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)
@@ -532,6 +537,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);