提交 67becc00 编写于 作者: A Andrew Vasquez 提交者: James Bottomley

[SCSI] qla2xxx: Properly delete rports attached to a vport.

Original code would inadvertently skip the deferred
fc_remote_port_delete() call for rports hanging off any vport.
Signed-off-by: NAndrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: NGiridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
上级 0d6e61bc
......@@ -3495,11 +3495,13 @@ qla2x00_loop_resync(scsi_qla_host_t *vha)
}
void
qla2x00_update_fcports(scsi_qla_host_t *vha)
qla2x00_update_fcports(scsi_qla_host_t *base_vha)
{
fc_port_t *fcport;
struct scsi_qla_host *tvp, *vha;
/* Go with deferred removal of rport references. */
list_for_each_entry_safe(vha, tvp, &base_vha->hw->vp_list, list)
list_for_each_entry(fcport, &vha->vp_fcports, list)
if (fcport && fcport->drport &&
atomic_read(&fcport->state) != FCS_UNCONFIGURED)
......
......@@ -2181,17 +2181,19 @@ qla2x00_schedule_rport_del(struct scsi_qla_host *vha, fc_port_t *fcport,
int defer)
{
struct fc_rport *rport;
scsi_qla_host_t *base_vha;
if (!fcport->rport)
return;
rport = fcport->rport;
if (defer) {
base_vha = pci_get_drvdata(vha->hw->pdev);
spin_lock_irq(vha->host->host_lock);
fcport->drport = rport;
spin_unlock_irq(vha->host->host_lock);
set_bit(FCPORT_UPDATE_NEEDED, &vha->dpc_flags);
qla2xxx_wake_dpc(vha);
set_bit(FCPORT_UPDATE_NEEDED, &base_vha->dpc_flags);
qla2xxx_wake_dpc(base_vha);
} else
fc_remote_port_delete(rport);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册