From: <vikas.chaudhary@qlogic.com>
To: jbottomley@parallels.com, michaelc@cs.wisc.edu
Cc: linux-scsi@vger.kernel.org, vikas.chaudhary@qlogic.com,
lalit.chandivade@qlogic.com, ravi.anand@qlogic.com,
Nilesh Javali <nilesh.javali@qlogic.com>
Subject: [PATCH 2/5] qla4xxx: Limit the ACB Default Timeout value to 12s
Date: Fri, 16 Dec 2011 01:58:56 -0800 [thread overview]
Message-ID: <1324029539-26021-3-git-send-email-vikas.chaudhary@qlogic.com> (raw)
In-Reply-To: <1324029539-26021-1-git-send-email-vikas.chaudhary@qlogic.com>
From: Nilesh Javali <nilesh.javali@qlogic.com>
JIRA Key: UPSISCSI-205
Signed-off-by: Nilesh Javali <nilesh.javali@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
---
drivers/scsi/qla4xxx/ql4_os.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 3642f1f..1221349 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -1630,7 +1630,9 @@ void qla4xxx_update_session_conn_param(struct scsi_qla_host *ha,
/* Update timers after login */
ddb_entry->default_relogin_timeout =
- le16_to_cpu(fw_ddb_entry->def_timeout);
+ (le16_to_cpu(fw_ddb_entry->def_timeout) > LOGIN_TOV) &&
+ (le16_to_cpu(fw_ddb_entry->def_timeout) < LOGIN_TOV * 10) ?
+ le16_to_cpu(fw_ddb_entry->def_timeout) : LOGIN_TOV;
ddb_entry->default_time2wait =
le16_to_cpu(fw_ddb_entry->iscsi_def_time2wait);
@@ -3882,6 +3884,8 @@ static int qla4xxx_verify_boot_idx(struct scsi_qla_host *ha, uint16_t idx)
static void qla4xxx_setup_flash_ddb_entry(struct scsi_qla_host *ha,
struct ddb_entry *ddb_entry)
{
+ uint16_t def_timeout;
+
ddb_entry->ddb_type = FLASH_DDB;
ddb_entry->fw_ddb_index = INVALID_ENTRY;
ddb_entry->fw_ddb_device_state = DDB_DS_NO_CONNECTION_ACTIVE;
@@ -3892,9 +3896,10 @@ static void qla4xxx_setup_flash_ddb_entry(struct scsi_qla_host *ha,
atomic_set(&ddb_entry->retry_relogin_timer, INVALID_ENTRY);
atomic_set(&ddb_entry->relogin_timer, 0);
atomic_set(&ddb_entry->relogin_retry_count, 0);
-
+ def_timeout = le16_to_cpu(ddb_entry->fw_ddb_entry.def_timeout);
ddb_entry->default_relogin_timeout =
- le16_to_cpu(ddb_entry->fw_ddb_entry.def_timeout);
+ (def_timeout > LOGIN_TOV) && (def_timeout < LOGIN_TOV * 10) ?
+ def_timeout : LOGIN_TOV;
ddb_entry->default_time2wait =
le16_to_cpu(ddb_entry->fw_ddb_entry.iscsi_def_time2wait);
}
@@ -4228,7 +4233,10 @@ void qla4xxx_build_ddb_list(struct scsi_qla_host *ha, int is_reset)
}
/* Wait to ensure all sendtargets are done for min 12 sec wait */
- tmo = ((ha->def_timeout < LOGIN_TOV) ? LOGIN_TOV : ha->def_timeout);
+ tmo = ((ha->def_timeout > LOGIN_TOV) &&
+ (ha->def_timeout < LOGIN_TOV * 10) ?
+ ha->def_timeout : LOGIN_TOV);
+
DEBUG2(ql4_printk(KERN_INFO, ha,
"Default time to wait for build ddb %d\n", tmo));
--
1.7.1
next prev parent reply other threads:[~2011-12-16 10:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-16 9:58 [PATCH 0/5] qla4xxx: Patches for scsi-misc vikas.chaudhary
2011-12-16 9:58 ` [PATCH 1/5] qla4xxx: cleanup, make qla4xxx_build_ddb_list short vikas.chaudhary
2011-12-16 9:58 ` vikas.chaudhary [this message]
2011-12-16 21:18 ` [PATCH 2/5] qla4xxx: Limit the ACB Default Timeout value to 12s James Bottomley
2011-12-19 5:51 ` Vikas Chaudhary
2011-12-16 9:58 ` [PATCH 3/5] qla4xxx: Break the loop if the sendtargets list was empty vikas.chaudhary
2011-12-16 9:58 ` [PATCH 4/5] qla4xxx: Fixed BFS with sendtargets as boot index vikas.chaudhary
2011-12-16 9:58 ` [PATCH 5/5] qla4xxx: Update driver version to 5.02.00-k11 vikas.chaudhary
2011-12-16 21:14 ` [PATCH 0/5] qla4xxx: Patches for scsi-misc Mike Christie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1324029539-26021-3-git-send-email-vikas.chaudhary@qlogic.com \
--to=vikas.chaudhary@qlogic.com \
--cc=jbottomley@parallels.com \
--cc=lalit.chandivade@qlogic.com \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
--cc=nilesh.javali@qlogic.com \
--cc=ravi.anand@qlogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).