[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>hifive-unleashed-5.1
parent
c5daa6a919
commit
c007b8b2ec
|
@ -76,6 +76,11 @@ module_param(throttlequeuedepth, int, S_IRUGO);
|
||||||
MODULE_PARM_DESC(throttlequeuedepth,
|
MODULE_PARM_DESC(throttlequeuedepth,
|
||||||
"Adapter queue depth when throttled due to I/O timeout. Default: 16");
|
"Adapter queue depth when throttled due to I/O timeout. Default: 16");
|
||||||
|
|
||||||
|
int resetwaittime = MEGASAS_RESET_WAIT_TIME;
|
||||||
|
module_param(resetwaittime, int, S_IRUGO);
|
||||||
|
MODULE_PARM_DESC(resetwaittime, "Wait time in seconds after I/O timeout "
|
||||||
|
"before resetting adapter. Default: 180");
|
||||||
|
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
MODULE_VERSION(MEGASAS_VERSION);
|
MODULE_VERSION(MEGASAS_VERSION);
|
||||||
MODULE_AUTHOR("megaraidlinux@lsi.com");
|
MODULE_AUTHOR("megaraidlinux@lsi.com");
|
||||||
|
@ -1778,7 +1783,7 @@ static int megasas_wait_for_outstanding(struct megasas_instance *instance)
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < wait_time; i++) {
|
for (i = 0; i < resetwaittime; i++) {
|
||||||
|
|
||||||
int outstanding = atomic_read(&instance->fw_outstanding);
|
int outstanding = atomic_read(&instance->fw_outstanding);
|
||||||
|
|
||||||
|
|
|
@ -94,6 +94,7 @@ int megasas_transition_to_ready(struct megasas_instance *instance, int ocr);
|
||||||
void megaraid_sas_kill_hba(struct megasas_instance *instance);
|
void megaraid_sas_kill_hba(struct megasas_instance *instance);
|
||||||
|
|
||||||
extern u32 megasas_dbg_lvl;
|
extern u32 megasas_dbg_lvl;
|
||||||
|
extern int resetwaittime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* megasas_enable_intr_fusion - Enables interrupts
|
* megasas_enable_intr_fusion - Enables interrupts
|
||||||
|
@ -2063,9 +2064,9 @@ megasas_check_reset_fusion(struct megasas_instance *instance,
|
||||||
int megasas_wait_for_outstanding_fusion(struct megasas_instance *instance)
|
int megasas_wait_for_outstanding_fusion(struct megasas_instance *instance)
|
||||||
{
|
{
|
||||||
int i, outstanding, retval = 0;
|
int i, outstanding, retval = 0;
|
||||||
u32 fw_state, wait_time = MEGASAS_RESET_WAIT_TIME;
|
u32 fw_state;
|
||||||
|
|
||||||
for (i = 0; i < wait_time; i++) {
|
for (i = 0; i < resetwaittime; i++) {
|
||||||
/* Check if firmware is in fault state */
|
/* Check if firmware is in fault state */
|
||||||
fw_state = instance->instancet->read_fw_status_reg(
|
fw_state = instance->instancet->read_fw_status_reg(
|
||||||
instance->reg_set) & MFI_STATE_MASK;
|
instance->reg_set) & MFI_STATE_MASK;
|
||||||
|
|
Loading…
Reference in New Issue