diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2008-08-14 00:36:57 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-08-16 11:22:01 -0400 |
commit | a7a28504bfa61dc6caa495f55c52623d10b42b32 (patch) | |
tree | 7295c3f44c09ef7e86253b8baf458ec991e73c41 /drivers | |
parent | 6390d1f33faecf48e31f27dd7dbe928540f8acfc (diff) |
[SCSI] qla2xxx: Correct vport-state management issues during ISP-ABORT.
* Use correct 'ha' to mark a device lost from ISR.
I/Os will always be returned on the physical-HA.
qla2x00_mark_device_lost() should be called with the HA bound
to the fcport.
* Mark *all* devices lost during ISP-ABORT (bighammer).
These fixes correct issues discovered locally where during
link-perturbation and heavy vport-I/O fcport/rport states would
stray and an rport's scsi-target lost (timed-out).
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 3 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_isr.c | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 601a6b29750c..e1de7a696bf7 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -3251,6 +3251,7 @@ qla2x00_abort_isp(scsi_qla_host_t *ha) | |||
3251 | { | 3251 | { |
3252 | int rval; | 3252 | int rval; |
3253 | uint8_t status = 0; | 3253 | uint8_t status = 0; |
3254 | scsi_qla_host_t *vha; | ||
3254 | 3255 | ||
3255 | if (ha->flags.online) { | 3256 | if (ha->flags.online) { |
3256 | ha->flags.online = 0; | 3257 | ha->flags.online = 0; |
@@ -3265,6 +3266,8 @@ qla2x00_abort_isp(scsi_qla_host_t *ha) | |||
3265 | if (atomic_read(&ha->loop_state) != LOOP_DOWN) { | 3266 | if (atomic_read(&ha->loop_state) != LOOP_DOWN) { |
3266 | atomic_set(&ha->loop_state, LOOP_DOWN); | 3267 | atomic_set(&ha->loop_state, LOOP_DOWN); |
3267 | qla2x00_mark_all_devices_lost(ha, 0); | 3268 | qla2x00_mark_all_devices_lost(ha, 0); |
3269 | list_for_each_entry(vha, &ha->vp_list, vp_list) | ||
3270 | qla2x00_mark_all_devices_lost(vha, 0); | ||
3268 | } else { | 3271 | } else { |
3269 | if (!atomic_read(&ha->loop_down_timer)) | 3272 | if (!atomic_read(&ha->loop_down_timer)) |
3270 | atomic_set(&ha->loop_down_timer, | 3273 | atomic_set(&ha->loop_down_timer, |
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 874d802edb7d..d6a1a6627b51 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c | |||
@@ -1184,9 +1184,8 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) | |||
1184 | atomic_read(&fcport->state))); | 1184 | atomic_read(&fcport->state))); |
1185 | 1185 | ||
1186 | cp->result = DID_BUS_BUSY << 16; | 1186 | cp->result = DID_BUS_BUSY << 16; |
1187 | if (atomic_read(&fcport->state) == FCS_ONLINE) { | 1187 | if (atomic_read(&fcport->state) == FCS_ONLINE) |
1188 | qla2x00_mark_device_lost(ha, fcport, 1, 1); | 1188 | qla2x00_mark_device_lost(fcport->ha, fcport, 1, 1); |
1189 | } | ||
1190 | break; | 1189 | break; |
1191 | 1190 | ||
1192 | case CS_RESET: | 1191 | case CS_RESET: |
@@ -1229,7 +1228,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) | |||
1229 | 1228 | ||
1230 | /* Check to see if logout occurred. */ | 1229 | /* Check to see if logout occurred. */ |
1231 | if ((le16_to_cpu(sts->status_flags) & SF_LOGOUT_SENT)) | 1230 | if ((le16_to_cpu(sts->status_flags) & SF_LOGOUT_SENT)) |
1232 | qla2x00_mark_device_lost(ha, fcport, 1, 1); | 1231 | qla2x00_mark_device_lost(fcport->ha, fcport, 1, 1); |
1233 | break; | 1232 | break; |
1234 | 1233 | ||
1235 | default: | 1234 | default: |