diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_mid.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mid.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c index aa062a1b0ca4..3e8b32419e68 100644 --- a/drivers/scsi/qla2xxx/qla_mid.c +++ b/drivers/scsi/qla2xxx/qla_mid.c | |||
@@ -6,6 +6,7 @@ | |||
6 | */ | 6 | */ |
7 | #include "qla_def.h" | 7 | #include "qla_def.h" |
8 | #include "qla_gbl.h" | 8 | #include "qla_gbl.h" |
9 | #include "qla_target.h" | ||
9 | 10 | ||
10 | #include <linux/moduleparam.h> | 11 | #include <linux/moduleparam.h> |
11 | #include <linux/vmalloc.h> | 12 | #include <linux/vmalloc.h> |
@@ -49,6 +50,9 @@ qla24xx_allocate_vp_id(scsi_qla_host_t *vha) | |||
49 | 50 | ||
50 | spin_lock_irqsave(&ha->vport_slock, flags); | 51 | spin_lock_irqsave(&ha->vport_slock, flags); |
51 | list_add_tail(&vha->list, &ha->vp_list); | 52 | list_add_tail(&vha->list, &ha->vp_list); |
53 | |||
54 | qlt_update_vp_map(vha, SET_VP_IDX); | ||
55 | |||
52 | spin_unlock_irqrestore(&ha->vport_slock, flags); | 56 | spin_unlock_irqrestore(&ha->vport_slock, flags); |
53 | 57 | ||
54 | mutex_unlock(&ha->vport_lock); | 58 | mutex_unlock(&ha->vport_lock); |
@@ -79,6 +83,7 @@ qla24xx_deallocate_vp_id(scsi_qla_host_t *vha) | |||
79 | spin_lock_irqsave(&ha->vport_slock, flags); | 83 | spin_lock_irqsave(&ha->vport_slock, flags); |
80 | } | 84 | } |
81 | list_del(&vha->list); | 85 | list_del(&vha->list); |
86 | qlt_update_vp_map(vha, RESET_VP_IDX); | ||
82 | spin_unlock_irqrestore(&ha->vport_slock, flags); | 87 | spin_unlock_irqrestore(&ha->vport_slock, flags); |
83 | 88 | ||
84 | vp_id = vha->vp_idx; | 89 | vp_id = vha->vp_idx; |
@@ -134,7 +139,7 @@ qla2x00_mark_vp_devices_dead(scsi_qla_host_t *vha) | |||
134 | list_for_each_entry(fcport, &vha->vp_fcports, list) { | 139 | list_for_each_entry(fcport, &vha->vp_fcports, list) { |
135 | ql_dbg(ql_dbg_vport, vha, 0xa001, | 140 | ql_dbg(ql_dbg_vport, vha, 0xa001, |
136 | "Marking port dead, loop_id=0x%04x : %x.\n", | 141 | "Marking port dead, loop_id=0x%04x : %x.\n", |
137 | fcport->loop_id, fcport->vp_idx); | 142 | fcport->loop_id, fcport->vha->vp_idx); |
138 | 143 | ||
139 | qla2x00_mark_device_lost(vha, fcport, 0, 0); | 144 | qla2x00_mark_device_lost(vha, fcport, 0, 0); |
140 | qla2x00_set_fcport_state(fcport, FCS_UNCONFIGURED); | 145 | qla2x00_set_fcport_state(fcport, FCS_UNCONFIGURED); |
@@ -150,6 +155,9 @@ qla24xx_disable_vp(scsi_qla_host_t *vha) | |||
150 | atomic_set(&vha->loop_state, LOOP_DOWN); | 155 | atomic_set(&vha->loop_state, LOOP_DOWN); |
151 | atomic_set(&vha->loop_down_timer, LOOP_DOWN_TIME); | 156 | atomic_set(&vha->loop_down_timer, LOOP_DOWN_TIME); |
152 | 157 | ||
158 | /* Remove port id from vp target map */ | ||
159 | qlt_update_vp_map(vha, RESET_AL_PA); | ||
160 | |||
153 | qla2x00_mark_vp_devices_dead(vha); | 161 | qla2x00_mark_vp_devices_dead(vha); |
154 | atomic_set(&vha->vp_state, VP_FAILED); | 162 | atomic_set(&vha->vp_state, VP_FAILED); |
155 | vha->flags.management_server_logged_in = 0; | 163 | vha->flags.management_server_logged_in = 0; |
@@ -295,10 +303,8 @@ qla2x00_vp_abort_isp(scsi_qla_host_t *vha) | |||
295 | static int | 303 | static int |
296 | qla2x00_do_dpc_vp(scsi_qla_host_t *vha) | 304 | qla2x00_do_dpc_vp(scsi_qla_host_t *vha) |
297 | { | 305 | { |
298 | ql_dbg(ql_dbg_dpc, vha, 0x4012, | 306 | ql_dbg(ql_dbg_dpc + ql_dbg_verbose, vha, 0x4012, |
299 | "Entering %s.\n", __func__); | 307 | "Entering %s vp_flags: 0x%lx.\n", __func__, vha->vp_flags); |
300 | ql_dbg(ql_dbg_dpc, vha, 0x4013, | ||
301 | "vp_flags: 0x%lx.\n", vha->vp_flags); | ||
302 | 308 | ||
303 | qla2x00_do_work(vha); | 309 | qla2x00_do_work(vha); |
304 | 310 | ||
@@ -348,7 +354,7 @@ qla2x00_do_dpc_vp(scsi_qla_host_t *vha) | |||
348 | } | 354 | } |
349 | } | 355 | } |
350 | 356 | ||
351 | ql_dbg(ql_dbg_dpc, vha, 0x401c, | 357 | ql_dbg(ql_dbg_dpc + ql_dbg_verbose, vha, 0x401c, |
352 | "Exiting %s.\n", __func__); | 358 | "Exiting %s.\n", __func__); |
353 | return 0; | 359 | return 0; |
354 | } | 360 | } |