aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2006-03-10 11:08:57 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-03-14 15:18:51 -0500
commite5b3a65fd7244e662691cf617145983ecde28cc9 (patch)
treedc46a5a1767897cc87ead1efcd6bcb9f9bf2524a /drivers/scsi/megaraid
parentf33b5d783b4f56be5ace6a1c98fb5f76b2d2d07d (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.c26
1 files changed, 6 insertions, 20 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c
index 4f39dd01936d..38ede24b22a6 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 *))
772 goto out_return_cmd; 772 goto out_return_cmd;
773 773
774 cmd->scmd = scmd; 774 cmd->scmd = scmd;
775 scmd->SCp.ptr = (char *)cmd;
776 scmd->SCp.sent_command = jiffies;
777 775
778 /* 776 /*
779 * Issue the command to the FW 777 * Issue the command to the FW
@@ -804,6 +802,12 @@ static int megasas_slave_configure(struct scsi_device *sdev)
804 */ 802 */
805 if (sdev->channel < MEGASAS_MAX_PD_CHANNELS && sdev->type == TYPE_DISK) 803 if (sdev->channel < MEGASAS_MAX_PD_CHANNELS && sdev->type == TYPE_DISK)
806 return -ENXIO; 804 return -ENXIO;
805
806 /*
807 * The RAID firmware may require extended timeouts.
808 */
809 if (sdev->channel >= MEGASAS_MAX_PD_CHANNELS)
810 sdev->timeout = 90 * HZ;
807 return 0; 811 return 0;
808} 812}
809 813
@@ -875,23 +879,6 @@ static int megasas_generic_reset(struct scsi_cmnd *scmd)
875 return ret_val; 879 return ret_val;
876} 880}
877 881
878static enum scsi_eh_timer_return megasas_reset_timer(struct scsi_cmnd *scmd)
879{
880 unsigned long seconds;
881
882 if (scmd->SCp.ptr) {
883 seconds = (jiffies - scmd->SCp.sent_command) / HZ;
884
885 if (seconds < 90) {
886 return EH_RESET_TIMER;
887 } else {
888 return EH_NOT_HANDLED;
889 }
890 }
891
892 return EH_HANDLED;
893}
894
895/** 882/**
896 * megasas_reset_device - Device reset handler entry point 883 * megasas_reset_device - Device reset handler entry point
897 */ 884 */
@@ -962,7 +949,6 @@ static struct scsi_host_template megasas_template = {
962 .eh_device_reset_handler = megasas_reset_device, 949 .eh_device_reset_handler = megasas_reset_device,
963 .eh_bus_reset_handler = megasas_reset_bus_host, 950 .eh_bus_reset_handler = megasas_reset_bus_host,
964 .eh_host_reset_handler = megasas_reset_bus_host, 951 .eh_host_reset_handler = megasas_reset_bus_host,
965 .eh_timed_out = megasas_reset_timer,
966 .use_clustering = ENABLE_CLUSTERING, 952 .use_clustering = ENABLE_CLUSTERING,
967}; 953};
968 954