aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid/megaraid_sas.h
diff options
context:
space:
mode:
authorSumant Patro <sumant.patro@lsi.com>2007-05-17 08:47:51 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-05-24 10:08:27 -0400
commit05e9ebbefb379a4da782b21b8427c88ac28a2334 (patch)
treeeffaeaafd39a849d6a4a303bde6f60714c1a72c9 /drivers/scsi/megaraid/megaraid_sas.h
parent3d9780b97667fcd63159c0933fdce75465da6c70 (diff)
[SCSI] megaraid_sas: intercept cmd timeout and throttle io
eh_timed_out call back (megasas_reset_timer) is used to throttle io to the adapter when it is called the first time for a scmd. The MEGASAS_FW_BUSY flag is set and can_queue reduced to 16. The can_queue is restored from completion routine in following two conditions : 5 seconds has elapsed and the # of outstanding cmds in FW is < 17. Signed-off-by: Sumant Patro <sumant.patro@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_sas.h')
-rw-r--r--drivers/scsi/megaraid/megaraid_sas.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
index e862992ee377..4dffc918a414 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
@@ -18,9 +18,9 @@
18/* 18/*
19 * MegaRAID SAS Driver meta data 19 * MegaRAID SAS Driver meta data
20 */ 20 */
21#define MEGASAS_VERSION "00.00.03.10-rc1" 21#define MEGASAS_VERSION "00.00.03.10-rc5"
22#define MEGASAS_RELDATE "Feb 14, 2007" 22#define MEGASAS_RELDATE "May 17, 2007"
23#define MEGASAS_EXT_VERSION "Wed Feb 14 10:14:25 PST 2007" 23#define MEGASAS_EXT_VERSION "Thu May 17 10:09:32 PDT 2007"
24 24
25/* 25/*
26 * Device IDs 26 * Device IDs
@@ -539,6 +539,8 @@ struct megasas_ctrl_info {
539 539
540#define MEGASAS_DBG_LVL 1 540#define MEGASAS_DBG_LVL 1
541 541
542#define MEGASAS_FW_BUSY 1
543
542/* 544/*
543 * When SCSI mid-layer calls driver's reset routine, driver waits for 545 * When SCSI mid-layer calls driver's reset routine, driver waits for
544 * MEGASAS_RESET_WAIT_TIME seconds for all outstanding IO to complete. Note 546 * MEGASAS_RESET_WAIT_TIME seconds for all outstanding IO to complete. Note
@@ -549,8 +551,8 @@ struct megasas_ctrl_info {
549#define MEGASAS_RESET_WAIT_TIME 180 551#define MEGASAS_RESET_WAIT_TIME 180
550#define MEGASAS_INTERNAL_CMD_WAIT_TIME 180 552#define MEGASAS_INTERNAL_CMD_WAIT_TIME 180
551#define MEGASAS_RESET_NOTICE_INTERVAL 5 553#define MEGASAS_RESET_NOTICE_INTERVAL 5
552
553#define MEGASAS_IOCTL_CMD 0 554#define MEGASAS_IOCTL_CMD 0
555#define MEGASAS_DEFAULT_CMD_TIMEOUT 90
554 556
555/* 557/*
556 * FW reports the maximum of number of commands that it can accept (maximum 558 * FW reports the maximum of number of commands that it can accept (maximum
@@ -1073,7 +1075,6 @@ struct megasas_instance {
1073 struct megasas_register_set __iomem *reg_set; 1075 struct megasas_register_set __iomem *reg_set;
1074 1076
1075 s8 init_id; 1077 s8 init_id;
1076 u8 reserved[3];
1077 1078
1078 u16 max_num_sge; 1079 u16 max_num_sge;
1079 u16 max_fw_cmds; 1080 u16 max_fw_cmds;
@@ -1104,6 +1105,9 @@ struct megasas_instance {
1104 1105
1105 struct megasas_instance_template *instancet; 1106 struct megasas_instance_template *instancet;
1106 struct tasklet_struct isr_tasklet; 1107 struct tasklet_struct isr_tasklet;
1108
1109 u8 flag;
1110 unsigned long last_time;
1107}; 1111};
1108 1112
1109#define MEGASAS_IS_LOGICAL(scp) \ 1113#define MEGASAS_IS_LOGICAL(scp) \