net/bnxt: update resource allocation settings
[dpdk.git] / drivers / net / bnxt / bnxt_cpr.h
index b61bafa..cccd6cd 100644 (file)
@@ -64,9 +64,9 @@ struct bnxt_db_info;
                                (cons));                                \
 } while (0)
 #define B_CP_DIS_DB(cpr, raw_cons)                                     \
-       rte_write32((DB_CP_FLAGS |                                      \
-                   RING_CMP(((cpr)->cp_ring_struct), raw_cons)),       \
-                   ((cpr)->cp_db.doorbell))
+       rte_write32_relaxed((DB_CP_FLAGS |                              \
+                           RING_CMP(((cpr)->cp_ring_struct), raw_cons)), \
+                           ((cpr)->cp_db.doorbell))
 
 #define B_CP_DB(cpr, raw_cons, ring_mask)                              \
        rte_write32((DB_CP_FLAGS |                                      \
@@ -107,10 +107,23 @@ void bnxt_handle_async_event(struct bnxt *bp, struct cmpl_base *cmp);
 void bnxt_handle_fwd_req(struct bnxt *bp, struct cmpl_base *cmp);
 int bnxt_event_hwrm_resp_handler(struct bnxt *bp, struct cmpl_base *cmp);
 void bnxt_dev_reset_and_resume(void *arg);
+void bnxt_wait_for_device_shutdown(struct bnxt *bp);
 
 #define EVENT_DATA1_REASON_CODE_FW_EXCEPTION_FATAL     \
        HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_REASON_CODE_FW_EXCEPTION_FATAL
 #define EVENT_DATA1_REASON_CODE_MASK                   \
        HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_REASON_CODE_MASK
 
+#define EVENT_DATA1_FLAGS_MASK                         \
+       HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_EVENT_DATA1_FLAGS_MASK
+
+#define EVENT_DATA1_FLAGS_MASTER_FUNC                  \
+       HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_EVENT_DATA1_FLAGS_MASTER_FUNC
+
+#define EVENT_DATA1_FLAGS_RECOVERY_ENABLED             \
+       HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_EVENT_DATA1_FLAGS_RECOVERY_ENABLED
+
+bool bnxt_is_recovery_enabled(struct bnxt *bp);
+bool bnxt_is_master_func(struct bnxt *bp);
+
 #endif