File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
drivers/infiniband/hw/irdma Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -2075,7 +2075,7 @@ void irdma_cqp_ce_handler(struct irdma_pci_f *rf, struct irdma_sc_cq *cq)
2075
2075
cqp_request -> compl_info .error = info .error ;
2076
2076
2077
2077
if (cqp_request -> waiting ) {
2078
- cqp_request -> request_done = true;
2078
+ WRITE_ONCE ( cqp_request -> request_done , true) ;
2079
2079
wake_up (& cqp_request -> waitq );
2080
2080
irdma_put_cqp_request (& rf -> cqp , cqp_request );
2081
2081
} else {
Original file line number Diff line number Diff line change @@ -161,8 +161,8 @@ struct irdma_cqp_request {
161
161
void (* callback_fcn )(struct irdma_cqp_request * cqp_request );
162
162
void * param ;
163
163
struct irdma_cqp_compl_info compl_info ;
164
+ bool request_done ; /* READ/WRITE_ONCE macros operate on it */
164
165
bool waiting :1 ;
165
- bool request_done :1 ;
166
166
bool dynamic :1 ;
167
167
};
168
168
Original file line number Diff line number Diff line change @@ -481,7 +481,7 @@ void irdma_free_cqp_request(struct irdma_cqp *cqp,
481
481
if (cqp_request -> dynamic ) {
482
482
kfree (cqp_request );
483
483
} else {
484
- cqp_request -> request_done = false;
484
+ WRITE_ONCE ( cqp_request -> request_done , false) ;
485
485
cqp_request -> callback_fcn = NULL ;
486
486
cqp_request -> waiting = false;
487
487
@@ -515,7 +515,7 @@ irdma_free_pending_cqp_request(struct irdma_cqp *cqp,
515
515
{
516
516
if (cqp_request -> waiting ) {
517
517
cqp_request -> compl_info .error = true;
518
- cqp_request -> request_done = true;
518
+ WRITE_ONCE ( cqp_request -> request_done , true) ;
519
519
wake_up (& cqp_request -> waitq );
520
520
}
521
521
wait_event_timeout (cqp -> remove_wq ,
@@ -571,7 +571,7 @@ static int irdma_wait_event(struct irdma_pci_f *rf,
571
571
do {
572
572
irdma_cqp_ce_handler (rf , & rf -> ccq .sc_cq );
573
573
if (wait_event_timeout (cqp_request -> waitq ,
574
- cqp_request -> request_done ,
574
+ READ_ONCE ( cqp_request -> request_done ) ,
575
575
msecs_to_jiffies (CQP_COMPL_WAIT_TIME_MS )))
576
576
break ;
577
577
You can’t perform that action at this time.
0 commit comments