diff options
Diffstat (limited to 'drivers/infiniband/hw/irdma/utils.c')
| -rw-r--r-- | drivers/infiniband/hw/irdma/utils.c | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/irdma/utils.c b/drivers/infiniband/hw/irdma/utils.c index 71e1c5d34709..eb083f70b09f 100644 --- a/drivers/infiniband/hw/irdma/utils.c +++ b/drivers/infiniband/hw/irdma/utils.c @@ -481,7 +481,7 @@ void irdma_free_cqp_request(struct irdma_cqp *cqp,  	if (cqp_request->dynamic) {  		kfree(cqp_request);  	} else { -		cqp_request->request_done = false; +		WRITE_ONCE(cqp_request->request_done, false);  		cqp_request->callback_fcn = NULL;  		cqp_request->waiting = false; @@ -515,7 +515,7 @@ irdma_free_pending_cqp_request(struct irdma_cqp *cqp,  {  	if (cqp_request->waiting) {  		cqp_request->compl_info.error = true; -		cqp_request->request_done = true; +		WRITE_ONCE(cqp_request->request_done, true);  		wake_up(&cqp_request->waitq);  	}  	wait_event_timeout(cqp->remove_wq, @@ -567,11 +567,11 @@ static int irdma_wait_event(struct irdma_pci_f *rf,  	bool cqp_error = false;  	int err_code = 0; -	cqp_timeout.compl_cqp_cmds = rf->sc_dev.cqp_cmd_stats[IRDMA_OP_CMPL_CMDS]; +	cqp_timeout.compl_cqp_cmds = atomic64_read(&rf->sc_dev.cqp->completed_ops);  	do {  		irdma_cqp_ce_handler(rf, &rf->ccq.sc_cq);  		if (wait_event_timeout(cqp_request->waitq, -				       cqp_request->request_done, +				       READ_ONCE(cqp_request->request_done),  				       msecs_to_jiffies(CQP_COMPL_WAIT_TIME_MS)))  			break;  |