• Home
  • Raw
  • Download

Lines Matching refs:nv

3661 	struct nvram_81xx *nv = ha->nvram;  in qla24xx_detect_sfp()  local
3671 (nv->enhanced_features & NEF_LR_DIST_ENABLE)) { in qla24xx_detect_sfp()
3675 (nv->enhanced_features >> LR_DIST_NV_POS) in qla24xx_detect_sfp()
4631 static void qla2xxx_nvram_wwn_from_ofw(scsi_qla_host_t *vha, nvram_t *nv) in qla2xxx_nvram_wwn_from_ofw() argument
4642 memcpy(nv->port_name, val, WWN_SIZE); in qla2xxx_nvram_wwn_from_ofw()
4646 memcpy(nv->node_name, val, WWN_SIZE); in qla2xxx_nvram_wwn_from_ofw()
4672 nvram_t *nv = ha->nvram; in qla2x00_nvram_config() local
4679 ha->nvram_size = sizeof(*nv); in qla2x00_nvram_config()
4693 nv, ha->nvram_size); in qla2x00_nvram_config()
4696 if (chksum || memcmp("ISP ", nv->id, sizeof(nv->id)) || in qla2x00_nvram_config()
4697 nv->nvram_version < 1) { in qla2x00_nvram_config()
4701 chksum, nv->id, nv->nvram_version); in qla2x00_nvram_config()
4709 memset(nv, 0, ha->nvram_size); in qla2x00_nvram_config()
4710 nv->parameter_block_version = ICB_VERSION; in qla2x00_nvram_config()
4713 nv->firmware_options[0] = BIT_2 | BIT_1; in qla2x00_nvram_config()
4714 nv->firmware_options[1] = BIT_7 | BIT_5; in qla2x00_nvram_config()
4715 nv->add_firmware_options[0] = BIT_5; in qla2x00_nvram_config()
4716 nv->add_firmware_options[1] = BIT_5 | BIT_4; in qla2x00_nvram_config()
4717 nv->frame_payload_size = cpu_to_le16(2048); in qla2x00_nvram_config()
4718 nv->special_options[1] = BIT_7; in qla2x00_nvram_config()
4720 nv->firmware_options[0] = BIT_2 | BIT_1; in qla2x00_nvram_config()
4721 nv->firmware_options[1] = BIT_7 | BIT_5; in qla2x00_nvram_config()
4722 nv->add_firmware_options[0] = BIT_5; in qla2x00_nvram_config()
4723 nv->add_firmware_options[1] = BIT_5 | BIT_4; in qla2x00_nvram_config()
4724 nv->frame_payload_size = cpu_to_le16(1024); in qla2x00_nvram_config()
4726 nv->firmware_options[0] = BIT_3 | BIT_1; in qla2x00_nvram_config()
4727 nv->firmware_options[1] = BIT_5; in qla2x00_nvram_config()
4728 nv->frame_payload_size = cpu_to_le16(1024); in qla2x00_nvram_config()
4731 nv->max_iocb_allocation = cpu_to_le16(256); in qla2x00_nvram_config()
4732 nv->execution_throttle = cpu_to_le16(16); in qla2x00_nvram_config()
4733 nv->retry_count = 8; in qla2x00_nvram_config()
4734 nv->retry_delay = 1; in qla2x00_nvram_config()
4736 nv->port_name[0] = 33; in qla2x00_nvram_config()
4737 nv->port_name[3] = 224; in qla2x00_nvram_config()
4738 nv->port_name[4] = 139; in qla2x00_nvram_config()
4740 qla2xxx_nvram_wwn_from_ofw(vha, nv); in qla2x00_nvram_config()
4742 nv->login_timeout = 4; in qla2x00_nvram_config()
4747 nv->host_p[1] = BIT_2; in qla2x00_nvram_config()
4748 nv->reset_delay = 5; in qla2x00_nvram_config()
4749 nv->port_down_retry_count = 8; in qla2x00_nvram_config()
4750 nv->max_luns_per_target = cpu_to_le16(8); in qla2x00_nvram_config()
4751 nv->link_down_timeout = 60; in qla2x00_nvram_config()
4762 nv->firmware_options[0] |= (BIT_6 | BIT_1); in qla2x00_nvram_config()
4763 nv->firmware_options[0] &= ~(BIT_5 | BIT_4); in qla2x00_nvram_config()
4764 nv->firmware_options[1] |= (BIT_5 | BIT_0); in qla2x00_nvram_config()
4765 nv->firmware_options[1] &= ~BIT_4; in qla2x00_nvram_config()
4768 nv->firmware_options[0] |= BIT_2; in qla2x00_nvram_config()
4769 nv->firmware_options[0] &= ~BIT_3; in qla2x00_nvram_config()
4770 nv->special_options[0] &= ~BIT_6; in qla2x00_nvram_config()
4771 nv->add_firmware_options[1] |= BIT_5 | BIT_4; in qla2x00_nvram_config()
4780 qla2x00_set_model_info(vha, nv->model_number, in qla2x00_nvram_config()
4781 sizeof(nv->model_number), "QLA23xx"); in qla2x00_nvram_config()
4784 nv->firmware_options[0] |= BIT_2; in qla2x00_nvram_config()
4789 if ((nv->add_firmware_options[0] & (BIT_6 | BIT_5 | BIT_4)) == in qla2x00_nvram_config()
4792 nv->add_firmware_options[0] &= ~(BIT_6 | BIT_5 | BIT_4); in qla2x00_nvram_config()
4793 nv->add_firmware_options[0] |= BIT_5; in qla2x00_nvram_config()
4804 dptr2 = (uint8_t *)&nv->parameter_block_version; in qla2x00_nvram_config()
4816 if (nv->host_p[1] & BIT_7) { in qla2x00_nvram_config()
4817 memcpy(icb->node_name, nv->alternate_node_name, WWN_SIZE); in qla2x00_nvram_config()
4818 memcpy(icb->port_name, nv->alternate_port_name, WWN_SIZE); in qla2x00_nvram_config()
4839 if (nv->host_p[0] & BIT_7) in qla2x00_nvram_config()
4841 ha->flags.disable_risc_code_load = ((nv->host_p[0] & BIT_4) ? 1 : 0); in qla2x00_nvram_config()
4845 ha->flags.enable_lip_reset = ((nv->host_p[1] & BIT_1) ? 1 : 0); in qla2x00_nvram_config()
4846 ha->flags.enable_lip_full_login = ((nv->host_p[1] & BIT_2) ? 1 : 0); in qla2x00_nvram_config()
4847 ha->flags.enable_target_reset = ((nv->host_p[1] & BIT_3) ? 1 : 0); in qla2x00_nvram_config()
4848 ha->flags.enable_led_scheme = (nv->special_options[1] & BIT_4) ? 1 : 0; in qla2x00_nvram_config()
4854 memcpy(ha->fw_seriallink_options, nv->seriallink_options, in qla2x00_nvram_config()
4866 ha->retry_count = nv->retry_count; in qla2x00_nvram_config()
4869 if (nv->login_timeout != ql2xlogintimeout) in qla2x00_nvram_config()
4870 nv->login_timeout = ql2xlogintimeout; in qla2x00_nvram_config()
4871 if (nv->login_timeout < 4) in qla2x00_nvram_config()
4872 nv->login_timeout = 4; in qla2x00_nvram_config()
4873 ha->login_timeout = nv->login_timeout; in qla2x00_nvram_config()
4878 ha->loop_reset_delay = nv->reset_delay; in qla2x00_nvram_config()
4890 if (nv->link_down_timeout == 0) { in qla2x00_nvram_config()
4894 ha->link_down_timeout = nv->link_down_timeout; in qla2x00_nvram_config()
4902 ha->port_down_retry_count = nv->port_down_retry_count; in qla2x00_nvram_config()
4906 ha->login_retry_count = nv->retry_count; in qla2x00_nvram_config()
4907 if (ha->port_down_retry_count == nv->port_down_retry_count && in qla2x00_nvram_config()
7252 struct nvram_24xx *nv) in qla24xx_nvram_wwn_from_ofw() argument
7263 memcpy(nv->port_name, val, WWN_SIZE); in qla24xx_nvram_wwn_from_ofw()
7267 memcpy(nv->node_name, val, WWN_SIZE); in qla24xx_nvram_wwn_from_ofw()
7276 struct nvram_24xx *nv; in qla24xx_nvram_config() local
7285 nv = ha->nvram; in qla24xx_nvram_config()
7296 ha->nvram_size = sizeof(*nv); in qla24xx_nvram_config()
7305 dptr = (__force __le32 *)nv; in qla24xx_nvram_config()
7313 nv, ha->nvram_size); in qla24xx_nvram_config()
7316 if (chksum || memcmp("ISP ", nv->id, sizeof(nv->id)) || in qla24xx_nvram_config()
7317 le16_to_cpu(nv->nvram_version) < ICB_VERSION) { in qla24xx_nvram_config()
7321 chksum, nv->id, nv->nvram_version); in qla24xx_nvram_config()
7322 ql_dump_buffer(ql_dbg_init, vha, 0x006b, nv, sizeof(*nv)); in qla24xx_nvram_config()
7330 memset(nv, 0, ha->nvram_size); in qla24xx_nvram_config()
7331 nv->nvram_version = cpu_to_le16(ICB_VERSION); in qla24xx_nvram_config()
7332 nv->version = cpu_to_le16(ICB_VERSION); in qla24xx_nvram_config()
7333 nv->frame_payload_size = cpu_to_le16(2048); in qla24xx_nvram_config()
7334 nv->execution_throttle = cpu_to_le16(0xFFFF); in qla24xx_nvram_config()
7335 nv->exchange_count = cpu_to_le16(0); in qla24xx_nvram_config()
7336 nv->hard_address = cpu_to_le16(124); in qla24xx_nvram_config()
7337 nv->port_name[0] = 0x21; in qla24xx_nvram_config()
7338 nv->port_name[1] = 0x00 + ha->port_no + 1; in qla24xx_nvram_config()
7339 nv->port_name[2] = 0x00; in qla24xx_nvram_config()
7340 nv->port_name[3] = 0xe0; in qla24xx_nvram_config()
7341 nv->port_name[4] = 0x8b; in qla24xx_nvram_config()
7342 nv->port_name[5] = 0x1c; in qla24xx_nvram_config()
7343 nv->port_name[6] = 0x55; in qla24xx_nvram_config()
7344 nv->port_name[7] = 0x86; in qla24xx_nvram_config()
7345 nv->node_name[0] = 0x20; in qla24xx_nvram_config()
7346 nv->node_name[1] = 0x00; in qla24xx_nvram_config()
7347 nv->node_name[2] = 0x00; in qla24xx_nvram_config()
7348 nv->node_name[3] = 0xe0; in qla24xx_nvram_config()
7349 nv->node_name[4] = 0x8b; in qla24xx_nvram_config()
7350 nv->node_name[5] = 0x1c; in qla24xx_nvram_config()
7351 nv->node_name[6] = 0x55; in qla24xx_nvram_config()
7352 nv->node_name[7] = 0x86; in qla24xx_nvram_config()
7353 qla24xx_nvram_wwn_from_ofw(vha, nv); in qla24xx_nvram_config()
7354 nv->login_retry_count = cpu_to_le16(8); in qla24xx_nvram_config()
7355 nv->interrupt_delay_timer = cpu_to_le16(0); in qla24xx_nvram_config()
7356 nv->login_timeout = cpu_to_le16(0); in qla24xx_nvram_config()
7357 nv->firmware_options_1 = in qla24xx_nvram_config()
7359 nv->firmware_options_2 = cpu_to_le32(2 << 4); in qla24xx_nvram_config()
7360 nv->firmware_options_2 |= cpu_to_le32(BIT_12); in qla24xx_nvram_config()
7361 nv->firmware_options_3 = cpu_to_le32(2 << 13); in qla24xx_nvram_config()
7362 nv->host_p = cpu_to_le32(BIT_11|BIT_10); in qla24xx_nvram_config()
7363 nv->efi_parameters = cpu_to_le32(0); in qla24xx_nvram_config()
7364 nv->reset_delay = 5; in qla24xx_nvram_config()
7365 nv->max_luns_per_target = cpu_to_le16(128); in qla24xx_nvram_config()
7366 nv->port_down_retry_count = cpu_to_le16(30); in qla24xx_nvram_config()
7367 nv->link_down_timeout = cpu_to_le16(30); in qla24xx_nvram_config()
7374 nv->firmware_options_1 &= cpu_to_le32(~BIT_13); in qla24xx_nvram_config()
7376 nv->host_p &= cpu_to_le32(~BIT_10); in qla24xx_nvram_config()
7379 qlt_24xx_config_nvram_stage1(vha, nv); in qla24xx_nvram_config()
7386 dptr2 = (uint8_t *)&nv->version; in qla24xx_nvram_config()
7391 icb->login_retry_count = nv->login_retry_count; in qla24xx_nvram_config()
7392 icb->link_down_on_nos = nv->link_down_on_nos; in qla24xx_nvram_config()
7396 dptr2 = (uint8_t *)&nv->interrupt_delay_timer; in qla24xx_nvram_config()
7405 qla2x00_set_model_info(vha, nv->model_name, sizeof(nv->model_name), in qla24xx_nvram_config()
7410 if (nv->host_p & cpu_to_le32(BIT_15)) { in qla24xx_nvram_config()
7412 memcpy(icb->node_name, nv->alternate_node_name, WWN_SIZE); in qla24xx_nvram_config()
7413 memcpy(icb->port_name, nv->alternate_port_name, WWN_SIZE); in qla24xx_nvram_config()
7430 le32_to_cpu(nv->host_p) & BIT_10 ? 1 : 0; in qla24xx_nvram_config()
7432 le32_to_cpu(nv->host_p) & BIT_11 ? 1 : 0; in qla24xx_nvram_config()
7434 ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1 : 0; in qla24xx_nvram_config()
7439 memcpy(ha->fw_seriallink_options24, nv->seriallink_options, in qla24xx_nvram_config()
7451 ha->retry_count = le16_to_cpu(nv->login_retry_count); in qla24xx_nvram_config()
7454 if (le16_to_cpu(nv->login_timeout) < ql2xlogintimeout) in qla24xx_nvram_config()
7455 nv->login_timeout = cpu_to_le16(ql2xlogintimeout); in qla24xx_nvram_config()
7456 if (le16_to_cpu(nv->login_timeout) < 4) in qla24xx_nvram_config()
7457 nv->login_timeout = cpu_to_le16(4); in qla24xx_nvram_config()
7458 ha->login_timeout = le16_to_cpu(nv->login_timeout); in qla24xx_nvram_config()
7463 ha->loop_reset_delay = nv->reset_delay; in qla24xx_nvram_config()
7475 if (le16_to_cpu(nv->link_down_timeout) == 0) { in qla24xx_nvram_config()
7479 ha->link_down_timeout = le16_to_cpu(nv->link_down_timeout); in qla24xx_nvram_config()
7485 ha->port_down_retry_count = le16_to_cpu(nv->port_down_retry_count); in qla24xx_nvram_config()
7490 ha->login_retry_count = le16_to_cpu(nv->login_retry_count); in qla24xx_nvram_config()
7492 le16_to_cpu(nv->port_down_retry_count) && in qla24xx_nvram_config()
8456 struct nvram_81xx *nv; in qla81xx_nvram_config() local
8467 nv = ha->nvram; in qla81xx_nvram_config()
8470 ha->nvram_size = sizeof(*nv); in qla81xx_nvram_config()
8504 dptr = (__force __le32 *)nv; in qla81xx_nvram_config()
8511 nv, ha->nvram_size); in qla81xx_nvram_config()
8514 if (chksum || memcmp("ISP ", nv->id, sizeof(nv->id)) || in qla81xx_nvram_config()
8515 le16_to_cpu(nv->nvram_version) < ICB_VERSION) { in qla81xx_nvram_config()
8519 chksum, nv->id, le16_to_cpu(nv->nvram_version)); in qla81xx_nvram_config()
8520 ql_dump_buffer(ql_dbg_init, vha, 0x0073, nv, sizeof(*nv)); in qla81xx_nvram_config()
8528 memset(nv, 0, ha->nvram_size); in qla81xx_nvram_config()
8529 nv->nvram_version = cpu_to_le16(ICB_VERSION); in qla81xx_nvram_config()
8530 nv->version = cpu_to_le16(ICB_VERSION); in qla81xx_nvram_config()
8531 nv->frame_payload_size = cpu_to_le16(2048); in qla81xx_nvram_config()
8532 nv->execution_throttle = cpu_to_le16(0xFFFF); in qla81xx_nvram_config()
8533 nv->exchange_count = cpu_to_le16(0); in qla81xx_nvram_config()
8534 nv->port_name[0] = 0x21; in qla81xx_nvram_config()
8535 nv->port_name[1] = 0x00 + ha->port_no + 1; in qla81xx_nvram_config()
8536 nv->port_name[2] = 0x00; in qla81xx_nvram_config()
8537 nv->port_name[3] = 0xe0; in qla81xx_nvram_config()
8538 nv->port_name[4] = 0x8b; in qla81xx_nvram_config()
8539 nv->port_name[5] = 0x1c; in qla81xx_nvram_config()
8540 nv->port_name[6] = 0x55; in qla81xx_nvram_config()
8541 nv->port_name[7] = 0x86; in qla81xx_nvram_config()
8542 nv->node_name[0] = 0x20; in qla81xx_nvram_config()
8543 nv->node_name[1] = 0x00; in qla81xx_nvram_config()
8544 nv->node_name[2] = 0x00; in qla81xx_nvram_config()
8545 nv->node_name[3] = 0xe0; in qla81xx_nvram_config()
8546 nv->node_name[4] = 0x8b; in qla81xx_nvram_config()
8547 nv->node_name[5] = 0x1c; in qla81xx_nvram_config()
8548 nv->node_name[6] = 0x55; in qla81xx_nvram_config()
8549 nv->node_name[7] = 0x86; in qla81xx_nvram_config()
8550 nv->login_retry_count = cpu_to_le16(8); in qla81xx_nvram_config()
8551 nv->interrupt_delay_timer = cpu_to_le16(0); in qla81xx_nvram_config()
8552 nv->login_timeout = cpu_to_le16(0); in qla81xx_nvram_config()
8553 nv->firmware_options_1 = in qla81xx_nvram_config()
8555 nv->firmware_options_2 = cpu_to_le32(2 << 4); in qla81xx_nvram_config()
8556 nv->firmware_options_2 |= cpu_to_le32(BIT_12); in qla81xx_nvram_config()
8557 nv->firmware_options_3 = cpu_to_le32(2 << 13); in qla81xx_nvram_config()
8558 nv->host_p = cpu_to_le32(BIT_11|BIT_10); in qla81xx_nvram_config()
8559 nv->efi_parameters = cpu_to_le32(0); in qla81xx_nvram_config()
8560 nv->reset_delay = 5; in qla81xx_nvram_config()
8561 nv->max_luns_per_target = cpu_to_le16(128); in qla81xx_nvram_config()
8562 nv->port_down_retry_count = cpu_to_le16(30); in qla81xx_nvram_config()
8563 nv->link_down_timeout = cpu_to_le16(180); in qla81xx_nvram_config()
8564 nv->enode_mac[0] = 0x00; in qla81xx_nvram_config()
8565 nv->enode_mac[1] = 0xC0; in qla81xx_nvram_config()
8566 nv->enode_mac[2] = 0xDD; in qla81xx_nvram_config()
8567 nv->enode_mac[3] = 0x04; in qla81xx_nvram_config()
8568 nv->enode_mac[4] = 0x05; in qla81xx_nvram_config()
8569 nv->enode_mac[5] = 0x06 + ha->port_no + 1; in qla81xx_nvram_config()
8575 nv->frame_payload_size &= cpu_to_le16(~7); in qla81xx_nvram_config()
8577 qlt_81xx_config_nvram_stage1(vha, nv); in qla81xx_nvram_config()
8584 dptr2 = (uint8_t *)&nv->version; in qla81xx_nvram_config()
8589 icb->login_retry_count = nv->login_retry_count; in qla81xx_nvram_config()
8593 dptr2 = (uint8_t *)&nv->interrupt_delay_timer; in qla81xx_nvram_config()
8599 memcpy(icb->enode_mac, nv->enode_mac, sizeof(icb->enode_mac)); in qla81xx_nvram_config()
8611 memcpy(ha->ex_init_cb, &nv->ex_version, sizeof(*ha->ex_init_cb)); in qla81xx_nvram_config()
8616 qla2x00_set_model_info(vha, nv->model_name, sizeof(nv->model_name), in qla81xx_nvram_config()
8622 if (nv->host_p & cpu_to_le32(BIT_15)) { in qla81xx_nvram_config()
8623 memcpy(icb->node_name, nv->alternate_node_name, WWN_SIZE); in qla81xx_nvram_config()
8624 memcpy(icb->port_name, nv->alternate_port_name, WWN_SIZE); in qla81xx_nvram_config()
8638 if ((nv->enhanced_features & BIT_7) == 0) in qla81xx_nvram_config()
8646 le32_to_cpu(nv->host_p) & BIT_10 ? 1 : 0; in qla81xx_nvram_config()
8648 le32_to_cpu(nv->host_p) & BIT_11 ? 1 : 0; in qla81xx_nvram_config()
8650 ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1 : 0; in qla81xx_nvram_config()
8664 ha->retry_count = le16_to_cpu(nv->login_retry_count); in qla81xx_nvram_config()
8667 if (le16_to_cpu(nv->login_timeout) < ql2xlogintimeout) in qla81xx_nvram_config()
8668 nv->login_timeout = cpu_to_le16(ql2xlogintimeout); in qla81xx_nvram_config()
8669 if (le16_to_cpu(nv->login_timeout) < 4) in qla81xx_nvram_config()
8670 nv->login_timeout = cpu_to_le16(4); in qla81xx_nvram_config()
8671 ha->login_timeout = le16_to_cpu(nv->login_timeout); in qla81xx_nvram_config()
8676 ha->loop_reset_delay = nv->reset_delay; in qla81xx_nvram_config()
8688 if (le16_to_cpu(nv->link_down_timeout) == 0) { in qla81xx_nvram_config()
8692 ha->link_down_timeout = le16_to_cpu(nv->link_down_timeout); in qla81xx_nvram_config()
8698 ha->port_down_retry_count = le16_to_cpu(nv->port_down_retry_count); in qla81xx_nvram_config()
8703 ha->login_retry_count = le16_to_cpu(nv->login_retry_count); in qla81xx_nvram_config()
8705 le16_to_cpu(nv->port_down_retry_count) && in qla81xx_nvram_config()