diff options
Diffstat (limited to 'drivers/scsi/mpt2sas/mpt2sas_ctl.c')
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_ctl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_ctl.c b/drivers/scsi/mpt2sas/mpt2sas_ctl.c index 33463ace0d48..57d724633906 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_ctl.c +++ b/drivers/scsi/mpt2sas/mpt2sas_ctl.c | |||
@@ -812,6 +812,7 @@ _ctl_do_mpt_command(struct MPT2SAS_ADAPTER *ioc, | |||
812 | timeout = MPT2_IOCTL_DEFAULT_TIMEOUT; | 812 | timeout = MPT2_IOCTL_DEFAULT_TIMEOUT; |
813 | else | 813 | else |
814 | timeout = karg.timeout; | 814 | timeout = karg.timeout; |
815 | init_completion(&ioc->ctl_cmds.done); | ||
815 | timeleft = wait_for_completion_timeout(&ioc->ctl_cmds.done, | 816 | timeleft = wait_for_completion_timeout(&ioc->ctl_cmds.done, |
816 | timeout*HZ); | 817 | timeout*HZ); |
817 | if (mpi_request->Function == MPI2_FUNCTION_SCSI_TASK_MGMT) { | 818 | if (mpi_request->Function == MPI2_FUNCTION_SCSI_TASK_MGMT) { |
@@ -1388,6 +1389,7 @@ _ctl_diag_register(void __user *arg, enum block_state state) | |||
1388 | cpu_to_le32(ioc->product_specific[buffer_type][i]); | 1389 | cpu_to_le32(ioc->product_specific[buffer_type][i]); |
1389 | 1390 | ||
1390 | mpt2sas_base_put_smid_default(ioc, smid); | 1391 | mpt2sas_base_put_smid_default(ioc, smid); |
1392 | init_completion(&ioc->ctl_cmds.done); | ||
1391 | timeleft = wait_for_completion_timeout(&ioc->ctl_cmds.done, | 1393 | timeleft = wait_for_completion_timeout(&ioc->ctl_cmds.done, |
1392 | MPT2_IOCTL_DEFAULT_TIMEOUT*HZ); | 1394 | MPT2_IOCTL_DEFAULT_TIMEOUT*HZ); |
1393 | 1395 | ||
@@ -1654,6 +1656,7 @@ _ctl_send_release(struct MPT2SAS_ADAPTER *ioc, u8 buffer_type, u8 *issue_reset) | |||
1654 | mpi_request->VP_ID = 0; | 1656 | mpi_request->VP_ID = 0; |
1655 | 1657 | ||
1656 | mpt2sas_base_put_smid_default(ioc, smid); | 1658 | mpt2sas_base_put_smid_default(ioc, smid); |
1659 | init_completion(&ioc->ctl_cmds.done); | ||
1657 | timeleft = wait_for_completion_timeout(&ioc->ctl_cmds.done, | 1660 | timeleft = wait_for_completion_timeout(&ioc->ctl_cmds.done, |
1658 | MPT2_IOCTL_DEFAULT_TIMEOUT*HZ); | 1661 | MPT2_IOCTL_DEFAULT_TIMEOUT*HZ); |
1659 | 1662 | ||
@@ -1915,6 +1918,7 @@ _ctl_diag_read_buffer(void __user *arg, enum block_state state) | |||
1915 | mpi_request->VP_ID = 0; | 1918 | mpi_request->VP_ID = 0; |
1916 | 1919 | ||
1917 | mpt2sas_base_put_smid_default(ioc, smid); | 1920 | mpt2sas_base_put_smid_default(ioc, smid); |
1921 | init_completion(&ioc->ctl_cmds.done); | ||
1918 | timeleft = wait_for_completion_timeout(&ioc->ctl_cmds.done, | 1922 | timeleft = wait_for_completion_timeout(&ioc->ctl_cmds.done, |
1919 | MPT2_IOCTL_DEFAULT_TIMEOUT*HZ); | 1923 | MPT2_IOCTL_DEFAULT_TIMEOUT*HZ); |
1920 | 1924 | ||