diff options
author | Kashyap, Desai <kashyap.desai@lsi.com> | 2009-09-14 01:35:24 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-10-02 10:48:50 -0400 |
commit | bcfb6e6ea46d84bfb541069545e5b0d7f6cc3233 (patch) | |
tree | c6ddcd28cc123bf2c1abcb6b79b0c49a3521e1bd /drivers/scsi/mpt2sas/mpt2sas_transport.c | |
parent | 77e63ed44305e89c0564f8292f9cd5764d4fddfb (diff) |
[SCSI] mpt2sas: Call init_completion on a per request basis.
Now driver call init_completion on a per request basis. At some
point the wait_for_completion_timeout is not waiting for the timeout,
instead returning immediately, thus going into diag reset. This fix will
address all request using the wait_for_completion_timeout API. The previous
implimentation was only calling init_completion at driver
load time.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/mpt2sas/mpt2sas_transport.c')
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_transport.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_transport.c b/drivers/scsi/mpt2sas/mpt2sas_transport.c index 8bc57e315ce8..eb98188c7f3f 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_transport.c +++ b/drivers/scsi/mpt2sas/mpt2sas_transport.c | |||
@@ -401,6 +401,7 @@ _transport_expander_report_manufacture(struct MPT2SAS_ADAPTER *ioc, | |||
401 | "send to sas_addr(0x%016llx)\n", ioc->name, | 401 | "send to sas_addr(0x%016llx)\n", ioc->name, |
402 | (unsigned long long)sas_address)); | 402 | (unsigned long long)sas_address)); |
403 | mpt2sas_base_put_smid_default(ioc, smid); | 403 | mpt2sas_base_put_smid_default(ioc, smid); |
404 | init_completion(&ioc->transport_cmds.done); | ||
404 | timeleft = wait_for_completion_timeout(&ioc->transport_cmds.done, | 405 | timeleft = wait_for_completion_timeout(&ioc->transport_cmds.done, |
405 | 10*HZ); | 406 | 10*HZ); |
406 | 407 | ||
@@ -1154,6 +1155,7 @@ _transport_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy, | |||
1154 | "sending smp request\n", ioc->name, __func__)); | 1155 | "sending smp request\n", ioc->name, __func__)); |
1155 | 1156 | ||
1156 | mpt2sas_base_put_smid_default(ioc, smid); | 1157 | mpt2sas_base_put_smid_default(ioc, smid); |
1158 | init_completion(&ioc->transport_cmds.done); | ||
1157 | timeleft = wait_for_completion_timeout(&ioc->transport_cmds.done, | 1159 | timeleft = wait_for_completion_timeout(&ioc->transport_cmds.done, |
1158 | 10*HZ); | 1160 | 10*HZ); |
1159 | 1161 | ||