diff options
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 12 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 6 |
2 files changed, 11 insertions, 7 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index f74d07a9e945..9e3eaac25596 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) | |||
3495 | } | 3495 | } |
3496 | 3496 | ||
3497 | void | 3497 | void |
3498 | qla2x00_update_fcports(scsi_qla_host_t *vha) | 3498 | qla2x00_update_fcports(scsi_qla_host_t *base_vha) |
3499 | { | 3499 | { |
3500 | fc_port_t *fcport; | 3500 | fc_port_t *fcport; |
3501 | struct scsi_qla_host *tvp, *vha; | ||
3501 | 3502 | ||
3502 | /* Go with deferred removal of rport references. */ | 3503 | /* Go with deferred removal of rport references. */ |
3503 | list_for_each_entry(fcport, &vha->vp_fcports, list) | 3504 | list_for_each_entry_safe(vha, tvp, &base_vha->hw->vp_list, list) |
3504 | if (fcport && fcport->drport && | 3505 | list_for_each_entry(fcport, &vha->vp_fcports, list) |
3505 | atomic_read(&fcport->state) != FCS_UNCONFIGURED) | 3506 | if (fcport && fcport->drport && |
3506 | qla2x00_rport_del(fcport); | 3507 | atomic_read(&fcport->state) != FCS_UNCONFIGURED) |
3508 | qla2x00_rport_del(fcport); | ||
3507 | } | 3509 | } |
3508 | 3510 | ||
3509 | /* | 3511 | /* |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 210229019588..b79fca7d461b 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, | |||
2181 | int defer) | 2181 | int defer) |
2182 | { | 2182 | { |
2183 | struct fc_rport *rport; | 2183 | struct fc_rport *rport; |
2184 | scsi_qla_host_t *base_vha; | ||
2184 | 2185 | ||
2185 | if (!fcport->rport) | 2186 | if (!fcport->rport) |
2186 | return; | 2187 | return; |
2187 | 2188 | ||
2188 | rport = fcport->rport; | 2189 | rport = fcport->rport; |
2189 | if (defer) { | 2190 | if (defer) { |
2191 | base_vha = pci_get_drvdata(vha->hw->pdev); | ||
2190 | spin_lock_irq(vha->host->host_lock); | 2192 | spin_lock_irq(vha->host->host_lock); |
2191 | fcport->drport = rport; | 2193 | fcport->drport = rport; |
2192 | spin_unlock_irq(vha->host->host_lock); | 2194 | spin_unlock_irq(vha->host->host_lock); |
2193 | set_bit(FCPORT_UPDATE_NEEDED, &vha->dpc_flags); | 2195 | set_bit(FCPORT_UPDATE_NEEDED, &base_vha->dpc_flags); |
2194 | qla2xxx_wake_dpc(vha); | 2196 | qla2xxx_wake_dpc(base_vha); |
2195 | } else | 2197 | } else |
2196 | fc_remote_port_delete(rport); | 2198 | fc_remote_port_delete(rport); |
2197 | } | 2199 | } |