• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/scsi/qla2xxx/

Lines Matching refs:nv

2122 static void qla2xxx_nvram_wwn_from_ofw(scsi_qla_host_t *vha, nvram_t *nv)
2133 memcpy(nv->port_name, val, WWN_SIZE);
2137 memcpy(nv->node_name, val, WWN_SIZE);
2163 nvram_t *nv = ha->nvram;
2182 DEBUG5(qla2x00_dump_buffer((uint8_t *)nv, ha->nvram_size));
2185 if (chksum || nv->id[0] != 'I' || nv->id[1] != 'S' ||
2186 nv->id[2] != 'P' || nv->id[3] != ' ' || nv->nvram_version < 1) {
2189 "checksum=0x%x id=%c version=0x%x.\n", chksum, nv->id[0],
2190 nv->nvram_version);
2197 memset(nv, 0, ha->nvram_size);
2198 nv->parameter_block_version = ICB_VERSION;
2201 nv->firmware_options[0] = BIT_2 | BIT_1;
2202 nv->firmware_options[1] = BIT_7 | BIT_5;
2203 nv->add_firmware_options[0] = BIT_5;
2204 nv->add_firmware_options[1] = BIT_5 | BIT_4;
2205 nv->frame_payload_size = __constant_cpu_to_le16(2048);
2206 nv->special_options[1] = BIT_7;
2208 nv->firmware_options[0] = BIT_2 | BIT_1;
2209 nv->firmware_options[1] = BIT_7 | BIT_5;
2210 nv->add_firmware_options[0] = BIT_5;
2211 nv->add_firmware_options[1] = BIT_5 | BIT_4;
2212 nv->frame_payload_size = __constant_cpu_to_le16(1024);
2214 nv->firmware_options[0] = BIT_3 | BIT_1;
2215 nv->firmware_options[1] = BIT_5;
2216 nv->frame_payload_size = __constant_cpu_to_le16(1024);
2219 nv->max_iocb_allocation = __constant_cpu_to_le16(256);
2220 nv->execution_throttle = __constant_cpu_to_le16(16);
2221 nv->retry_count = 8;
2222 nv->retry_delay = 1;
2224 nv->port_name[0] = 33;
2225 nv->port_name[3] = 224;
2226 nv->port_name[4] = 139;
2228 qla2xxx_nvram_wwn_from_ofw(vha, nv);
2230 nv->login_timeout = 4;
2235 nv->host_p[1] = BIT_2;
2236 nv->reset_delay = 5;
2237 nv->port_down_retry_count = 8;
2238 nv->max_luns_per_target = __constant_cpu_to_le16(8);
2239 nv->link_down_timeout = 60;
2252 nv->frame_payload_size = __constant_cpu_to_le16(2048);
2254 nv->special_options[1] = BIT_7;
2264 nv->firmware_options[0] |= (BIT_6 | BIT_1);
2265 nv->firmware_options[0] &= ~(BIT_5 | BIT_4);
2266 nv->firmware_options[1] |= (BIT_5 | BIT_0);
2267 nv->firmware_options[1] &= ~BIT_4;
2270 nv->firmware_options[0] |= BIT_2;
2271 nv->firmware_options[0] &= ~BIT_3;
2272 nv->firmware_options[0] &= ~BIT_6;
2273 nv->add_firmware_options[1] |= BIT_5 | BIT_4;
2282 qla2x00_set_model_info(vha, nv->model_number,
2283 sizeof(nv->model_number), "QLA23xx");
2286 nv->firmware_options[0] |= BIT_2;
2291 if ((nv->add_firmware_options[0] & (BIT_6 | BIT_5 | BIT_4)) ==
2294 nv->add_firmware_options[0] &= ~(BIT_6 | BIT_5 | BIT_4);
2295 nv->add_firmware_options[0] |= BIT_5;
2306 dptr2 = (uint8_t *)&nv->parameter_block_version;
2318 if (nv->host_p[1] & BIT_7) {
2319 memcpy(icb->node_name, nv->alternate_node_name, WWN_SIZE);
2320 memcpy(icb->port_name, nv->alternate_port_name, WWN_SIZE);
2336 if (nv->host_p[0] & BIT_7)
2338 ha->flags.disable_risc_code_load = ((nv->host_p[0] & BIT_4) ? 1 : 0);
2342 ha->flags.enable_lip_reset = ((nv->host_p[1] & BIT_1) ? 1 : 0);
2343 ha->flags.enable_lip_full_login = ((nv->host_p[1] & BIT_2) ? 1 : 0);
2344 ha->flags.enable_target_reset = ((nv->host_p[1] & BIT_3) ? 1 : 0);
2345 ha->flags.enable_led_scheme = (nv->special_options[1] & BIT_4) ? 1 : 0;
2351 memcpy(ha->fw_seriallink_options, nv->seriallink_options,
2363 ha->retry_count = nv->retry_count;
2366 if (nv->login_timeout != ql2xlogintimeout)
2367 nv->login_timeout = ql2xlogintimeout;
2368 if (nv->login_timeout < 4)
2369 nv->login_timeout = 4;
2370 ha->login_timeout = nv->login_timeout;
2371 icb->login_timeout = nv->login_timeout;
2376 ha->loop_reset_delay = nv->reset_delay;
2388 if (nv->link_down_timeout == 0) {
2392 ha->link_down_timeout = nv->link_down_timeout;
2400 ha->port_down_retry_count = nv->port_down_retry_count;
2404 ha->login_retry_count = nv->retry_count;
2405 if (ha->port_down_retry_count == nv->port_down_retry_count &&
4203 struct nvram_24xx *nv)
4214 memcpy(nv->port_name, val, WWN_SIZE);
4218 memcpy(nv->node_name, val, WWN_SIZE);
4227 struct nvram_24xx *nv;
4236 nv = ha->nvram;
4257 dptr = (uint32_t *)nv;
4264 DEBUG5(qla2x00_dump_buffer((uint8_t *)nv, ha->nvram_size));
4267 if (chksum || nv->id[0] != 'I' || nv->id[1] != 'S' || nv->id[2] != 'P'
4268 || nv->id[3] != ' ' ||
4269 nv->nvram_version < __constant_cpu_to_le16(ICB_VERSION)) {
4272 "checksum=0x%x id=%c version=0x%x.\n", chksum, nv->id[0],
4273 le16_to_cpu(nv->nvram_version));
4280 memset(nv, 0, ha->nvram_size);
4281 nv->nvram_version = __constant_cpu_to_le16(ICB_VERSION);
4282 nv->version = __constant_cpu_to_le16(ICB_VERSION);
4283 nv->frame_payload_size = __constant_cpu_to_le16(2048);
4284 nv->execution_throttle = __constant_cpu_to_le16(0xFFFF);
4285 nv->exchange_count = __constant_cpu_to_le16(0);
4286 nv->hard_address = __constant_cpu_to_le16(124);
4287 nv->port_name[0] = 0x21;
4288 nv->port_name[1] = 0x00 + ha->port_no;
4289 nv->port_name[2] = 0x00;
4290 nv->port_name[3] = 0xe0;
4291 nv->port_name[4] = 0x8b;
4292 nv->port_name[5] = 0x1c;
4293 nv->port_name[6] = 0x55;
4294 nv->port_name[7] = 0x86;
4295 nv->node_name[0] = 0x20;
4296 nv->node_name[1] = 0x00;
4297 nv->node_name[2] = 0x00;
4298 nv->node_name[3] = 0xe0;
4299 nv->node_name[4] = 0x8b;
4300 nv->node_name[5] = 0x1c;
4301 nv->node_name[6] = 0x55;
4302 nv->node_name[7] = 0x86;
4303 qla24xx_nvram_wwn_from_ofw(vha, nv);
4304 nv->login_retry_count = __constant_cpu_to_le16(8);
4305 nv->interrupt_delay_timer = __constant_cpu_to_le16(0);
4306 nv->login_timeout = __constant_cpu_to_le16(0);
4307 nv->firmware_options_1 =
4309 nv->firmware_options_2 = __constant_cpu_to_le32(2 << 4);
4310 nv->firmware_options_2 |= __constant_cpu_to_le32(BIT_12);
4311 nv->firmware_options_3 = __constant_cpu_to_le32(2 << 13);
4312 nv->host_p = __constant_cpu_to_le32(BIT_11|BIT_10);
4313 nv->efi_parameters = __constant_cpu_to_le32(0);
4314 nv->reset_delay = 5;
4315 nv->max_luns_per_target = __constant_cpu_to_le16(128);
4316 nv->port_down_retry_count = __constant_cpu_to_le16(30);
4317 nv->link_down_timeout = __constant_cpu_to_le16(30);
4327 dptr2 = (uint8_t *)&nv->version;
4332 icb->login_retry_count = nv->login_retry_count;
4333 icb->link_down_on_nos = nv->link_down_on_nos;
4337 dptr2 = (uint8_t *)&nv->interrupt_delay_timer;
4346 qla2x00_set_model_info(vha, nv->model_name, sizeof(nv->model_name),
4350 if (nv->host_p & __constant_cpu_to_le32(BIT_15)) {
4351 memcpy(icb->node_name, nv->alternate_node_name, WWN_SIZE);
4352 memcpy(icb->port_name, nv->alternate_port_name, WWN_SIZE);
4369 le32_to_cpu(nv->host_p) & BIT_10 ? 1: 0;
4371 le32_to_cpu(nv->host_p) & BIT_11 ? 1: 0;
4373 ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1: 0;
4378 memcpy(ha->fw_seriallink_options24, nv->seriallink_options,
4390 ha->retry_count = le16_to_cpu(nv->login_retry_count);
4393 if (le16_to_cpu(nv->login_timeout) < ql2xlogintimeout)
4394 nv->login_timeout = cpu_to_le16(ql2xlogintimeout);
4395 if (le16_to_cpu(nv->login_timeout) < 4)
4396 nv->login_timeout = __constant_cpu_to_le16(4);
4397 ha->login_timeout = le16_to_cpu(nv->login_timeout);
4398 icb->login_timeout = nv->login_timeout;
4403 ha->loop_reset_delay = nv->reset_delay;
4415 if (le16_to_cpu(nv->link_down_timeout) == 0) {
4419 ha->link_down_timeout = le16_to_cpu(nv->link_down_timeout);
4425 ha->port_down_retry_count = le16_to_cpu(nv->port_down_retry_count);
4430 ha->login_retry_count = le16_to_cpu(nv->login_retry_count);
4432 le16_to_cpu(nv->port_down_retry_count) &&
4985 struct nvram_81xx *nv;
4994 nv = ha->nvram;
5008 dptr = (uint32_t *)nv;
5013 DEBUG5(qla2x00_dump_buffer((uint8_t *)nv, ha->nvram_size));
5016 if (chksum || nv->id[0] != 'I' || nv->id[1] != 'S' || nv->id[2] != 'P'
5017 || nv->id[3] != ' ' ||
5018 nv->nvram_version < __constant_cpu_to_le16(ICB_VERSION)) {
5021 "checksum=0x%x id=%c version=0x%x.\n", chksum, nv->id[0],
5022 le16_to_cpu(nv->nvram_version));
5029 memset(nv, 0, ha->nvram_size);
5030 nv->nvram_version = __constant_cpu_to_le16(ICB_VERSION);
5031 nv->version = __constant_cpu_to_le16(ICB_VERSION);
5032 nv->frame_payload_size = __constant_cpu_to_le16(2048);
5033 nv->execution_throttle = __constant_cpu_to_le16(0xFFFF);
5034 nv->exchange_count = __constant_cpu_to_le16(0);
5035 nv->port_name[0] = 0x21;
5036 nv->port_name[1] = 0x00 + ha->port_no;
5037 nv->port_name[2] = 0x00;
5038 nv->port_name[3] = 0xe0;
5039 nv->port_name[4] = 0x8b;
5040 nv->port_name[5] = 0x1c;
5041 nv->port_name[6] = 0x55;
5042 nv->port_name[7] = 0x86;
5043 nv->node_name[0] = 0x20;
5044 nv->node_name[1] = 0x00;
5045 nv->node_name[2] = 0x00;
5046 nv->node_name[3] = 0xe0;
5047 nv->node_name[4] = 0x8b;
5048 nv->node_name[5] = 0x1c;
5049 nv->node_name[6] = 0x55;
5050 nv->node_name[7] = 0x86;
5051 nv->login_retry_count = __constant_cpu_to_le16(8);
5052 nv->interrupt_delay_timer = __constant_cpu_to_le16(0);
5053 nv->login_timeout = __constant_cpu_to_le16(0);
5054 nv->firmware_options_1 =
5056 nv->firmware_options_2 = __constant_cpu_to_le32(2 << 4);
5057 nv->firmware_options_2 |= __constant_cpu_to_le32(BIT_12);
5058 nv->firmware_options_3 = __constant_cpu_to_le32(2 << 13);
5059 nv->host_p = __constant_cpu_to_le32(BIT_11|BIT_10);
5060 nv->efi_parameters = __constant_cpu_to_le32(0);
5061 nv->reset_delay = 5;
5062 nv->max_luns_per_target = __constant_cpu_to_le16(128);
5063 nv->port_down_retry_count = __constant_cpu_to_le16(30);
5064 nv->link_down_timeout = __constant_cpu_to_le16(30);
5065 nv->enode_mac[0] = 0x00;
5066 nv->enode_mac[1] = 0x02;
5067 nv->enode_mac[2] = 0x03;
5068 nv->enode_mac[3] = 0x04;
5069 nv->enode_mac[4] = 0x05;
5070 nv->enode_mac[5] = 0x06 + ha->port_no;
5080 dptr2 = (uint8_t *)&nv->version;
5085 icb->login_retry_count = nv->login_retry_count;
5089 dptr2 = (uint8_t *)&nv->interrupt_delay_timer;
5095 memcpy(icb->enode_mac, nv->enode_mac, sizeof(icb->enode_mac));
5107 memcpy(ha->ex_init_cb, &nv->ex_version, sizeof(*ha->ex_init_cb));
5112 qla2x00_set_model_info(vha, nv->model_name, sizeof(nv->model_name),
5116 if (nv->host_p & __constant_cpu_to_le32(BIT_15)) {
5117 memcpy(icb->node_name, nv->alternate_node_name, WWN_SIZE);
5118 memcpy(icb->port_name, nv->alternate_port_name, WWN_SIZE);
5135 le32_to_cpu(nv->host_p) & BIT_10 ? 1: 0;
5137 le32_to_cpu(nv->host_p) & BIT_11 ? 1: 0;
5139 ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1: 0;
5153 ha->retry_count = le16_to_cpu(nv->login_retry_count);
5156 if (le16_to_cpu(nv->login_timeout) < ql2xlogintimeout)
5157 nv->login_timeout = cpu_to_le16(ql2xlogintimeout);
5158 if (le16_to_cpu(nv->login_timeout) < 4)
5159 nv->login_timeout = __constant_cpu_to_le16(4);
5160 ha->login_timeout = le16_to_cpu(nv->login_timeout);
5161 icb->login_timeout = nv->login_timeout;
5166 ha->loop_reset_delay = nv->reset_delay;
5178 if (le16_to_cpu(nv->link_down_timeout) == 0) {
5182 ha->link_down_timeout = le16_to_cpu(nv->link_down_timeout);
5188 ha->port_down_retry_count = le16_to_cpu(nv->port_down_retry_count);
5193 ha->login_retry_count = le16_to_cpu(nv->login_retry_count);
5195 le16_to_cpu(nv->port_down_retry_count) &&