summaryrefslogtreecommitdiff
path: root/drivers/scsi/mpt2sas/mpt2sas_transport.c
diff options
context:
space:
mode:
authorKashyap, Desai <kashyap.desai@lsi.com>2009-09-14 09:35:24 +0400
committerJames Bottomley <James.Bottomley@suse.de>2009-10-02 18:48:50 +0400
commitbcfb6e6ea46d84bfb541069545e5b0d7f6cc3233 (patch)
treec6ddcd28cc123bf2c1abcb6b79b0c49a3521e1bd /drivers/scsi/mpt2sas/mpt2sas_transport.c
parent77e63ed44305e89c0564f8292f9cd5764d4fddfb (diff)
downloadlinux-bcfb6e6ea46d84bfb541069545e5b0d7f6cc3233.tar.xz
[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.c2
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,
"send to sas_addr(0x%016llx)\n", ioc->name,
(unsigned long long)sas_address));
mpt2sas_base_put_smid_default(ioc, smid);
+ init_completion(&ioc->transport_cmds.done);
timeleft = wait_for_completion_timeout(&ioc->transport_cmds.done,
10*HZ);
@@ -1154,6 +1155,7 @@ _transport_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy,
"sending smp request\n", ioc->name, __func__));
mpt2sas_base_put_smid_default(ioc, smid);
+ init_completion(&ioc->transport_cmds.done);
timeleft = wait_for_completion_timeout(&ioc->transport_cmds.done,
10*HZ);