diff options
author | Anirban Chakraborty <anirban.chakraborty@qlogic.com> | 2009-03-05 14:07:02 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-03-10 10:27:54 -0400 |
commit | ee546b6e048586381462ce7bb51c7ddc03819619 (patch) | |
tree | 8d45dca886722cc351f0245b35955eca451aaeac /drivers/scsi/qla2xxx/qla_init.c | |
parent | 605aa2bcd5e9dddc4666f12e0c19822809186d6d (diff) |
[SCSI] qla2xxx: Correct vport delete bug.
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_init.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 14325c027336..e54ab2f10795 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -2614,6 +2614,7 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *vha, | |||
2614 | port_id_t wrap, nxt_d_id; | 2614 | port_id_t wrap, nxt_d_id; |
2615 | struct qla_hw_data *ha = vha->hw; | 2615 | struct qla_hw_data *ha = vha->hw; |
2616 | struct scsi_qla_host *vp, *base_vha = pci_get_drvdata(ha->pdev); | 2616 | struct scsi_qla_host *vp, *base_vha = pci_get_drvdata(ha->pdev); |
2617 | struct scsi_qla_host *tvp; | ||
2617 | 2618 | ||
2618 | rval = QLA_SUCCESS; | 2619 | rval = QLA_SUCCESS; |
2619 | 2620 | ||
@@ -2713,7 +2714,7 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *vha, | |||
2713 | /* Bypass virtual ports of the same host. */ | 2714 | /* Bypass virtual ports of the same host. */ |
2714 | found = 0; | 2715 | found = 0; |
2715 | if (ha->num_vhosts) { | 2716 | if (ha->num_vhosts) { |
2716 | list_for_each_entry(vp, &ha->vp_list, list) { | 2717 | list_for_each_entry_safe(vp, tvp, &ha->vp_list, list) { |
2717 | if (new_fcport->d_id.b24 == vp->d_id.b24) { | 2718 | if (new_fcport->d_id.b24 == vp->d_id.b24) { |
2718 | found = 1; | 2719 | found = 1; |
2719 | break; | 2720 | break; |
@@ -2836,6 +2837,7 @@ qla2x00_find_new_loop_id(scsi_qla_host_t *vha, fc_port_t *dev) | |||
2836 | uint16_t first_loop_id; | 2837 | uint16_t first_loop_id; |
2837 | struct qla_hw_data *ha = vha->hw; | 2838 | struct qla_hw_data *ha = vha->hw; |
2838 | struct scsi_qla_host *vp; | 2839 | struct scsi_qla_host *vp; |
2840 | struct scsi_qla_host *tvp; | ||
2839 | 2841 | ||
2840 | rval = QLA_SUCCESS; | 2842 | rval = QLA_SUCCESS; |
2841 | 2843 | ||
@@ -2860,7 +2862,7 @@ qla2x00_find_new_loop_id(scsi_qla_host_t *vha, fc_port_t *dev) | |||
2860 | /* Check for loop ID being already in use. */ | 2862 | /* Check for loop ID being already in use. */ |
2861 | found = 0; | 2863 | found = 0; |
2862 | fcport = NULL; | 2864 | fcport = NULL; |
2863 | list_for_each_entry(vp, &ha->vp_list, list) { | 2865 | list_for_each_entry_safe(vp, tvp, &ha->vp_list, list) { |
2864 | list_for_each_entry(fcport, &vp->vp_fcports, list) { | 2866 | list_for_each_entry(fcport, &vp->vp_fcports, list) { |
2865 | if (fcport->loop_id == dev->loop_id && | 2867 | if (fcport->loop_id == dev->loop_id && |
2866 | fcport != dev) { | 2868 | fcport != dev) { |
@@ -3295,6 +3297,7 @@ qla2x00_abort_isp(scsi_qla_host_t *vha) | |||
3295 | uint8_t status = 0; | 3297 | uint8_t status = 0; |
3296 | struct qla_hw_data *ha = vha->hw; | 3298 | struct qla_hw_data *ha = vha->hw; |
3297 | struct scsi_qla_host *vp; | 3299 | struct scsi_qla_host *vp; |
3300 | struct scsi_qla_host *tvp; | ||
3298 | struct req_que *req = ha->req_q_map[0]; | 3301 | struct req_que *req = ha->req_q_map[0]; |
3299 | 3302 | ||
3300 | if (vha->flags.online) { | 3303 | if (vha->flags.online) { |
@@ -3310,7 +3313,7 @@ qla2x00_abort_isp(scsi_qla_host_t *vha) | |||
3310 | if (atomic_read(&vha->loop_state) != LOOP_DOWN) { | 3313 | if (atomic_read(&vha->loop_state) != LOOP_DOWN) { |
3311 | atomic_set(&vha->loop_state, LOOP_DOWN); | 3314 | atomic_set(&vha->loop_state, LOOP_DOWN); |
3312 | qla2x00_mark_all_devices_lost(vha, 0); | 3315 | qla2x00_mark_all_devices_lost(vha, 0); |
3313 | list_for_each_entry(vp, &ha->vp_list, list) | 3316 | list_for_each_entry_safe(vp, tvp, &ha->vp_list, list) |
3314 | qla2x00_mark_all_devices_lost(vp, 0); | 3317 | qla2x00_mark_all_devices_lost(vp, 0); |
3315 | } else { | 3318 | } else { |
3316 | if (!atomic_read(&vha->loop_down_timer)) | 3319 | if (!atomic_read(&vha->loop_down_timer)) |
@@ -3407,7 +3410,7 @@ qla2x00_abort_isp(scsi_qla_host_t *vha) | |||
3407 | DEBUG(printk(KERN_INFO | 3410 | DEBUG(printk(KERN_INFO |
3408 | "qla2x00_abort_isp(%ld): succeeded.\n", | 3411 | "qla2x00_abort_isp(%ld): succeeded.\n", |
3409 | vha->host_no)); | 3412 | vha->host_no)); |
3410 | list_for_each_entry(vp, &ha->vp_list, list) { | 3413 | list_for_each_entry_safe(vp, tvp, &ha->vp_list, list) { |
3411 | if (vp->vp_idx) | 3414 | if (vp->vp_idx) |
3412 | qla2x00_vp_abort_isp(vp); | 3415 | qla2x00_vp_abort_isp(vp); |
3413 | } | 3416 | } |