[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: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
parent
0d6e61bc6a
commit
67becc0041
|
@ -3495,15 +3495,17 @@ qla2x00_loop_resync(scsi_qla_host_t *vha)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
qla2x00_update_fcports(scsi_qla_host_t *vha)
|
qla2x00_update_fcports(scsi_qla_host_t *base_vha)
|
||||||
{
|
{
|
||||||
fc_port_t *fcport;
|
fc_port_t *fcport;
|
||||||
|
struct scsi_qla_host *tvp, *vha;
|
||||||
|
|
||||||
/* Go with deferred removal of rport references. */
|
/* Go with deferred removal of rport references. */
|
||||||
list_for_each_entry(fcport, &vha->vp_fcports, list)
|
list_for_each_entry_safe(vha, tvp, &base_vha->hw->vp_list, list)
|
||||||
if (fcport && fcport->drport &&
|
list_for_each_entry(fcport, &vha->vp_fcports, list)
|
||||||
atomic_read(&fcport->state) != FCS_UNCONFIGURED)
|
if (fcport && fcport->drport &&
|
||||||
qla2x00_rport_del(fcport);
|
atomic_read(&fcport->state) != FCS_UNCONFIGURED)
|
||||||
|
qla2x00_rport_del(fcport);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -2181,17 +2181,19 @@ qla2x00_schedule_rport_del(struct scsi_qla_host *vha, fc_port_t *fcport,
|
||||||
int defer)
|
int defer)
|
||||||
{
|
{
|
||||||
struct fc_rport *rport;
|
struct fc_rport *rport;
|
||||||
|
scsi_qla_host_t *base_vha;
|
||||||
|
|
||||||
if (!fcport->rport)
|
if (!fcport->rport)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
rport = fcport->rport;
|
rport = fcport->rport;
|
||||||
if (defer) {
|
if (defer) {
|
||||||
|
base_vha = pci_get_drvdata(vha->hw->pdev);
|
||||||
spin_lock_irq(vha->host->host_lock);
|
spin_lock_irq(vha->host->host_lock);
|
||||||
fcport->drport = rport;
|
fcport->drport = rport;
|
||||||
spin_unlock_irq(vha->host->host_lock);
|
spin_unlock_irq(vha->host->host_lock);
|
||||||
set_bit(FCPORT_UPDATE_NEEDED, &vha->dpc_flags);
|
set_bit(FCPORT_UPDATE_NEEDED, &base_vha->dpc_flags);
|
||||||
qla2xxx_wake_dpc(vha);
|
qla2xxx_wake_dpc(base_vha);
|
||||||
} else
|
} else
|
||||||
fc_remote_port_delete(rport);
|
fc_remote_port_delete(rport);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue