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