Lines Matching full:nv
4134 struct nvram_81xx *nv = ha->nvram; in qla24xx_detect_sfp() local
4144 (nv->enhanced_features & NEF_LR_DIST_ENABLE)) { in qla24xx_detect_sfp()
4148 (nv->enhanced_features >> LR_DIST_NV_POS) in qla24xx_detect_sfp()
5164 static void qla2xxx_nvram_wwn_from_ofw(scsi_qla_host_t *vha, nvram_t *nv) in qla2xxx_nvram_wwn_from_ofw() argument
5175 memcpy(nv->port_name, val, WWN_SIZE); in qla2xxx_nvram_wwn_from_ofw()
5179 memcpy(nv->node_name, val, WWN_SIZE); in qla2xxx_nvram_wwn_from_ofw()
5205 nvram_t *nv = ha->nvram; in qla2x00_nvram_config() local
5212 ha->nvram_size = sizeof(*nv); in qla2x00_nvram_config()
5226 nv, ha->nvram_size); in qla2x00_nvram_config()
5229 if (chksum || memcmp("ISP ", nv->id, sizeof(nv->id)) || in qla2x00_nvram_config()
5230 nv->nvram_version < 1) { in qla2x00_nvram_config()
5234 chksum, nv->id, nv->nvram_version); in qla2x00_nvram_config()
5242 memset(nv, 0, ha->nvram_size); in qla2x00_nvram_config()
5243 nv->parameter_block_version = ICB_VERSION; in qla2x00_nvram_config()
5246 nv->firmware_options[0] = BIT_2 | BIT_1; in qla2x00_nvram_config()
5247 nv->firmware_options[1] = BIT_7 | BIT_5; in qla2x00_nvram_config()
5248 nv->add_firmware_options[0] = BIT_5; in qla2x00_nvram_config()
5249 nv->add_firmware_options[1] = BIT_5 | BIT_4; in qla2x00_nvram_config()
5250 nv->frame_payload_size = cpu_to_le16(2048); in qla2x00_nvram_config()
5251 nv->special_options[1] = BIT_7; in qla2x00_nvram_config()
5253 nv->firmware_options[0] = BIT_2 | BIT_1; in qla2x00_nvram_config()
5254 nv->firmware_options[1] = BIT_7 | BIT_5; in qla2x00_nvram_config()
5255 nv->add_firmware_options[0] = BIT_5; in qla2x00_nvram_config()
5256 nv->add_firmware_options[1] = BIT_5 | BIT_4; in qla2x00_nvram_config()
5257 nv->frame_payload_size = cpu_to_le16(1024); in qla2x00_nvram_config()
5259 nv->firmware_options[0] = BIT_3 | BIT_1; in qla2x00_nvram_config()
5260 nv->firmware_options[1] = BIT_5; in qla2x00_nvram_config()
5261 nv->frame_payload_size = cpu_to_le16(1024); in qla2x00_nvram_config()
5264 nv->max_iocb_allocation = cpu_to_le16(256); in qla2x00_nvram_config()
5265 nv->execution_throttle = cpu_to_le16(16); in qla2x00_nvram_config()
5266 nv->retry_count = 8; in qla2x00_nvram_config()
5267 nv->retry_delay = 1; in qla2x00_nvram_config()
5269 nv->port_name[0] = 33; in qla2x00_nvram_config()
5270 nv->port_name[3] = 224; in qla2x00_nvram_config()
5271 nv->port_name[4] = 139; in qla2x00_nvram_config()
5273 qla2xxx_nvram_wwn_from_ofw(vha, nv); in qla2x00_nvram_config()
5275 nv->login_timeout = 4; in qla2x00_nvram_config()
5280 nv->host_p[1] = BIT_2; in qla2x00_nvram_config()
5281 nv->reset_delay = 5; in qla2x00_nvram_config()
5282 nv->port_down_retry_count = 8; in qla2x00_nvram_config()
5283 nv->max_luns_per_target = cpu_to_le16(8); in qla2x00_nvram_config()
5284 nv->link_down_timeout = 60; in qla2x00_nvram_config()
5295 nv->firmware_options[0] |= (BIT_6 | BIT_1); in qla2x00_nvram_config()
5296 nv->firmware_options[0] &= ~(BIT_5 | BIT_4); in qla2x00_nvram_config()
5297 nv->firmware_options[1] |= (BIT_5 | BIT_0); in qla2x00_nvram_config()
5298 nv->firmware_options[1] &= ~BIT_4; in qla2x00_nvram_config()
5301 nv->firmware_options[0] |= BIT_2; in qla2x00_nvram_config()
5302 nv->firmware_options[0] &= ~BIT_3; in qla2x00_nvram_config()
5303 nv->special_options[0] &= ~BIT_6; in qla2x00_nvram_config()
5304 nv->add_firmware_options[1] |= BIT_5 | BIT_4; in qla2x00_nvram_config()
5313 qla2x00_set_model_info(vha, nv->model_number, in qla2x00_nvram_config()
5314 sizeof(nv->model_number), "QLA23xx"); in qla2x00_nvram_config()
5317 nv->firmware_options[0] |= BIT_2; in qla2x00_nvram_config()
5322 if ((nv->add_firmware_options[0] & (BIT_6 | BIT_5 | BIT_4)) == in qla2x00_nvram_config()
5325 nv->add_firmware_options[0] &= ~(BIT_6 | BIT_5 | BIT_4); in qla2x00_nvram_config()
5326 nv->add_firmware_options[0] |= BIT_5; in qla2x00_nvram_config()
5337 dptr2 = (uint8_t *)&nv->parameter_block_version; in qla2x00_nvram_config()
5349 if (nv->host_p[1] & BIT_7) { in qla2x00_nvram_config()
5350 memcpy(icb->node_name, nv->alternate_node_name, WWN_SIZE); in qla2x00_nvram_config()
5351 memcpy(icb->port_name, nv->alternate_port_name, WWN_SIZE); in qla2x00_nvram_config()
5372 if (nv->host_p[0] & BIT_7) in qla2x00_nvram_config()
5374 ha->flags.disable_risc_code_load = ((nv->host_p[0] & BIT_4) ? 1 : 0); in qla2x00_nvram_config()
5378 ha->flags.enable_lip_reset = ((nv->host_p[1] & BIT_1) ? 1 : 0); in qla2x00_nvram_config()
5379 ha->flags.enable_lip_full_login = ((nv->host_p[1] & BIT_2) ? 1 : 0); in qla2x00_nvram_config()
5380 ha->flags.enable_target_reset = ((nv->host_p[1] & BIT_3) ? 1 : 0); in qla2x00_nvram_config()
5381 ha->flags.enable_led_scheme = (nv->special_options[1] & BIT_4) ? 1 : 0; in qla2x00_nvram_config()
5387 memcpy(ha->fw_seriallink_options, nv->seriallink_options, in qla2x00_nvram_config()
5399 ha->retry_count = nv->retry_count; in qla2x00_nvram_config()
5402 if (nv->login_timeout != ql2xlogintimeout) in qla2x00_nvram_config()
5403 nv->login_timeout = ql2xlogintimeout; in qla2x00_nvram_config()
5404 if (nv->login_timeout < 4) in qla2x00_nvram_config()
5405 nv->login_timeout = 4; in qla2x00_nvram_config()
5406 ha->login_timeout = nv->login_timeout; in qla2x00_nvram_config()
5411 ha->loop_reset_delay = nv->reset_delay; in qla2x00_nvram_config()
5423 if (nv->link_down_timeout == 0) { in qla2x00_nvram_config()
5427 ha->link_down_timeout = nv->link_down_timeout; in qla2x00_nvram_config()
5435 ha->port_down_retry_count = nv->port_down_retry_count; in qla2x00_nvram_config()
5439 ha->login_retry_count = nv->retry_count; in qla2x00_nvram_config()
5440 if (ha->port_down_retry_count == nv->port_down_retry_count && in qla2x00_nvram_config()
7831 struct nvram_24xx *nv) in qla24xx_nvram_wwn_from_ofw() argument
7842 memcpy(nv->port_name, val, WWN_SIZE); in qla24xx_nvram_wwn_from_ofw()
7846 memcpy(nv->node_name, val, WWN_SIZE); in qla24xx_nvram_wwn_from_ofw()
7855 struct nvram_24xx *nv; in qla24xx_nvram_config() local
7864 nv = ha->nvram; in qla24xx_nvram_config()
7875 ha->nvram_size = sizeof(*nv); in qla24xx_nvram_config()
7884 dptr = (__force __le32 *)nv; in qla24xx_nvram_config()
7892 nv, ha->nvram_size); in qla24xx_nvram_config()
7895 if (chksum || memcmp("ISP ", nv->id, sizeof(nv->id)) || in qla24xx_nvram_config()
7896 le16_to_cpu(nv->nvram_version) < ICB_VERSION) { in qla24xx_nvram_config()
7900 chksum, nv->id, nv->nvram_version); in qla24xx_nvram_config()
7901 ql_dump_buffer(ql_dbg_init, vha, 0x006b, nv, sizeof(*nv)); in qla24xx_nvram_config()
7909 memset(nv, 0, ha->nvram_size); in qla24xx_nvram_config()
7910 nv->nvram_version = cpu_to_le16(ICB_VERSION); in qla24xx_nvram_config()
7911 nv->version = cpu_to_le16(ICB_VERSION); in qla24xx_nvram_config()
7912 nv->frame_payload_size = cpu_to_le16(2048); in qla24xx_nvram_config()
7913 nv->execution_throttle = cpu_to_le16(0xFFFF); in qla24xx_nvram_config()
7914 nv->exchange_count = cpu_to_le16(0); in qla24xx_nvram_config()
7915 nv->hard_address = cpu_to_le16(124); in qla24xx_nvram_config()
7916 nv->port_name[0] = 0x21; in qla24xx_nvram_config()
7917 nv->port_name[1] = 0x00 + ha->port_no + 1; in qla24xx_nvram_config()
7918 nv->port_name[2] = 0x00; in qla24xx_nvram_config()
7919 nv->port_name[3] = 0xe0; in qla24xx_nvram_config()
7920 nv->port_name[4] = 0x8b; in qla24xx_nvram_config()
7921 nv->port_name[5] = 0x1c; in qla24xx_nvram_config()
7922 nv->port_name[6] = 0x55; in qla24xx_nvram_config()
7923 nv->port_name[7] = 0x86; in qla24xx_nvram_config()
7924 nv->node_name[0] = 0x20; in qla24xx_nvram_config()
7925 nv->node_name[1] = 0x00; in qla24xx_nvram_config()
7926 nv->node_name[2] = 0x00; in qla24xx_nvram_config()
7927 nv->node_name[3] = 0xe0; in qla24xx_nvram_config()
7928 nv->node_name[4] = 0x8b; in qla24xx_nvram_config()
7929 nv->node_name[5] = 0x1c; in qla24xx_nvram_config()
7930 nv->node_name[6] = 0x55; in qla24xx_nvram_config()
7931 nv->node_name[7] = 0x86; in qla24xx_nvram_config()
7932 qla24xx_nvram_wwn_from_ofw(vha, nv); in qla24xx_nvram_config()
7933 nv->login_retry_count = cpu_to_le16(8); in qla24xx_nvram_config()
7934 nv->interrupt_delay_timer = cpu_to_le16(0); in qla24xx_nvram_config()
7935 nv->login_timeout = cpu_to_le16(0); in qla24xx_nvram_config()
7936 nv->firmware_options_1 = in qla24xx_nvram_config()
7938 nv->firmware_options_2 = cpu_to_le32(2 << 4); in qla24xx_nvram_config()
7939 nv->firmware_options_2 |= cpu_to_le32(BIT_12); in qla24xx_nvram_config()
7940 nv->firmware_options_3 = cpu_to_le32(2 << 13); in qla24xx_nvram_config()
7941 nv->host_p = cpu_to_le32(BIT_11|BIT_10); in qla24xx_nvram_config()
7942 nv->efi_parameters = cpu_to_le32(0); in qla24xx_nvram_config()
7943 nv->reset_delay = 5; in qla24xx_nvram_config()
7944 nv->max_luns_per_target = cpu_to_le16(128); in qla24xx_nvram_config()
7945 nv->port_down_retry_count = cpu_to_le16(30); in qla24xx_nvram_config()
7946 nv->link_down_timeout = cpu_to_le16(30); in qla24xx_nvram_config()
7953 nv->firmware_options_1 &= cpu_to_le32(~BIT_13); in qla24xx_nvram_config()
7955 nv->host_p &= cpu_to_le32(~BIT_10); in qla24xx_nvram_config()
7958 qlt_24xx_config_nvram_stage1(vha, nv); in qla24xx_nvram_config()
7965 dptr2 = (uint8_t *)&nv->version; in qla24xx_nvram_config()
7970 icb->login_retry_count = nv->login_retry_count; in qla24xx_nvram_config()
7971 icb->link_down_on_nos = nv->link_down_on_nos; in qla24xx_nvram_config()
7975 dptr2 = (uint8_t *)&nv->interrupt_delay_timer; in qla24xx_nvram_config()
7984 qla2x00_set_model_info(vha, nv->model_name, sizeof(nv->model_name), in qla24xx_nvram_config()
7989 if (nv->host_p & cpu_to_le32(BIT_15)) { in qla24xx_nvram_config()
7991 memcpy(icb->node_name, nv->alternate_node_name, WWN_SIZE); in qla24xx_nvram_config()
7992 memcpy(icb->port_name, nv->alternate_port_name, WWN_SIZE); in qla24xx_nvram_config()
8009 le32_to_cpu(nv->host_p) & BIT_10 ? 1 : 0; in qla24xx_nvram_config()
8011 le32_to_cpu(nv->host_p) & BIT_11 ? 1 : 0; in qla24xx_nvram_config()
8013 ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1 : 0; in qla24xx_nvram_config()
8018 memcpy(ha->fw_seriallink_options24, nv->seriallink_options, in qla24xx_nvram_config()
8030 ha->retry_count = le16_to_cpu(nv->login_retry_count); in qla24xx_nvram_config()
8033 if (le16_to_cpu(nv->login_timeout) < ql2xlogintimeout) in qla24xx_nvram_config()
8034 nv->login_timeout = cpu_to_le16(ql2xlogintimeout); in qla24xx_nvram_config()
8035 if (le16_to_cpu(nv->login_timeout) < 4) in qla24xx_nvram_config()
8036 nv->login_timeout = cpu_to_le16(4); in qla24xx_nvram_config()
8037 ha->login_timeout = le16_to_cpu(nv->login_timeout); in qla24xx_nvram_config()
8042 ha->loop_reset_delay = nv->reset_delay; in qla24xx_nvram_config()
8054 if (le16_to_cpu(nv->link_down_timeout) == 0) { in qla24xx_nvram_config()
8058 ha->link_down_timeout = le16_to_cpu(nv->link_down_timeout); in qla24xx_nvram_config()
8064 ha->port_down_retry_count = le16_to_cpu(nv->port_down_retry_count); in qla24xx_nvram_config()
8069 ha->login_retry_count = le16_to_cpu(nv->login_retry_count); in qla24xx_nvram_config()
8071 le16_to_cpu(nv->port_down_retry_count) && in qla24xx_nvram_config()
9035 struct nvram_81xx *nv; in qla81xx_nvram_config() local
9046 nv = ha->nvram; in qla81xx_nvram_config()
9049 ha->nvram_size = sizeof(*nv); in qla81xx_nvram_config()
9083 dptr = (__force __le32 *)nv; in qla81xx_nvram_config()
9090 nv, ha->nvram_size); in qla81xx_nvram_config()
9093 if (chksum || memcmp("ISP ", nv->id, sizeof(nv->id)) || in qla81xx_nvram_config()
9094 le16_to_cpu(nv->nvram_version) < ICB_VERSION) { in qla81xx_nvram_config()
9098 chksum, nv->id, le16_to_cpu(nv->nvram_version)); in qla81xx_nvram_config()
9099 ql_dump_buffer(ql_dbg_init, vha, 0x0073, nv, sizeof(*nv)); in qla81xx_nvram_config()
9107 memset(nv, 0, ha->nvram_size); in qla81xx_nvram_config()
9108 nv->nvram_version = cpu_to_le16(ICB_VERSION); in qla81xx_nvram_config()
9109 nv->version = cpu_to_le16(ICB_VERSION); in qla81xx_nvram_config()
9110 nv->frame_payload_size = cpu_to_le16(2048); in qla81xx_nvram_config()
9111 nv->execution_throttle = cpu_to_le16(0xFFFF); in qla81xx_nvram_config()
9112 nv->exchange_count = cpu_to_le16(0); in qla81xx_nvram_config()
9113 nv->port_name[0] = 0x21; in qla81xx_nvram_config()
9114 nv->port_name[1] = 0x00 + ha->port_no + 1; in qla81xx_nvram_config()
9115 nv->port_name[2] = 0x00; in qla81xx_nvram_config()
9116 nv->port_name[3] = 0xe0; in qla81xx_nvram_config()
9117 nv->port_name[4] = 0x8b; in qla81xx_nvram_config()
9118 nv->port_name[5] = 0x1c; in qla81xx_nvram_config()
9119 nv->port_name[6] = 0x55; in qla81xx_nvram_config()
9120 nv->port_name[7] = 0x86; in qla81xx_nvram_config()
9121 nv->node_name[0] = 0x20; in qla81xx_nvram_config()
9122 nv->node_name[1] = 0x00; in qla81xx_nvram_config()
9123 nv->node_name[2] = 0x00; in qla81xx_nvram_config()
9124 nv->node_name[3] = 0xe0; in qla81xx_nvram_config()
9125 nv->node_name[4] = 0x8b; in qla81xx_nvram_config()
9126 nv->node_name[5] = 0x1c; in qla81xx_nvram_config()
9127 nv->node_name[6] = 0x55; in qla81xx_nvram_config()
9128 nv->node_name[7] = 0x86; in qla81xx_nvram_config()
9129 nv->login_retry_count = cpu_to_le16(8); in qla81xx_nvram_config()
9130 nv->interrupt_delay_timer = cpu_to_le16(0); in qla81xx_nvram_config()
9131 nv->login_timeout = cpu_to_le16(0); in qla81xx_nvram_config()
9132 nv->firmware_options_1 = in qla81xx_nvram_config()
9134 nv->firmware_options_2 = cpu_to_le32(2 << 4); in qla81xx_nvram_config()
9135 nv->firmware_options_2 |= cpu_to_le32(BIT_12); in qla81xx_nvram_config()
9136 nv->firmware_options_3 = cpu_to_le32(2 << 13); in qla81xx_nvram_config()
9137 nv->host_p = cpu_to_le32(BIT_11|BIT_10); in qla81xx_nvram_config()
9138 nv->efi_parameters = cpu_to_le32(0); in qla81xx_nvram_config()
9139 nv->reset_delay = 5; in qla81xx_nvram_config()
9140 nv->max_luns_per_target = cpu_to_le16(128); in qla81xx_nvram_config()
9141 nv->port_down_retry_count = cpu_to_le16(30); in qla81xx_nvram_config()
9142 nv->link_down_timeout = cpu_to_le16(180); in qla81xx_nvram_config()
9143 nv->enode_mac[0] = 0x00; in qla81xx_nvram_config()
9144 nv->enode_mac[1] = 0xC0; in qla81xx_nvram_config()
9145 nv->enode_mac[2] = 0xDD; in qla81xx_nvram_config()
9146 nv->enode_mac[3] = 0x04; in qla81xx_nvram_config()
9147 nv->enode_mac[4] = 0x05; in qla81xx_nvram_config()
9148 nv->enode_mac[5] = 0x06 + ha->port_no + 1; in qla81xx_nvram_config()
9154 nv->frame_payload_size &= cpu_to_le16(~7); in qla81xx_nvram_config()
9156 qlt_81xx_config_nvram_stage1(vha, nv); in qla81xx_nvram_config()
9163 dptr2 = (uint8_t *)&nv->version; in qla81xx_nvram_config()
9168 icb->login_retry_count = nv->login_retry_count; in qla81xx_nvram_config()
9172 dptr2 = (uint8_t *)&nv->interrupt_delay_timer; in qla81xx_nvram_config()
9178 memcpy(icb->enode_mac, nv->enode_mac, sizeof(icb->enode_mac)); in qla81xx_nvram_config()
9190 memcpy(ha->ex_init_cb, &nv->ex_version, sizeof(*ha->ex_init_cb)); in qla81xx_nvram_config()
9195 qla2x00_set_model_info(vha, nv->model_name, sizeof(nv->model_name), in qla81xx_nvram_config()
9201 if (nv->host_p & cpu_to_le32(BIT_15)) { in qla81xx_nvram_config()
9202 memcpy(icb->node_name, nv->alternate_node_name, WWN_SIZE); in qla81xx_nvram_config()
9203 memcpy(icb->port_name, nv->alternate_port_name, WWN_SIZE); in qla81xx_nvram_config()
9217 if ((nv->enhanced_features & BIT_7) == 0) in qla81xx_nvram_config()
9225 le32_to_cpu(nv->host_p) & BIT_10 ? 1 : 0; in qla81xx_nvram_config()
9227 le32_to_cpu(nv->host_p) & BIT_11 ? 1 : 0; in qla81xx_nvram_config()
9229 ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1 : 0; in qla81xx_nvram_config()
9243 ha->retry_count = le16_to_cpu(nv->login_retry_count); in qla81xx_nvram_config()
9246 if (le16_to_cpu(nv->login_timeout) < ql2xlogintimeout) in qla81xx_nvram_config()
9247 nv->login_timeout = cpu_to_le16(ql2xlogintimeout); in qla81xx_nvram_config()
9248 if (le16_to_cpu(nv->login_timeout) < 4) in qla81xx_nvram_config()
9249 nv->login_timeout = cpu_to_le16(4); in qla81xx_nvram_config()
9250 ha->login_timeout = le16_to_cpu(nv->login_timeout); in qla81xx_nvram_config()
9255 ha->loop_reset_delay = nv->reset_delay; in qla81xx_nvram_config()
9267 if (le16_to_cpu(nv->link_down_timeout) == 0) { in qla81xx_nvram_config()
9271 ha->link_down_timeout = le16_to_cpu(nv->link_down_timeout); in qla81xx_nvram_config()
9277 ha->port_down_retry_count = le16_to_cpu(nv->port_down_retry_count); in qla81xx_nvram_config()
9282 ha->login_retry_count = le16_to_cpu(nv->login_retry_count); in qla81xx_nvram_config()
9284 le16_to_cpu(nv->port_down_retry_count) && in qla81xx_nvram_config()