diff options
author | Varun Prakash <varun@chelsio.com> | 2019-01-10 23:29:28 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-02-27 10:08:55 +0100 |
commit | 4c3b23e90307d42ca2e6ae3211ecf9b7e61a5004 (patch) | |
tree | 380ff137d952d1db97c8fb4d6de3f7a4aa970045 /drivers/scsi/cxgbi/libcxgbi.h | |
parent | b2ae824798e11bf55e7f701295e37d4e93ef47db (diff) | |
download | linux-stable-4c3b23e90307d42ca2e6ae3211ecf9b7e61a5004.tar.gz linux-stable-4c3b23e90307d42ca2e6ae3211ecf9b7e61a5004.tar.bz2 linux-stable-4c3b23e90307d42ca2e6ae3211ecf9b7e61a5004.zip |
scsi: cxgb4i: add wait_for_completion()
[ Upstream commit 9e8f1c79831424d30c0e3df068be7f4a244157c9 ]
In case of ->set_param() and ->bind_conn() cxgb4i driver does not wait for
cmd completion, this can create race conditions, to avoid this add
wait_for_completion().
Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/scsi/cxgbi/libcxgbi.h')
-rw-r--r-- | drivers/scsi/cxgbi/libcxgbi.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/cxgbi/libcxgbi.h b/drivers/scsi/cxgbi/libcxgbi.h index dcb190e75343..3bf7414a75e5 100644 --- a/drivers/scsi/cxgbi/libcxgbi.h +++ b/drivers/scsi/cxgbi/libcxgbi.h @@ -146,6 +146,7 @@ struct cxgbi_sock { struct sk_buff_head receive_queue; struct sk_buff_head write_queue; struct timer_list retry_timer; + struct completion cmpl; int err; rwlock_t callback_lock; void *user_data; @@ -487,9 +488,9 @@ struct cxgbi_device { struct cxgbi_ppm *, struct cxgbi_task_tag_info *); int (*csk_ddp_setup_digest)(struct cxgbi_sock *, - unsigned int, int, int, int); + unsigned int, int, int); int (*csk_ddp_setup_pgidx)(struct cxgbi_sock *, - unsigned int, int, bool); + unsigned int, int); void (*csk_release_offload_resources)(struct cxgbi_sock *); int (*csk_rx_pdu_ready)(struct cxgbi_sock *, struct sk_buff *); |