提交 3013cea8 编写于 作者: V Vikas Chaudhary 提交者: James Bottomley

[SCSI] qla4xxx: set correct value in sess->recovery_tmo

Signed-off-by: NVikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: NRavi Anand <ravi.anand@qlogic.com>
Reviewed-by: NMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
上级 be948fc3
...@@ -137,6 +137,9 @@ ...@@ -137,6 +137,9 @@
#define ISCSI_ALIAS_SIZE 32 /* ISCSI Alias name size */ #define ISCSI_ALIAS_SIZE 32 /* ISCSI Alias name size */
#define ISCSI_NAME_SIZE 0xE0 /* ISCSI Name size */ #define ISCSI_NAME_SIZE 0xE0 /* ISCSI Name size */
#define QL4_SESS_RECOVERY_TMO 30 /* iSCSI session */
/* recovery timeout */
#define LSDW(x) ((u32)((u64)(x))) #define LSDW(x) ((u32)((u64)(x)))
#define MSDW(x) ((u32)((((u64)(x)) >> 16) >> 16)) #define MSDW(x) ((u32)((((u64)(x)) >> 16) >> 16))
...@@ -249,7 +252,6 @@ struct ddb_entry { ...@@ -249,7 +252,6 @@ struct ddb_entry {
uint32_t default_time2wait; /* Default Min time between uint32_t default_time2wait; /* Default Min time between
* relogins (+aens) */ * relogins (+aens) */
atomic_t port_down_timer; /* Device connection timer */
atomic_t retry_relogin_timer; /* Min Time between relogins atomic_t retry_relogin_timer; /* Min Time between relogins
* (4000 only) */ * (4000 only) */
atomic_t relogin_timer; /* Max Time to wait for relogin to complete */ atomic_t relogin_timer; /* Max Time to wait for relogin to complete */
...@@ -474,7 +476,6 @@ struct scsi_qla_host { ...@@ -474,7 +476,6 @@ struct scsi_qla_host {
uint32_t timer_active; uint32_t timer_active;
/* Recovery Timers */ /* Recovery Timers */
uint32_t port_down_retry_count;
uint32_t discovery_wait; uint32_t discovery_wait;
atomic_t check_relogin_timeouts; atomic_t check_relogin_timeouts;
uint32_t retry_reset_ha_cnt; uint32_t retry_reset_ha_cnt;
......
...@@ -669,7 +669,6 @@ static struct ddb_entry * qla4xxx_alloc_ddb(struct scsi_qla_host *ha, ...@@ -669,7 +669,6 @@ static struct ddb_entry * qla4xxx_alloc_ddb(struct scsi_qla_host *ha,
} }
ddb_entry->fw_ddb_index = fw_ddb_index; ddb_entry->fw_ddb_index = fw_ddb_index;
atomic_set(&ddb_entry->port_down_timer, ha->port_down_retry_count);
atomic_set(&ddb_entry->retry_relogin_timer, INVALID_ENTRY); atomic_set(&ddb_entry->retry_relogin_timer, INVALID_ENTRY);
atomic_set(&ddb_entry->relogin_timer, 0); atomic_set(&ddb_entry->relogin_timer, 0);
atomic_set(&ddb_entry->relogin_retry_count, 0); atomic_set(&ddb_entry->relogin_retry_count, 0);
...@@ -1556,8 +1555,6 @@ int qla4xxx_process_ddb_changed(struct scsi_qla_host *ha, uint32_t fw_ddb_index, ...@@ -1556,8 +1555,6 @@ int qla4xxx_process_ddb_changed(struct scsi_qla_host *ha, uint32_t fw_ddb_index,
/* Device is back online. */ /* Device is back online. */
if (ddb_entry->fw_ddb_device_state == DDB_DS_SESSION_ACTIVE) { if (ddb_entry->fw_ddb_device_state == DDB_DS_SESSION_ACTIVE) {
atomic_set(&ddb_entry->state, DDB_STATE_ONLINE); atomic_set(&ddb_entry->state, DDB_STATE_ONLINE);
atomic_set(&ddb_entry->port_down_timer,
ha->port_down_retry_count);
atomic_set(&ddb_entry->relogin_retry_count, 0); atomic_set(&ddb_entry->relogin_retry_count, 0);
atomic_set(&ddb_entry->relogin_timer, 0); atomic_set(&ddb_entry->relogin_timer, 0);
clear_bit(DF_RELOGIN, &ddb_entry->flags); clear_bit(DF_RELOGIN, &ddb_entry->flags);
......
...@@ -361,7 +361,6 @@ qla4xxx_update_local_ifcb(struct scsi_qla_host *ha, ...@@ -361,7 +361,6 @@ qla4xxx_update_local_ifcb(struct scsi_qla_host *ha,
min(sizeof(ha->alias), sizeof(init_fw_cb->Alias)));*/ min(sizeof(ha->alias), sizeof(init_fw_cb->Alias)));*/
/* Save Command Line Paramater info */ /* Save Command Line Paramater info */
ha->port_down_retry_count = le16_to_cpu(init_fw_cb->conn_ka_timeout);
ha->discovery_wait = ql4xdiscoverywait; ha->discovery_wait = ql4xdiscoverywait;
if (ha->acb_version == ACB_SUPPORTED) { if (ha->acb_version == ACB_SUPPORTED) {
......
...@@ -163,10 +163,10 @@ static void qla4xxx_recovery_timedout(struct iscsi_cls_session *session) ...@@ -163,10 +163,10 @@ static void qla4xxx_recovery_timedout(struct iscsi_cls_session *session)
if (atomic_read(&ddb_entry->state) != DDB_STATE_ONLINE) { if (atomic_read(&ddb_entry->state) != DDB_STATE_ONLINE) {
atomic_set(&ddb_entry->state, DDB_STATE_DEAD); atomic_set(&ddb_entry->state, DDB_STATE_DEAD);
DEBUG2(printk("scsi%ld: %s: ddb [%d] port down retry count " DEBUG2(printk("scsi%ld: %s: ddb [%d] session recovery timeout "
"of (%d) secs exhausted, marking device DEAD.\n", "of (%d) secs exhausted, marking device DEAD.\n",
ha->host_no, __func__, ddb_entry->fw_ddb_index, ha->host_no, __func__, ddb_entry->fw_ddb_index,
ha->port_down_retry_count)); QL4_SESS_RECOVERY_TMO));
qla4xxx_wake_dpc(ha); qla4xxx_wake_dpc(ha);
} }
...@@ -298,7 +298,8 @@ int qla4xxx_add_sess(struct ddb_entry *ddb_entry) ...@@ -298,7 +298,8 @@ int qla4xxx_add_sess(struct ddb_entry *ddb_entry)
{ {
int err; int err;
ddb_entry->sess->recovery_tmo = ddb_entry->ha->port_down_retry_count; ddb_entry->sess->recovery_tmo = QL4_SESS_RECOVERY_TMO;
err = iscsi_add_session(ddb_entry->sess, ddb_entry->fw_ddb_index); err = iscsi_add_session(ddb_entry->sess, ddb_entry->fw_ddb_index);
if (err) { if (err) {
DEBUG2(printk(KERN_ERR "Could not add session.\n")); DEBUG2(printk(KERN_ERR "Could not add session.\n"));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册