[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>

authored by Andrew Vasquez and committed by James Bottomley a7a28504 6390d1f3

+6 -4
+3
drivers/scsi/qla2xxx/qla_init.c
··· 3251 3251 { 3252 3252 int rval; 3253 3253 uint8_t status = 0; 3254 + scsi_qla_host_t *vha; 3254 3255 3255 3256 if (ha->flags.online) { 3256 3257 ha->flags.online = 0; ··· 3266 3265 if (atomic_read(&ha->loop_state) != LOOP_DOWN) { 3267 3266 atomic_set(&ha->loop_state, LOOP_DOWN); 3268 3267 qla2x00_mark_all_devices_lost(ha, 0); 3268 + list_for_each_entry(vha, &ha->vp_list, vp_list) 3269 + qla2x00_mark_all_devices_lost(vha, 0); 3269 3270 } else { 3270 3271 if (!atomic_read(&ha->loop_down_timer)) 3271 3272 atomic_set(&ha->loop_down_timer,
+3 -4
drivers/scsi/qla2xxx/qla_isr.c
··· 1184 1184 atomic_read(&fcport->state))); 1185 1185 1186 1186 cp->result = DID_BUS_BUSY << 16; 1187 - if (atomic_read(&fcport->state) == FCS_ONLINE) { 1188 - qla2x00_mark_device_lost(ha, fcport, 1, 1); 1189 - } 1187 + if (atomic_read(&fcport->state) == FCS_ONLINE) 1188 + qla2x00_mark_device_lost(fcport->ha, fcport, 1, 1); 1190 1189 break; 1191 1190 1192 1191 case CS_RESET: ··· 1228 1229 1229 1230 /* Check to see if logout occurred. */ 1230 1231 if ((le16_to_cpu(sts->status_flags) & SF_LOGOUT_SENT)) 1231 - qla2x00_mark_device_lost(ha, fcport, 1, 1); 1232 + qla2x00_mark_device_lost(fcport->ha, fcport, 1, 1); 1232 1233 break; 1233 1234 1234 1235 default: