diff options
author | Christoph Hellwig <hch@lst.de> | 2006-03-10 17:08:57 +0100 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-03-14 14:18:51 -0600 |
commit | e5b3a65fd7244e662691cf617145983ecde28cc9 (patch) | |
tree | dc46a5a1767897cc87ead1efcd6bcb9f9bf2524a /drivers/scsi/megaraid | |
parent | f33b5d783b4f56be5ace6a1c98fb5f76b2d2d07d (diff) |
[SCSI] megaraid_sas: fix extended timeout handling
Replace the eh_timed_out method usage with setting sdev->timeout in
slave_configure. Also only use the extended timeout for raid volumes,
physical devices shouldn't need it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/megaraid')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas.c | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c index 4f39dd01936..38ede24b22a 100644 --- a/drivers/scsi/megaraid/megaraid_sas.c +++ b/drivers/scsi/megaraid/megaraid_sas.c @@ -772,8 +772,6 @@ megasas_queue_command(struct scsi_cmnd *scmd, void (*done) (struct scsi_cmnd *)) goto out_return_cmd; cmd->scmd = scmd; - scmd->SCp.ptr = (char *)cmd; - scmd->SCp.sent_command = jiffies; /* * Issue the command to the FW @@ -804,6 +802,12 @@ static int megasas_slave_configure(struct scsi_device *sdev) */ if (sdev->channel < MEGASAS_MAX_PD_CHANNELS && sdev->type == TYPE_DISK) return -ENXIO; + + /* + * The RAID firmware may require extended timeouts. + */ + if (sdev->channel >= MEGASAS_MAX_PD_CHANNELS) + sdev->timeout = 90 * HZ; return 0; } @@ -875,23 +879,6 @@ static int megasas_generic_reset(struct scsi_cmnd *scmd) return ret_val; } -static enum scsi_eh_timer_return megasas_reset_timer(struct scsi_cmnd *scmd) -{ - unsigned long seconds; - - if (scmd->SCp.ptr) { - seconds = (jiffies - scmd->SCp.sent_command) / HZ; - - if (seconds < 90) { - return EH_RESET_TIMER; - } else { - return EH_NOT_HANDLED; - } - } - - return EH_HANDLED; -} - /** * megasas_reset_device - Device reset handler entry point */ @@ -962,7 +949,6 @@ static struct scsi_host_template megasas_template = { .eh_device_reset_handler = megasas_reset_device, .eh_bus_reset_handler = megasas_reset_bus_host, .eh_host_reset_handler = megasas_reset_bus_host, - .eh_timed_out = megasas_reset_timer, .use_clustering = ENABLE_CLUSTERING, }; |