diff options
author | Kashyap, Desai <kashyap.desai@lsi.com> | 2009-08-07 19:37:14 +0530 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-08-13 16:30:03 -0500 |
commit | 6bd4e1e4d6023f4da069fd68729c502cc4e6dfd0 (patch) | |
tree | 8d72a054d45f1a779b0b7cf0f7d332646c6842a4 /drivers/scsi/mpt2sas | |
parent | be9e8cd75ce8d94ae4aab721fdcc337fa78a9090 (diff) | |
download | blackbird-obmc-linux-6bd4e1e4d6023f4da069fd68729c502cc4e6dfd0.tar.gz blackbird-obmc-linux-6bd4e1e4d6023f4da069fd68729c502cc4e6dfd0.zip |
[SCSI] mpt2sas: fix infinite loop inside config request
This restriction is introduced just to avoid loop of
config_request. Retry must be limited so we have restricted
config request to maximum 2 times.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/mpt2sas')
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_config.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_config.c b/drivers/scsi/mpt2sas/mpt2sas_config.c index 58cfb97846f7..1c6658c60239 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_config.c +++ b/drivers/scsi/mpt2sas/mpt2sas_config.c @@ -247,6 +247,12 @@ _config_request(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigRequest_t retry_count = 0; retry_config: + if (retry_count) { + if (retry_count > 2) /* attempt only 2 retries */ + return -EFAULT; + printk(MPT2SAS_INFO_FMT "%s: attempting retry (%d)\n", + ioc->name, __func__, retry_count); + } wait_state_count = 0; ioc_state = mpt2sas_base_get_iocstate(ioc, 1); while (ioc_state != MPI2_IOC_STATE_OPERATIONAL) { |