diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2013-05-10 10:36:04 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-06-04 11:16:24 -0700 |
commit | 0816c9251a7180383bb7811e1a1545f7b78e5374 (patch) | |
tree | 1dffcde9c45f276b264c83511b6168baab4307a4 /drivers/scsi/scsi_error.c | |
parent | 0761df9c4b2d966da3af2ac4ee7372afa681ce63 (diff) | |
download | blackbird-op-linux-0816c9251a7180383bb7811e1a1545f7b78e5374.tar.gz blackbird-op-linux-0816c9251a7180383bb7811e1a1545f7b78e5374.zip |
[SCSI] Allow error handling timeout to be specified
Introduce eh_timeout which can be used for error handling purposes. This
was previously hardcoded to 10 seconds in the SCSI error handling
code. However, for some fast-fail scenarios it is necessary to be able
to tune this as it can take several iterations (bus device, target, bus,
controller) before we give up.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/scsi_error.c')
-rw-r--r-- | drivers/scsi/scsi_error.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index f43de1e56420..562474499942 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -45,8 +45,6 @@ static void scsi_eh_done(struct scsi_cmnd *scmd); -#define SENSE_TIMEOUT (10*HZ) - /* * These should *probably* be handled by the host itself. * Since it is allowed to sleep, it probably should. @@ -881,7 +879,7 @@ retry: */ static int scsi_request_sense(struct scsi_cmnd *scmd) { - return scsi_send_eh_cmnd(scmd, NULL, 0, SENSE_TIMEOUT, ~0); + return scsi_send_eh_cmnd(scmd, NULL, 0, scmd->device->eh_timeout, ~0); } /** @@ -982,7 +980,8 @@ static int scsi_eh_tur(struct scsi_cmnd *scmd) int retry_cnt = 1, rtn; retry_tur: - rtn = scsi_send_eh_cmnd(scmd, tur_command, 6, SENSE_TIMEOUT, 0); + rtn = scsi_send_eh_cmnd(scmd, tur_command, 6, + scmd->device->eh_timeout, 0); SCSI_LOG_ERROR_RECOVERY(3, printk("%s: scmd %p rtn %x\n", __func__, scmd, rtn)); |