diff options
author | Sreekanth Reddy <sreekanth.reddy@avagotech.com> | 2015-01-12 01:08:57 -0500 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2015-01-13 10:27:24 -0500 |
commit | ddb588bebeab4606c8b14f952bfd16f2f8864dda (patch) | |
tree | 2eec211cfea408ec52b83cad595219da214a209a /drivers/scsi/mpt2sas/mpt2sas_scsih.c | |
parent | 2d8ce8c9d4b25b88eb4aa6bc52492eb7e0ae1dab (diff) |
mpt2sas, mpt3sas: Fail the host reset initiated due to discovery related I/O timeouts at driver load time
When a flaky disk is there in a topology then during driver load,
discovery related I/O times out; which results in SCSI error recovery
initiating host reset and then the controller won't see any disk.
In this patch, The driver would return FAILED status to the host reset
initiated due to discovery related I/O timeout if ioc->is_driver_loading
is set. This flag would be set until we exit out of scsih_scan_finished().
i.e.
During device discovery if one of the disk is flaky
(which responds to some discovery commands and doesn't respond to some)
the driver wouldn't perform host reset for discovery related I/O timeout.
Instead it would return Failure for the host reset resulting in the
flaky disk getting removed by the SCSI Mid layer,
so other disks would be added correctly.
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/mpt2sas/mpt2sas_scsih.c')
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_scsih.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c index 7000815277b1..a3140ed3cfe6 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c | |||
@@ -2729,9 +2729,18 @@ _scsih_host_reset(struct scsi_cmnd *scmd) | |||
2729 | ioc->name, scmd); | 2729 | ioc->name, scmd); |
2730 | scsi_print_command(scmd); | 2730 | scsi_print_command(scmd); |
2731 | 2731 | ||
2732 | if (ioc->is_driver_loading) { | ||
2733 | printk(MPT2SAS_INFO_FMT "Blocking the host reset\n", | ||
2734 | ioc->name); | ||
2735 | r = FAILED; | ||
2736 | goto out; | ||
2737 | } | ||
2738 | |||
2732 | retval = mpt2sas_base_hard_reset_handler(ioc, CAN_SLEEP, | 2739 | retval = mpt2sas_base_hard_reset_handler(ioc, CAN_SLEEP, |
2733 | FORCE_BIG_HAMMER); | 2740 | FORCE_BIG_HAMMER); |
2734 | r = (retval < 0) ? FAILED : SUCCESS; | 2741 | r = (retval < 0) ? FAILED : SUCCESS; |
2742 | |||
2743 | out: | ||
2735 | printk(MPT2SAS_INFO_FMT "host reset: %s scmd(%p)\n", | 2744 | printk(MPT2SAS_INFO_FMT "host reset: %s scmd(%p)\n", |
2736 | ioc->name, ((r == SUCCESS) ? "SUCCESS" : "FAILED"), scmd); | 2745 | ioc->name, ((r == SUCCESS) ? "SUCCESS" : "FAILED"), scmd); |
2737 | 2746 | ||