aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradam radford <aradford@gmail.com>2012-07-17 21:20:24 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-08-24 05:10:29 -0400
commitc007b8b2ec3f0ad1256e4a31b07138c04e5bcde3 (patch)
treeb2676ca7373dee5aec25dd96212dc799d51a4031
parentc5daa6a91984a296446b33d6e13ff802af9dc352 (diff)
[SCSI] megaraid_sas: Add resetwaittime module parameter
This allows a user to adjust the wait time in seconds after I/O timeout before resetting the adapter. Signed-off-by: Adam Radford <aradford@gmail.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_base.c7
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_fusion.c5
2 files changed, 9 insertions, 3 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index f8f0a165dfb6..2ee7052ac6bb 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -76,6 +76,11 @@ module_param(throttlequeuedepth, int, S_IRUGO);
76MODULE_PARM_DESC(throttlequeuedepth, 76MODULE_PARM_DESC(throttlequeuedepth,
77 "Adapter queue depth when throttled due to I/O timeout. Default: 16"); 77 "Adapter queue depth when throttled due to I/O timeout. Default: 16");
78 78
79int resetwaittime = MEGASAS_RESET_WAIT_TIME;
80module_param(resetwaittime, int, S_IRUGO);
81MODULE_PARM_DESC(resetwaittime, "Wait time in seconds after I/O timeout "
82 "before resetting adapter. Default: 180");
83
79MODULE_LICENSE("GPL"); 84MODULE_LICENSE("GPL");
80MODULE_VERSION(MEGASAS_VERSION); 85MODULE_VERSION(MEGASAS_VERSION);
81MODULE_AUTHOR("megaraidlinux@lsi.com"); 86MODULE_AUTHOR("megaraidlinux@lsi.com");
@@ -1778,7 +1783,7 @@ static int megasas_wait_for_outstanding(struct megasas_instance *instance)
1778 return SUCCESS; 1783 return SUCCESS;
1779 } 1784 }
1780 1785
1781 for (i = 0; i < wait_time; i++) { 1786 for (i = 0; i < resetwaittime; i++) {
1782 1787
1783 int outstanding = atomic_read(&instance->fw_outstanding); 1788 int outstanding = atomic_read(&instance->fw_outstanding);
1784 1789
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index a610cf1d4847..788115b72b22 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -94,6 +94,7 @@ int megasas_transition_to_ready(struct megasas_instance *instance, int ocr);
94void megaraid_sas_kill_hba(struct megasas_instance *instance); 94void megaraid_sas_kill_hba(struct megasas_instance *instance);
95 95
96extern u32 megasas_dbg_lvl; 96extern u32 megasas_dbg_lvl;
97extern int resetwaittime;
97 98
98/** 99/**
99 * megasas_enable_intr_fusion - Enables interrupts 100 * megasas_enable_intr_fusion - Enables interrupts
@@ -2063,9 +2064,9 @@ megasas_check_reset_fusion(struct megasas_instance *instance,
2063int megasas_wait_for_outstanding_fusion(struct megasas_instance *instance) 2064int megasas_wait_for_outstanding_fusion(struct megasas_instance *instance)
2064{ 2065{
2065 int i, outstanding, retval = 0; 2066 int i, outstanding, retval = 0;
2066 u32 fw_state, wait_time = MEGASAS_RESET_WAIT_TIME; 2067 u32 fw_state;
2067 2068
2068 for (i = 0; i < wait_time; i++) { 2069 for (i = 0; i < resetwaittime; i++) {
2069 /* Check if firmware is in fault state */ 2070 /* Check if firmware is in fault state */
2070 fw_state = instance->instancet->read_fw_status_reg( 2071 fw_state = instance->instancet->read_fw_status_reg(
2071 instance->reg_set) & MFI_STATE_MASK; 2072 instance->reg_set) & MFI_STATE_MASK;