[SCSI] qla2xxx: Clear local references of rport on device loss timeout notification from FC transport.

The clearing of local references to rport was blocked when abort is
active. This code clears the local references unconditionaly upon
device loss timeout callback from FC transport.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
Giridhar Malavali 2010-09-03 15:20:55 -07:00 коммит произвёл James Bottomley
Родитель b1d46989c1
Коммит 3fadb80b0f
1 изменённых файлов: 9 добавлений и 9 удалений

Просмотреть файл

@ -1547,6 +1547,15 @@ qla2x00_dev_loss_tmo_callbk(struct fc_rport *rport)
if (!fcport)
return;
/*
* Transport has effectively 'deleted' the rport, clear
* all local references.
*/
spin_lock_irq(host->host_lock);
fcport->rport = fcport->drport = NULL;
*((fc_port_t **)rport->dd_data) = NULL;
spin_unlock_irq(host->host_lock);
if (test_bit(ABORT_ISP_ACTIVE, &fcport->vha->dpc_flags))
return;
@ -1554,15 +1563,6 @@ qla2x00_dev_loss_tmo_callbk(struct fc_rport *rport)
qla2x00_abort_all_cmds(fcport->vha, DID_NO_CONNECT << 16);
return;
}
/*
* Transport has effectively 'deleted' the rport, clear
* all local references.
*/
spin_lock_irq(host->host_lock);
fcport->rport = NULL;
*((fc_port_t **)rport->dd_data) = NULL;
spin_unlock_irq(host->host_lock);
}
static void