diff options
Diffstat (limited to 'drivers/scsi/qla4xxx')
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_os.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index ec9da6ce8489..6841883b3611 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c | |||
@@ -66,6 +66,7 @@ static int qla4xxx_sess_get_param(struct iscsi_cls_session *sess, | |||
66 | static int qla4xxx_host_get_param(struct Scsi_Host *shost, | 66 | static int qla4xxx_host_get_param(struct Scsi_Host *shost, |
67 | enum iscsi_host_param param, char *buf); | 67 | enum iscsi_host_param param, char *buf); |
68 | static void qla4xxx_recovery_timedout(struct iscsi_cls_session *session); | 68 | static void qla4xxx_recovery_timedout(struct iscsi_cls_session *session); |
69 | static enum blk_eh_timer_return qla4xxx_eh_cmd_timed_out(struct scsi_cmnd *sc); | ||
69 | 70 | ||
70 | /* | 71 | /* |
71 | * SCSI host template entry points | 72 | * SCSI host template entry points |
@@ -89,6 +90,7 @@ static struct scsi_host_template qla4xxx_driver_template = { | |||
89 | .eh_device_reset_handler = qla4xxx_eh_device_reset, | 90 | .eh_device_reset_handler = qla4xxx_eh_device_reset, |
90 | .eh_target_reset_handler = qla4xxx_eh_target_reset, | 91 | .eh_target_reset_handler = qla4xxx_eh_target_reset, |
91 | .eh_host_reset_handler = qla4xxx_eh_host_reset, | 92 | .eh_host_reset_handler = qla4xxx_eh_host_reset, |
93 | .eh_timed_out = qla4xxx_eh_cmd_timed_out, | ||
92 | 94 | ||
93 | .slave_configure = qla4xxx_slave_configure, | 95 | .slave_configure = qla4xxx_slave_configure, |
94 | .slave_alloc = qla4xxx_slave_alloc, | 96 | .slave_alloc = qla4xxx_slave_alloc, |
@@ -124,6 +126,21 @@ static struct iscsi_transport qla4xxx_iscsi_transport = { | |||
124 | 126 | ||
125 | static struct scsi_transport_template *qla4xxx_scsi_transport; | 127 | static struct scsi_transport_template *qla4xxx_scsi_transport; |
126 | 128 | ||
129 | static enum blk_eh_timer_return qla4xxx_eh_cmd_timed_out(struct scsi_cmnd *sc) | ||
130 | { | ||
131 | struct iscsi_cls_session *session; | ||
132 | struct ddb_entry *ddb_entry; | ||
133 | |||
134 | session = starget_to_session(scsi_target(sc->device)); | ||
135 | ddb_entry = session->dd_data; | ||
136 | |||
137 | /* if we are not logged in then the LLD is going to clean up the cmd */ | ||
138 | if (atomic_read(&ddb_entry->state) != DDB_STATE_ONLINE) | ||
139 | return BLK_EH_RESET_TIMER; | ||
140 | else | ||
141 | return BLK_EH_NOT_HANDLED; | ||
142 | } | ||
143 | |||
127 | static void qla4xxx_recovery_timedout(struct iscsi_cls_session *session) | 144 | static void qla4xxx_recovery_timedout(struct iscsi_cls_session *session) |
128 | { | 145 | { |
129 | struct ddb_entry *ddb_entry = session->dd_data; | 146 | struct ddb_entry *ddb_entry = session->dd_data; |