diff options
author | Seokmann Ju <seokmann.ju@qlogic.com> | 2008-07-10 19:55:58 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-07-26 15:14:44 -0400 |
commit | 5de1f70f4103253f72d92da16d9618bc573b4534 (patch) | |
tree | 0579498b302f9e2d89cbceb610dfb300cdec40cb /drivers/scsi/qla2xxx/qla_os.c | |
parent | da57bf8f25faf97308d9f4d0b87e8b69317a2fdf (diff) |
[SCSI] qla2xxx: Correct rport/fcport visibility-state handling during loop-resync.
There were several issues here, one, during RSCN handling if a
follow-on RSCN occurred (within interrupt context) the DPC thread
could inadvertantly leave the fcport in a stale lost state.
Secondly, scheduled rport removal is handled exclusively by the
'parent' DPC thread, so wake up the proper thread. Finally,
process vport loop-resync's only when the vport has in an
"active" state (ID acquired).
Signed-off-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_os.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 3f391698e1ce..0f44914b41d7 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -1849,6 +1849,7 @@ qla2x00_schedule_rport_del(struct scsi_qla_host *ha, fc_port_t *fcport, | |||
1849 | int defer) | 1849 | int defer) |
1850 | { | 1850 | { |
1851 | struct fc_rport *rport; | 1851 | struct fc_rport *rport; |
1852 | scsi_qla_host_t *pha = to_qla_parent(ha); | ||
1852 | 1853 | ||
1853 | if (!fcport->rport) | 1854 | if (!fcport->rport) |
1854 | return; | 1855 | return; |
@@ -1858,8 +1859,8 @@ qla2x00_schedule_rport_del(struct scsi_qla_host *ha, fc_port_t *fcport, | |||
1858 | spin_lock_irq(ha->host->host_lock); | 1859 | spin_lock_irq(ha->host->host_lock); |
1859 | fcport->drport = rport; | 1860 | fcport->drport = rport; |
1860 | spin_unlock_irq(ha->host->host_lock); | 1861 | spin_unlock_irq(ha->host->host_lock); |
1861 | set_bit(FCPORT_UPDATE_NEEDED, &ha->dpc_flags); | 1862 | set_bit(FCPORT_UPDATE_NEEDED, &pha->dpc_flags); |
1862 | qla2xxx_wake_dpc(ha); | 1863 | qla2xxx_wake_dpc(pha); |
1863 | } else | 1864 | } else |
1864 | fc_remote_port_delete(rport); | 1865 | fc_remote_port_delete(rport); |
1865 | } | 1866 | } |