aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_init.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c76
1 files changed, 39 insertions, 37 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index ef87d81935d2..98c01cd5e1a8 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -2065,40 +2065,7 @@ qla2x00_iidma_fcport(scsi_qla_host_t *ha, fc_port_t *fcport)
2065 } 2065 }
2066} 2066}
2067 2067
2068/* 2068static void
2069 * qla2x00_update_fcport
2070 * Updates device on list.
2071 *
2072 * Input:
2073 * ha = adapter block pointer.
2074 * fcport = port structure pointer.
2075 *
2076 * Return:
2077 * 0 - Success
2078 * BIT_0 - error
2079 *
2080 * Context:
2081 * Kernel context.
2082 */
2083void
2084qla2x00_update_fcport(scsi_qla_host_t *ha, fc_port_t *fcport)
2085{
2086 fcport->ha = ha;
2087 fcport->login_retry = 0;
2088 fcport->port_login_retry_count = ha->port_down_retry_count *
2089 PORT_RETRY_TIME;
2090 atomic_set(&fcport->port_down_timer, ha->port_down_retry_count *
2091 PORT_RETRY_TIME);
2092 fcport->flags &= ~FCF_LOGIN_NEEDED;
2093
2094 qla2x00_iidma_fcport(ha, fcport);
2095
2096 atomic_set(&fcport->state, FCS_ONLINE);
2097
2098 qla2x00_reg_remote_port(ha, fcport);
2099}
2100
2101void
2102qla2x00_reg_remote_port(scsi_qla_host_t *ha, fc_port_t *fcport) 2069qla2x00_reg_remote_port(scsi_qla_host_t *ha, fc_port_t *fcport)
2103{ 2070{
2104 struct fc_rport_identifiers rport_ids; 2071 struct fc_rport_identifiers rport_ids;
@@ -2141,6 +2108,39 @@ qla2x00_reg_remote_port(scsi_qla_host_t *ha, fc_port_t *fcport)
2141} 2108}
2142 2109
2143/* 2110/*
2111 * qla2x00_update_fcport
2112 * Updates device on list.
2113 *
2114 * Input:
2115 * ha = adapter block pointer.
2116 * fcport = port structure pointer.
2117 *
2118 * Return:
2119 * 0 - Success
2120 * BIT_0 - error
2121 *
2122 * Context:
2123 * Kernel context.
2124 */
2125void
2126qla2x00_update_fcport(scsi_qla_host_t *ha, fc_port_t *fcport)
2127{
2128 fcport->ha = ha;
2129 fcport->login_retry = 0;
2130 fcport->port_login_retry_count = ha->port_down_retry_count *
2131 PORT_RETRY_TIME;
2132 atomic_set(&fcport->port_down_timer, ha->port_down_retry_count *
2133 PORT_RETRY_TIME);
2134 fcport->flags &= ~FCF_LOGIN_NEEDED;
2135
2136 qla2x00_iidma_fcport(ha, fcport);
2137
2138 atomic_set(&fcport->state, FCS_ONLINE);
2139
2140 qla2x00_reg_remote_port(ha, fcport);
2141}
2142
2143/*
2144 * qla2x00_configure_fabric 2144 * qla2x00_configure_fabric
2145 * Setup SNS devices with loop ID's. 2145 * Setup SNS devices with loop ID's.
2146 * 2146 *
@@ -3380,9 +3380,11 @@ qla24xx_nvram_config(scsi_qla_host_t *ha)
3380 3380
3381 /* Set host adapter parameters. */ 3381 /* Set host adapter parameters. */
3382 ha->flags.disable_risc_code_load = 0; 3382 ha->flags.disable_risc_code_load = 0;
3383 ha->flags.enable_lip_reset = 1; 3383 ha->flags.enable_lip_reset = 0;
3384 ha->flags.enable_lip_full_login = 1; 3384 ha->flags.enable_lip_full_login =
3385 ha->flags.enable_target_reset = 1; 3385 le32_to_cpu(nv->host_p) & BIT_10 ? 1: 0;
3386 ha->flags.enable_target_reset =
3387 le32_to_cpu(nv->host_p) & BIT_11 ? 1: 0;
3386 ha->flags.enable_led_scheme = 0; 3388 ha->flags.enable_led_scheme = 0;
3387 ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1: 0; 3389 ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1: 0;
3388 3390