diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2009-08-25 14:36:20 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-09-12 10:35:23 -0400 |
commit | 67becc0041615651b75e4496204a0835a8c345a8 (patch) | |
tree | a03de7a630d47c692196a18cf1e71c4bde282c21 /drivers/scsi/qla2xxx/qla_init.c | |
parent | 0d6e61bc6a4f3f54444b088ae6d447f1703a21dd (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/qla_init.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 12 |
1 files changed, 7 insertions, 5 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 | /* |