aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx
diff options
context:
space:
mode:
authorSeokmann Ju <seokmann.ju@qlogic.com>2008-04-03 16:13:28 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-04-07 13:19:15 -0400
commitd4486fd6deb3354aa39cfedfcfd114cfe9ff9238 (patch)
tree596195fc4f691da6af75ec31c435cf674338a49c /drivers/scsi/qla2xxx
parent73f0f0f24ad898db8316d1c8bf877fbe7b60b015 (diff)
[SCSI] qla2xxx: Consistently access the physical HA port.
There were several places where referencing ha structure of virtual ports for resources. Among those refereces, certain fields are get up-to-dated only on ha structure of physical port. Signed-off-by: Seokmann Ju <seokmann.ju@qlogic.com> Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 916462ef1966..01e26087c1dd 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -2453,7 +2453,8 @@ qla2x00_configure_fabric(scsi_qla_host_t *ha)
2453 2453
2454 if (fcport->loop_id == FC_NO_LOOP_ID) { 2454 if (fcport->loop_id == FC_NO_LOOP_ID) {
2455 fcport->loop_id = next_loopid; 2455 fcport->loop_id = next_loopid;
2456 rval = qla2x00_find_new_loop_id(ha, fcport); 2456 rval = qla2x00_find_new_loop_id(
2457 to_qla_parent(ha), fcport);
2457 if (rval != QLA_SUCCESS) { 2458 if (rval != QLA_SUCCESS) {
2458 /* Ran out of IDs to use */ 2459 /* Ran out of IDs to use */
2459 break; 2460 break;
@@ -2478,7 +2479,8 @@ qla2x00_configure_fabric(scsi_qla_host_t *ha)
2478 2479
2479 /* Find a new loop ID to use. */ 2480 /* Find a new loop ID to use. */
2480 fcport->loop_id = next_loopid; 2481 fcport->loop_id = next_loopid;
2481 rval = qla2x00_find_new_loop_id(ha, fcport); 2482 rval = qla2x00_find_new_loop_id(to_qla_parent(ha),
2483 fcport);
2482 if (rval != QLA_SUCCESS) { 2484 if (rval != QLA_SUCCESS) {
2483 /* Ran out of IDs to use */ 2485 /* Ran out of IDs to use */
2484 break; 2486 break;
@@ -4044,16 +4046,16 @@ qla24xx_configure_vhba(scsi_qla_host_t *ha)
4044 if (!ha->parent) 4046 if (!ha->parent)
4045 return -EINVAL; 4047 return -EINVAL;
4046 4048
4047 rval = qla2x00_fw_ready(ha); 4049 rval = qla2x00_fw_ready(ha->parent);
4048 if (rval == QLA_SUCCESS) { 4050 if (rval == QLA_SUCCESS) {
4049 clear_bit(RESET_MARKER_NEEDED, &ha->dpc_flags); 4051 clear_bit(RESET_MARKER_NEEDED, &ha->dpc_flags);
4050 qla2x00_marker(ha, 0, 0, MK_SYNC_ALL); 4052 qla2x00_marker(ha->parent, 0, 0, MK_SYNC_ALL);
4051 } 4053 }
4052 4054
4053 ha->flags.management_server_logged_in = 0; 4055 ha->flags.management_server_logged_in = 0;
4054 4056
4055 /* Login to SNS first */ 4057 /* Login to SNS first */
4056 qla24xx_login_fabric(ha, NPH_SNS, 0xff, 0xff, 0xfc, 4058 qla24xx_login_fabric(ha->parent, NPH_SNS, 0xff, 0xff, 0xfc,
4057 mb, BIT_1); 4059 mb, BIT_1);
4058 if (mb[0] != MBS_COMMAND_COMPLETE) { 4060 if (mb[0] != MBS_COMMAND_COMPLETE) {
4059 DEBUG15(qla_printk(KERN_INFO, ha, 4061 DEBUG15(qla_printk(KERN_INFO, ha,
@@ -4067,7 +4069,7 @@ qla24xx_configure_vhba(scsi_qla_host_t *ha)
4067 atomic_set(&ha->loop_state, LOOP_UP); 4069 atomic_set(&ha->loop_state, LOOP_UP);
4068 set_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags); 4070 set_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags);
4069 set_bit(LOCAL_LOOP_UPDATE, &ha->dpc_flags); 4071 set_bit(LOCAL_LOOP_UPDATE, &ha->dpc_flags);
4070 rval = qla2x00_loop_resync(ha); 4072 rval = qla2x00_loop_resync(ha->parent);
4071 4073
4072 return rval; 4074 return rval;
4073} 4075}