> > > > Now that I am explaining it, it felt instead of pre-incrementing > > cmd_cleanup_cmpl, it should be atomic variable. Do see any issue ? > > > > Yeah, atomic. > > And then I guess for this: > > if (qedi_conn->cmd_cleanup_req > 0) { > QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_TID, > "Freeing tid=0x%x for cid=0x%x\n", > cqe->itid, qedi_conn->iscsi_conn_id); > qedi_conn->cmd_cleanup_cmpl++; > wake_up(&qedi_conn->wait_queue); > > > we might only want to do the wake_up once: > > if (atomic_inc_return(&qedi_conn->cmd_cleanup_cmpl) == > qedi_conn->cmd_cleanup_req) { > > ? Agree, I will share the updated patch.