qed: Fix SPQ entries not returned to pool in error flows
[sfrench/cifs-2.6.git] / drivers / net / ethernet / qlogic / qed / qed_sp.h
index 04259df8a5c24436139dd46d6161b20d004c555d..3157c0d9944177e784a62ef983dd2adc3b5c0f11 100644 (file)
@@ -399,6 +399,17 @@ struct qed_sp_init_data {
        struct qed_spq_comp_cb *p_comp_data;
 };
 
+/**
+ * @brief Returns a SPQ entry to the pool / frees the entry if allocated.
+ *        Should be called on in error flows after initializing the SPQ entry
+ *        and before posting it.
+ *
+ * @param p_hwfn
+ * @param p_ent
+ */
+void qed_sp_destroy_request(struct qed_hwfn *p_hwfn,
+                           struct qed_spq_entry *p_ent);
+
 int qed_sp_init_request(struct qed_hwfn *p_hwfn,
                        struct qed_spq_entry **pp_ent,
                        u8 cmd,