aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/megaraid')
-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;