Lines Matching full:nv
4168 struct nvram_81xx *nv = ha->nvram; in qla24xx_detect_sfp() local
4178 (nv->enhanced_features & NEF_LR_DIST_ENABLE)) { in qla24xx_detect_sfp()
4182 (nv->enhanced_features >> LR_DIST_NV_POS) in qla24xx_detect_sfp()
5195 static void qla2xxx_nvram_wwn_from_ofw(scsi_qla_host_t *vha, nvram_t *nv) in qla2xxx_nvram_wwn_from_ofw() argument
5206 memcpy(nv->port_name, val, WWN_SIZE); in qla2xxx_nvram_wwn_from_ofw()
5210 memcpy(nv->node_name, val, WWN_SIZE); in qla2xxx_nvram_wwn_from_ofw()
5236 nvram_t *nv = ha->nvram; in qla2x00_nvram_config() local
5243 ha->nvram_size = sizeof(*nv); in qla2x00_nvram_config()
5257 nv, ha->nvram_size); in qla2x00_nvram_config()
5260 if (chksum || memcmp("ISP ", nv->id, sizeof(nv->id)) || in qla2x00_nvram_config()
5261 nv->nvram_version < 1) { in qla2x00_nvram_config()
5265 chksum, nv->id, nv->nvram_version); in qla2x00_nvram_config()
5273 memset(nv, 0, ha->nvram_size); in qla2x00_nvram_config()
5274 nv->parameter_block_version = ICB_VERSION; in qla2x00_nvram_config()
5277 nv->firmware_options[0] = BIT_2 | BIT_1; in qla2x00_nvram_config()
5278 nv->firmware_options[1] = BIT_7 | BIT_5; in qla2x00_nvram_config()
5279 nv->add_firmware_options[0] = BIT_5; in qla2x00_nvram_config()
5280 nv->add_firmware_options[1] = BIT_5 | BIT_4; in qla2x00_nvram_config()
5281 nv->frame_payload_size = cpu_to_le16(2048); in qla2x00_nvram_config()
5282 nv->special_options[1] = BIT_7; in qla2x00_nvram_config()
5284 nv->firmware_options[0] = BIT_2 | BIT_1; in qla2x00_nvram_config()
5285 nv->firmware_options[1] = BIT_7 | BIT_5; in qla2x00_nvram_config()
5286 nv->add_firmware_options[0] = BIT_5; in qla2x00_nvram_config()
5287 nv->add_firmware_options[1] = BIT_5 | BIT_4; in qla2x00_nvram_config()
5288 nv->frame_payload_size = cpu_to_le16(1024); in qla2x00_nvram_config()
5290 nv->firmware_options[0] = BIT_3 | BIT_1; in qla2x00_nvram_config()
5291 nv->firmware_options[1] = BIT_5; in qla2x00_nvram_config()
5292 nv->frame_payload_size = cpu_to_le16(1024); in qla2x00_nvram_config()
5295 nv->max_iocb_allocation = cpu_to_le16(256); in qla2x00_nvram_config()
5296 nv->execution_throttle = cpu_to_le16(16); in qla2x00_nvram_config()
5297 nv->retry_count = 8; in qla2x00_nvram_config()
5298 nv->retry_delay = 1; in qla2x00_nvram_config()
5300 nv->port_name[0] = 33; in qla2x00_nvram_config()
5301 nv->port_name[3] = 224; in qla2x00_nvram_config()
5302 nv->port_name[4] = 139; in qla2x00_nvram_config()
5304 qla2xxx_nvram_wwn_from_ofw(vha, nv); in qla2x00_nvram_config()
5306 nv->login_timeout = 4; in qla2x00_nvram_config()
5311 nv->host_p[1] = BIT_2; in qla2x00_nvram_config()
5312 nv->reset_delay = 5; in qla2x00_nvram_config()
5313 nv->port_down_retry_count = 8; in qla2x00_nvram_config()
5314 nv->max_luns_per_target = cpu_to_le16(8); in qla2x00_nvram_config()
5315 nv->link_down_timeout = 60; in qla2x00_nvram_config()
5326 nv->firmware_options[0] |= (BIT_6 | BIT_1); in qla2x00_nvram_config()
5327 nv->firmware_options[0] &= ~(BIT_5 | BIT_4); in qla2x00_nvram_config()
5328 nv->firmware_options[1] |= (BIT_5 | BIT_0); in qla2x00_nvram_config()
5329 nv->firmware_options[1] &= ~BIT_4; in qla2x00_nvram_config()
5332 nv->firmware_options[0] |= BIT_2; in qla2x00_nvram_config()
5333 nv->firmware_options[0] &= ~BIT_3; in qla2x00_nvram_config()
5334 nv->special_options[0] &= ~BIT_6; in qla2x00_nvram_config()
5335 nv->add_firmware_options[1] |= BIT_5 | BIT_4; in qla2x00_nvram_config()
5344 qla2x00_set_model_info(vha, nv->model_number, in qla2x00_nvram_config()
5345 sizeof(nv->model_number), "QLA23xx"); in qla2x00_nvram_config()
5348 nv->firmware_options[0] |= BIT_2; in qla2x00_nvram_config()
5353 if ((nv->add_firmware_options[0] & (BIT_6 | BIT_5 | BIT_4)) == in qla2x00_nvram_config()
5356 nv->add_firmware_options[0] &= ~(BIT_6 | BIT_5 | BIT_4); in qla2x00_nvram_config()
5357 nv->add_firmware_options[0] |= BIT_5; in qla2x00_nvram_config()
5368 dptr2 = (uint8_t *)&nv->parameter_block_version; in qla2x00_nvram_config()
5380 if (nv->host_p[1] & BIT_7) { in qla2x00_nvram_config()
5381 memcpy(icb->node_name, nv->alternate_node_name, WWN_SIZE); in qla2x00_nvram_config()
5382 memcpy(icb->port_name, nv->alternate_port_name, WWN_SIZE); in qla2x00_nvram_config()
5403 if (nv->host_p[0] & BIT_7) in qla2x00_nvram_config()
5405 ha->flags.disable_risc_code_load = ((nv->host_p[0] & BIT_4) ? 1 : 0); in qla2x00_nvram_config()
5409 ha->flags.enable_lip_reset = ((nv->host_p[1] & BIT_1) ? 1 : 0); in qla2x00_nvram_config()
5410 ha->flags.enable_lip_full_login = ((nv->host_p[1] & BIT_2) ? 1 : 0); in qla2x00_nvram_config()
5411 ha->flags.enable_target_reset = ((nv->host_p[1] & BIT_3) ? 1 : 0); in qla2x00_nvram_config()
5412 ha->flags.enable_led_scheme = (nv->special_options[1] & BIT_4) ? 1 : 0; in qla2x00_nvram_config()
5418 memcpy(ha->fw_seriallink_options, nv->seriallink_options, in qla2x00_nvram_config()
5430 ha->retry_count = nv->retry_count; in qla2x00_nvram_config()
5433 if (nv->login_timeout != ql2xlogintimeout) in qla2x00_nvram_config()
5434 nv->login_timeout = ql2xlogintimeout; in qla2x00_nvram_config()
5435 if (nv->login_timeout < 4) in qla2x00_nvram_config()
5436 nv->login_timeout = 4; in qla2x00_nvram_config()
5437 ha->login_timeout = nv->login_timeout; in qla2x00_nvram_config()
5442 ha->loop_reset_delay = nv->reset_delay; in qla2x00_nvram_config()
5454 if (nv->link_down_timeout == 0) { in qla2x00_nvram_config()
5458 ha->link_down_timeout = nv->link_down_timeout; in qla2x00_nvram_config()
5466 ha->port_down_retry_count = nv->port_down_retry_count; in qla2x00_nvram_config()
5470 ha->login_retry_count = nv->retry_count; in qla2x00_nvram_config()
5471 if (ha->port_down_retry_count == nv->port_down_retry_count && in qla2x00_nvram_config()
7854 struct nvram_24xx *nv) in qla24xx_nvram_wwn_from_ofw() argument
7865 memcpy(nv->port_name, val, WWN_SIZE); in qla24xx_nvram_wwn_from_ofw()
7869 memcpy(nv->node_name, val, WWN_SIZE); in qla24xx_nvram_wwn_from_ofw()
7878 struct nvram_24xx *nv; in qla24xx_nvram_config() local
7887 nv = ha->nvram; in qla24xx_nvram_config()
7898 ha->nvram_size = sizeof(*nv); in qla24xx_nvram_config()
7907 dptr = (__force __le32 *)nv; in qla24xx_nvram_config()
7915 nv, ha->nvram_size); in qla24xx_nvram_config()
7918 if (chksum || memcmp("ISP ", nv->id, sizeof(nv->id)) || in qla24xx_nvram_config()
7919 le16_to_cpu(nv->nvram_version) < ICB_VERSION) { in qla24xx_nvram_config()
7923 chksum, nv->id, nv->nvram_version); in qla24xx_nvram_config()
7924 ql_dump_buffer(ql_dbg_init, vha, 0x006b, nv, sizeof(*nv)); in qla24xx_nvram_config()
7932 memset(nv, 0, ha->nvram_size); in qla24xx_nvram_config()
7933 nv->nvram_version = cpu_to_le16(ICB_VERSION); in qla24xx_nvram_config()
7934 nv->version = cpu_to_le16(ICB_VERSION); in qla24xx_nvram_config()
7935 nv->frame_payload_size = cpu_to_le16(2048); in qla24xx_nvram_config()
7936 nv->execution_throttle = cpu_to_le16(0xFFFF); in qla24xx_nvram_config()
7937 nv->exchange_count = cpu_to_le16(0); in qla24xx_nvram_config()
7938 nv->hard_address = cpu_to_le16(124); in qla24xx_nvram_config()
7939 nv->port_name[0] = 0x21; in qla24xx_nvram_config()
7940 nv->port_name[1] = 0x00 + ha->port_no + 1; in qla24xx_nvram_config()
7941 nv->port_name[2] = 0x00; in qla24xx_nvram_config()
7942 nv->port_name[3] = 0xe0; in qla24xx_nvram_config()
7943 nv->port_name[4] = 0x8b; in qla24xx_nvram_config()
7944 nv->port_name[5] = 0x1c; in qla24xx_nvram_config()
7945 nv->port_name[6] = 0x55; in qla24xx_nvram_config()
7946 nv->port_name[7] = 0x86; in qla24xx_nvram_config()
7947 nv->node_name[0] = 0x20; in qla24xx_nvram_config()
7948 nv->node_name[1] = 0x00; in qla24xx_nvram_config()
7949 nv->node_name[2] = 0x00; in qla24xx_nvram_config()
7950 nv->node_name[3] = 0xe0; in qla24xx_nvram_config()
7951 nv->node_name[4] = 0x8b; in qla24xx_nvram_config()
7952 nv->node_name[5] = 0x1c; in qla24xx_nvram_config()
7953 nv->node_name[6] = 0x55; in qla24xx_nvram_config()
7954 nv->node_name[7] = 0x86; in qla24xx_nvram_config()
7955 qla24xx_nvram_wwn_from_ofw(vha, nv); in qla24xx_nvram_config()
7956 nv->login_retry_count = cpu_to_le16(8); in qla24xx_nvram_config()
7957 nv->interrupt_delay_timer = cpu_to_le16(0); in qla24xx_nvram_config()
7958 nv->login_timeout = cpu_to_le16(0); in qla24xx_nvram_config()
7959 nv->firmware_options_1 = in qla24xx_nvram_config()
7961 nv->firmware_options_2 = cpu_to_le32(2 << 4); in qla24xx_nvram_config()
7962 nv->firmware_options_2 |= cpu_to_le32(BIT_12); in qla24xx_nvram_config()
7963 nv->firmware_options_3 = cpu_to_le32(2 << 13); in qla24xx_nvram_config()
7964 nv->host_p = cpu_to_le32(BIT_11|BIT_10); in qla24xx_nvram_config()
7965 nv->efi_parameters = cpu_to_le32(0); in qla24xx_nvram_config()
7966 nv->reset_delay = 5; in qla24xx_nvram_config()
7967 nv->max_luns_per_target = cpu_to_le16(128); in qla24xx_nvram_config()
7968 nv->port_down_retry_count = cpu_to_le16(30); in qla24xx_nvram_config()
7969 nv->link_down_timeout = cpu_to_le16(30); in qla24xx_nvram_config()
7976 nv->firmware_options_1 &= cpu_to_le32(~BIT_13); in qla24xx_nvram_config()
7978 nv->host_p &= cpu_to_le32(~BIT_10); in qla24xx_nvram_config()
7981 qlt_24xx_config_nvram_stage1(vha, nv); in qla24xx_nvram_config()
7988 dptr2 = (uint8_t *)&nv->version; in qla24xx_nvram_config()
7993 icb->login_retry_count = nv->login_retry_count; in qla24xx_nvram_config()
7994 icb->link_down_on_nos = nv->link_down_on_nos; in qla24xx_nvram_config()
7998 dptr2 = (uint8_t *)&nv->interrupt_delay_timer; in qla24xx_nvram_config()
8007 qla2x00_set_model_info(vha, nv->model_name, sizeof(nv->model_name), in qla24xx_nvram_config()
8012 if (nv->host_p & cpu_to_le32(BIT_15)) { in qla24xx_nvram_config()
8014 memcpy(icb->node_name, nv->alternate_node_name, WWN_SIZE); in qla24xx_nvram_config()
8015 memcpy(icb->port_name, nv->alternate_port_name, WWN_SIZE); in qla24xx_nvram_config()
8032 le32_to_cpu(nv->host_p) & BIT_10 ? 1 : 0; in qla24xx_nvram_config()
8034 le32_to_cpu(nv->host_p) & BIT_11 ? 1 : 0; in qla24xx_nvram_config()
8036 ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1 : 0; in qla24xx_nvram_config()
8041 memcpy(ha->fw_seriallink_options24, nv->seriallink_options, in qla24xx_nvram_config()
8053 ha->retry_count = le16_to_cpu(nv->login_retry_count); in qla24xx_nvram_config()
8056 if (le16_to_cpu(nv->login_timeout) < ql2xlogintimeout) in qla24xx_nvram_config()
8057 nv->login_timeout = cpu_to_le16(ql2xlogintimeout); in qla24xx_nvram_config()
8058 if (le16_to_cpu(nv->login_timeout) < 4) in qla24xx_nvram_config()
8059 nv->login_timeout = cpu_to_le16(4); in qla24xx_nvram_config()
8060 ha->login_timeout = le16_to_cpu(nv->login_timeout); in qla24xx_nvram_config()
8065 ha->loop_reset_delay = nv->reset_delay; in qla24xx_nvram_config()
8077 if (le16_to_cpu(nv->link_down_timeout) == 0) { in qla24xx_nvram_config()
8081 ha->link_down_timeout = le16_to_cpu(nv->link_down_timeout); in qla24xx_nvram_config()
8087 ha->port_down_retry_count = le16_to_cpu(nv->port_down_retry_count); in qla24xx_nvram_config()
8092 ha->login_retry_count = le16_to_cpu(nv->login_retry_count); in qla24xx_nvram_config()
8094 le16_to_cpu(nv->port_down_retry_count) && in qla24xx_nvram_config()
9095 struct nvram_81xx *nv; in qla81xx_nvram_config() local
9106 nv = ha->nvram; in qla81xx_nvram_config()
9109 ha->nvram_size = sizeof(*nv); in qla81xx_nvram_config()
9143 dptr = (__force __le32 *)nv; in qla81xx_nvram_config()
9150 nv, ha->nvram_size); in qla81xx_nvram_config()
9153 if (chksum || memcmp("ISP ", nv->id, sizeof(nv->id)) || in qla81xx_nvram_config()
9154 le16_to_cpu(nv->nvram_version) < ICB_VERSION) { in qla81xx_nvram_config()
9158 chksum, nv->id, le16_to_cpu(nv->nvram_version)); in qla81xx_nvram_config()
9159 ql_dump_buffer(ql_dbg_init, vha, 0x0073, nv, sizeof(*nv)); in qla81xx_nvram_config()
9167 memset(nv, 0, ha->nvram_size); in qla81xx_nvram_config()
9168 nv->nvram_version = cpu_to_le16(ICB_VERSION); in qla81xx_nvram_config()
9169 nv->version = cpu_to_le16(ICB_VERSION); in qla81xx_nvram_config()
9170 nv->frame_payload_size = cpu_to_le16(2048); in qla81xx_nvram_config()
9171 nv->execution_throttle = cpu_to_le16(0xFFFF); in qla81xx_nvram_config()
9172 nv->exchange_count = cpu_to_le16(0); in qla81xx_nvram_config()
9173 nv->port_name[0] = 0x21; in qla81xx_nvram_config()
9174 nv->port_name[1] = 0x00 + ha->port_no + 1; in qla81xx_nvram_config()
9175 nv->port_name[2] = 0x00; in qla81xx_nvram_config()
9176 nv->port_name[3] = 0xe0; in qla81xx_nvram_config()
9177 nv->port_name[4] = 0x8b; in qla81xx_nvram_config()
9178 nv->port_name[5] = 0x1c; in qla81xx_nvram_config()
9179 nv->port_name[6] = 0x55; in qla81xx_nvram_config()
9180 nv->port_name[7] = 0x86; in qla81xx_nvram_config()
9181 nv->node_name[0] = 0x20; in qla81xx_nvram_config()
9182 nv->node_name[1] = 0x00; in qla81xx_nvram_config()
9183 nv->node_name[2] = 0x00; in qla81xx_nvram_config()
9184 nv->node_name[3] = 0xe0; in qla81xx_nvram_config()
9185 nv->node_name[4] = 0x8b; in qla81xx_nvram_config()
9186 nv->node_name[5] = 0x1c; in qla81xx_nvram_config()
9187 nv->node_name[6] = 0x55; in qla81xx_nvram_config()
9188 nv->node_name[7] = 0x86; in qla81xx_nvram_config()
9189 nv->login_retry_count = cpu_to_le16(8); in qla81xx_nvram_config()
9190 nv->interrupt_delay_timer = cpu_to_le16(0); in qla81xx_nvram_config()
9191 nv->login_timeout = cpu_to_le16(0); in qla81xx_nvram_config()
9192 nv->firmware_options_1 = in qla81xx_nvram_config()
9194 nv->firmware_options_2 = cpu_to_le32(2 << 4); in qla81xx_nvram_config()
9195 nv->firmware_options_2 |= cpu_to_le32(BIT_12); in qla81xx_nvram_config()
9196 nv->firmware_options_3 = cpu_to_le32(2 << 13); in qla81xx_nvram_config()
9197 nv->host_p = cpu_to_le32(BIT_11|BIT_10); in qla81xx_nvram_config()
9198 nv->efi_parameters = cpu_to_le32(0); in qla81xx_nvram_config()
9199 nv->reset_delay = 5; in qla81xx_nvram_config()
9200 nv->max_luns_per_target = cpu_to_le16(128); in qla81xx_nvram_config()
9201 nv->port_down_retry_count = cpu_to_le16(30); in qla81xx_nvram_config()
9202 nv->link_down_timeout = cpu_to_le16(180); in qla81xx_nvram_config()
9203 nv->enode_mac[0] = 0x00; in qla81xx_nvram_config()
9204 nv->enode_mac[1] = 0xC0; in qla81xx_nvram_config()
9205 nv->enode_mac[2] = 0xDD; in qla81xx_nvram_config()
9206 nv->enode_mac[3] = 0x04; in qla81xx_nvram_config()
9207 nv->enode_mac[4] = 0x05; in qla81xx_nvram_config()
9208 nv->enode_mac[5] = 0x06 + ha->port_no + 1; in qla81xx_nvram_config()
9214 nv->frame_payload_size &= cpu_to_le16(~7); in qla81xx_nvram_config()
9216 qlt_81xx_config_nvram_stage1(vha, nv); in qla81xx_nvram_config()
9223 dptr2 = (uint8_t *)&nv->version; in qla81xx_nvram_config()
9228 icb->login_retry_count = nv->login_retry_count; in qla81xx_nvram_config()
9232 dptr2 = (uint8_t *)&nv->interrupt_delay_timer; in qla81xx_nvram_config()
9238 memcpy(icb->enode_mac, nv->enode_mac, sizeof(icb->enode_mac)); in qla81xx_nvram_config()
9250 memcpy(ha->ex_init_cb, &nv->ex_version, sizeof(*ha->ex_init_cb)); in qla81xx_nvram_config()
9255 qla2x00_set_model_info(vha, nv->model_name, sizeof(nv->model_name), in qla81xx_nvram_config()
9261 if (nv->host_p & cpu_to_le32(BIT_15)) { in qla81xx_nvram_config()
9262 memcpy(icb->node_name, nv->alternate_node_name, WWN_SIZE); in qla81xx_nvram_config()
9263 memcpy(icb->port_name, nv->alternate_port_name, WWN_SIZE); in qla81xx_nvram_config()
9277 if ((nv->enhanced_features & BIT_7) == 0) in qla81xx_nvram_config()
9285 le32_to_cpu(nv->host_p) & BIT_10 ? 1 : 0; in qla81xx_nvram_config()
9287 le32_to_cpu(nv->host_p) & BIT_11 ? 1 : 0; in qla81xx_nvram_config()
9289 ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1 : 0; in qla81xx_nvram_config()
9303 ha->retry_count = le16_to_cpu(nv->login_retry_count); in qla81xx_nvram_config()
9306 if (le16_to_cpu(nv->login_timeout) < ql2xlogintimeout) in qla81xx_nvram_config()
9307 nv->login_timeout = cpu_to_le16(ql2xlogintimeout); in qla81xx_nvram_config()
9308 if (le16_to_cpu(nv->login_timeout) < 4) in qla81xx_nvram_config()
9309 nv->login_timeout = cpu_to_le16(4); in qla81xx_nvram_config()
9310 ha->login_timeout = le16_to_cpu(nv->login_timeout); in qla81xx_nvram_config()
9315 ha->loop_reset_delay = nv->reset_delay; in qla81xx_nvram_config()
9327 if (le16_to_cpu(nv->link_down_timeout) == 0) { in qla81xx_nvram_config()
9331 ha->link_down_timeout = le16_to_cpu(nv->link_down_timeout); in qla81xx_nvram_config()
9337 ha->port_down_retry_count = le16_to_cpu(nv->port_down_retry_count); in qla81xx_nvram_config()
9342 ha->login_retry_count = le16_to_cpu(nv->login_retry_count); in qla81xx_nvram_config()
9344 le16_to_cpu(nv->port_down_retry_count) && in qla81xx_nvram_config()