net/qede/base: support doorbell overflow recovery
[dpdk.git] / drivers / net / qede / base / ecore_dev_api.h
index b3c9f89..8b28af9 100644 (file)
@@ -155,6 +155,45 @@ enum _ecore_status_t ecore_hw_stop_fastpath(struct ecore_dev *p_dev);
  *
  */
 void ecore_prepare_hibernate(struct ecore_dev *p_dev);
+
+enum ecore_db_rec_width {
+       DB_REC_WIDTH_32B,
+       DB_REC_WIDTH_64B,
+};
+
+enum ecore_db_rec_space {
+       DB_REC_KERNEL,
+       DB_REC_USER,
+};
+
+/**
+ * @brief db_recovery_add - add doorbell information to the doorbell
+ * recovery mechanism.
+ *
+ * @param p_dev
+ * @param db_addr - doorbell address
+ * @param db_data - address of where db_data is stored
+ * @param db_width - doorbell is 32b pr 64b
+ * @param db_space - doorbell recovery addresses are user or kernel space
+ */
+enum _ecore_status_t ecore_db_recovery_add(struct ecore_dev *p_dev,
+                                          void OSAL_IOMEM *db_addr,
+                                          void *db_data,
+                                          enum ecore_db_rec_width db_width,
+                                          enum ecore_db_rec_space db_space);
+
+/**
+ * @brief db_recovery_del - remove doorbell information from the doorbell
+ * recovery mechanism. db_data serves as key (db_addr is not unique).
+ *
+ * @param cdev
+ * @param db_addr - doorbell address
+ * @param db_data - address where db_data is stored. Serves as key for the
+ *                  entry to delete.
+ */
+enum _ecore_status_t ecore_db_recovery_del(struct ecore_dev *p_dev,
+                                          void OSAL_IOMEM *db_addr,
+                                          void *db_data);
 #endif
 
 /**