aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2009-08-25 11:36:20 -0700
committerJames Bottomley <James.Bottomley@suse.de>2009-09-12 09:35:23 -0500
commit67becc0041615651b75e4496204a0835a8c345a8 (patch)
treea03de7a630d47c692196a18cf1e71c4bde282c21 /drivers/scsi/qla2xxx
parent0d6e61bc6a4f3f54444b088ae6d447f1703a21dd (diff)
[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>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c12
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c6
2 files changed, 11 insertions, 7 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index f74d07a9e94..9e3eaac2559 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -3495,15 +3495,17 @@ 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(fcport, &vha->vp_fcports, list)
- if (fcport && fcport->drport &&
- atomic_read(&fcport->state) != FCS_UNCONFIGURED)
- qla2x00_rport_del(fcport);
+ 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)
+ qla2x00_rport_del(fcport);
}
/*
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 21022901958..b79fca7d461 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -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);
}