@@ -565,6 +565,7 @@ struct qed_simd_fp_handler {
enum qed_slowpath_wq_flag {
QED_SLOWPATH_MFW_TLV_REQ,
QED_SLOWPATH_PERIODIC_DB_REC,
+ QED_SLOWPATH_ACTIVE,
};
struct qed_hwfn {
@@ -700,7 +701,6 @@ struct qed_hwfn {
unsigned long iov_task_flags;
#endif
struct z_stream_s *stream;
- bool slowpath_wq_active;
struct workqueue_struct *slowpath_wq;
struct delayed_work slowpath_task;
unsigned long slowpath_task_flags;
@@ -1095,7 +1095,7 @@ static int qed_slowpath_delayed_work(struct qed_hwfn *hwfn,
enum qed_slowpath_wq_flag wq_flag,
unsigned long delay)
{
- if (!hwfn->slowpath_wq_active)
+ if (!test_bit(QED_SLOWPATH_ACTIVE, &hwfn->slowpath_task_flags))
return -EINVAL;
/* Memory barrier for setting atomic bit */
@@ -1133,7 +1133,8 @@ static void qed_slowpath_wq_stop(struct qed_dev *cdev)
continue;
/* Stop queuing new delayed works */
- cdev->hwfns[i].slowpath_wq_active = false;
+ clear_bit(QED_SLOWPATH_ACTIVE,
+ &cdev->hwfns[i].slowpath_task_flags);
/* Wait until the last periodic doorbell recovery is executed */
while (test_bit(QED_SLOWPATH_PERIODIC_DB_REC,
@@ -1153,7 +1154,7 @@ static void qed_slowpath_task(struct work_struct *work)
struct qed_ptt *ptt = qed_ptt_acquire(hwfn);
if (!ptt) {
- if (hwfn->slowpath_wq_active)
+ if (test_bit(QED_SLOWPATH_ACTIVE, &hwfn->slowpath_task_flags))
queue_delayed_work(hwfn->slowpath_wq,
&hwfn->slowpath_task, 0);
@@ -1199,7 +1200,7 @@ static int qed_slowpath_wq_start(struct qed_dev *cdev)
}
INIT_DELAYED_WORK(&hwfn->slowpath_task, qed_slowpath_task);
- hwfn->slowpath_wq_active = true;
+ set_bit(QED_SLOWPATH_ACTIVE, &hwfn->slowpath_task_flags);
}
return 0;