Lines Matching full:nv
3878 struct nvram_81xx *nv = ha->nvram; in qla24xx_detect_sfp() local
3888 (nv->enhanced_features & NEF_LR_DIST_ENABLE)) { in qla24xx_detect_sfp()
3892 (nv->enhanced_features >> LR_DIST_NV_POS) in qla24xx_detect_sfp()
4875 static void qla2xxx_nvram_wwn_from_ofw(scsi_qla_host_t *vha, nvram_t *nv) in qla2xxx_nvram_wwn_from_ofw() argument
4886 memcpy(nv->port_name, val, WWN_SIZE); in qla2xxx_nvram_wwn_from_ofw()
4890 memcpy(nv->node_name, val, WWN_SIZE); in qla2xxx_nvram_wwn_from_ofw()
4916 nvram_t *nv = ha->nvram; in qla2x00_nvram_config() local
4923 ha->nvram_size = sizeof(*nv); in qla2x00_nvram_config()
4937 nv, ha->nvram_size); in qla2x00_nvram_config()
4940 if (chksum || memcmp("ISP ", nv->id, sizeof(nv->id)) || in qla2x00_nvram_config()
4941 nv->nvram_version < 1) { in qla2x00_nvram_config()
4945 chksum, nv->id, nv->nvram_version); in qla2x00_nvram_config()
4953 memset(nv, 0, ha->nvram_size); in qla2x00_nvram_config()
4954 nv->parameter_block_version = ICB_VERSION; in qla2x00_nvram_config()
4957 nv->firmware_options[0] = BIT_2 | BIT_1; in qla2x00_nvram_config()
4958 nv->firmware_options[1] = BIT_7 | BIT_5; in qla2x00_nvram_config()
4959 nv->add_firmware_options[0] = BIT_5; in qla2x00_nvram_config()
4960 nv->add_firmware_options[1] = BIT_5 | BIT_4; in qla2x00_nvram_config()
4961 nv->frame_payload_size = cpu_to_le16(2048); in qla2x00_nvram_config()
4962 nv->special_options[1] = BIT_7; in qla2x00_nvram_config()
4964 nv->firmware_options[0] = BIT_2 | BIT_1; in qla2x00_nvram_config()
4965 nv->firmware_options[1] = BIT_7 | BIT_5; in qla2x00_nvram_config()
4966 nv->add_firmware_options[0] = BIT_5; in qla2x00_nvram_config()
4967 nv->add_firmware_options[1] = BIT_5 | BIT_4; in qla2x00_nvram_config()
4968 nv->frame_payload_size = cpu_to_le16(1024); in qla2x00_nvram_config()
4970 nv->firmware_options[0] = BIT_3 | BIT_1; in qla2x00_nvram_config()
4971 nv->firmware_options[1] = BIT_5; in qla2x00_nvram_config()
4972 nv->frame_payload_size = cpu_to_le16(1024); in qla2x00_nvram_config()
4975 nv->max_iocb_allocation = cpu_to_le16(256); in qla2x00_nvram_config()
4976 nv->execution_throttle = cpu_to_le16(16); in qla2x00_nvram_config()
4977 nv->retry_count = 8; in qla2x00_nvram_config()
4978 nv->retry_delay = 1; in qla2x00_nvram_config()
4980 nv->port_name[0] = 33; in qla2x00_nvram_config()
4981 nv->port_name[3] = 224; in qla2x00_nvram_config()
4982 nv->port_name[4] = 139; in qla2x00_nvram_config()
4984 qla2xxx_nvram_wwn_from_ofw(vha, nv); in qla2x00_nvram_config()
4986 nv->login_timeout = 4; in qla2x00_nvram_config()
4991 nv->host_p[1] = BIT_2; in qla2x00_nvram_config()
4992 nv->reset_delay = 5; in qla2x00_nvram_config()
4993 nv->port_down_retry_count = 8; in qla2x00_nvram_config()
4994 nv->max_luns_per_target = cpu_to_le16(8); in qla2x00_nvram_config()
4995 nv->link_down_timeout = 60; in qla2x00_nvram_config()
5006 nv->firmware_options[0] |= (BIT_6 | BIT_1); in qla2x00_nvram_config()
5007 nv->firmware_options[0] &= ~(BIT_5 | BIT_4); in qla2x00_nvram_config()
5008 nv->firmware_options[1] |= (BIT_5 | BIT_0); in qla2x00_nvram_config()
5009 nv->firmware_options[1] &= ~BIT_4; in qla2x00_nvram_config()
5012 nv->firmware_options[0] |= BIT_2; in qla2x00_nvram_config()
5013 nv->firmware_options[0] &= ~BIT_3; in qla2x00_nvram_config()
5014 nv->special_options[0] &= ~BIT_6; in qla2x00_nvram_config()
5015 nv->add_firmware_options[1] |= BIT_5 | BIT_4; in qla2x00_nvram_config()
5024 qla2x00_set_model_info(vha, nv->model_number, in qla2x00_nvram_config()
5025 sizeof(nv->model_number), "QLA23xx"); in qla2x00_nvram_config()
5028 nv->firmware_options[0] |= BIT_2; in qla2x00_nvram_config()
5033 if ((nv->add_firmware_options[0] & (BIT_6 | BIT_5 | BIT_4)) == in qla2x00_nvram_config()
5036 nv->add_firmware_options[0] &= ~(BIT_6 | BIT_5 | BIT_4); in qla2x00_nvram_config()
5037 nv->add_firmware_options[0] |= BIT_5; in qla2x00_nvram_config()
5048 dptr2 = (uint8_t *)&nv->parameter_block_version; in qla2x00_nvram_config()
5060 if (nv->host_p[1] & BIT_7) { in qla2x00_nvram_config()
5061 memcpy(icb->node_name, nv->alternate_node_name, WWN_SIZE); in qla2x00_nvram_config()
5062 memcpy(icb->port_name, nv->alternate_port_name, WWN_SIZE); in qla2x00_nvram_config()
5083 if (nv->host_p[0] & BIT_7) in qla2x00_nvram_config()
5085 ha->flags.disable_risc_code_load = ((nv->host_p[0] & BIT_4) ? 1 : 0); in qla2x00_nvram_config()
5089 ha->flags.enable_lip_reset = ((nv->host_p[1] & BIT_1) ? 1 : 0); in qla2x00_nvram_config()
5090 ha->flags.enable_lip_full_login = ((nv->host_p[1] & BIT_2) ? 1 : 0); in qla2x00_nvram_config()
5091 ha->flags.enable_target_reset = ((nv->host_p[1] & BIT_3) ? 1 : 0); in qla2x00_nvram_config()
5092 ha->flags.enable_led_scheme = (nv->special_options[1] & BIT_4) ? 1 : 0; in qla2x00_nvram_config()
5098 memcpy(ha->fw_seriallink_options, nv->seriallink_options, in qla2x00_nvram_config()
5110 ha->retry_count = nv->retry_count; in qla2x00_nvram_config()
5113 if (nv->login_timeout != ql2xlogintimeout) in qla2x00_nvram_config()
5114 nv->login_timeout = ql2xlogintimeout; in qla2x00_nvram_config()
5115 if (nv->login_timeout < 4) in qla2x00_nvram_config()
5116 nv->login_timeout = 4; in qla2x00_nvram_config()
5117 ha->login_timeout = nv->login_timeout; in qla2x00_nvram_config()
5122 ha->loop_reset_delay = nv->reset_delay; in qla2x00_nvram_config()
5134 if (nv->link_down_timeout == 0) { in qla2x00_nvram_config()
5138 ha->link_down_timeout = nv->link_down_timeout; in qla2x00_nvram_config()
5146 ha->port_down_retry_count = nv->port_down_retry_count; in qla2x00_nvram_config()
5150 ha->login_retry_count = nv->retry_count; in qla2x00_nvram_config()
5151 if (ha->port_down_retry_count == nv->port_down_retry_count && in qla2x00_nvram_config()
7587 struct nvram_24xx *nv) in qla24xx_nvram_wwn_from_ofw() argument
7598 memcpy(nv->port_name, val, WWN_SIZE); in qla24xx_nvram_wwn_from_ofw()
7602 memcpy(nv->node_name, val, WWN_SIZE); in qla24xx_nvram_wwn_from_ofw()
7611 struct nvram_24xx *nv; in qla24xx_nvram_config() local
7620 nv = ha->nvram; in qla24xx_nvram_config()
7631 ha->nvram_size = sizeof(*nv); in qla24xx_nvram_config()
7640 dptr = (__force __le32 *)nv; in qla24xx_nvram_config()
7648 nv, ha->nvram_size); in qla24xx_nvram_config()
7651 if (chksum || memcmp("ISP ", nv->id, sizeof(nv->id)) || in qla24xx_nvram_config()
7652 le16_to_cpu(nv->nvram_version) < ICB_VERSION) { in qla24xx_nvram_config()
7656 chksum, nv->id, nv->nvram_version); in qla24xx_nvram_config()
7657 ql_dump_buffer(ql_dbg_init, vha, 0x006b, nv, sizeof(*nv)); in qla24xx_nvram_config()
7665 memset(nv, 0, ha->nvram_size); in qla24xx_nvram_config()
7666 nv->nvram_version = cpu_to_le16(ICB_VERSION); in qla24xx_nvram_config()
7667 nv->version = cpu_to_le16(ICB_VERSION); in qla24xx_nvram_config()
7668 nv->frame_payload_size = cpu_to_le16(2048); in qla24xx_nvram_config()
7669 nv->execution_throttle = cpu_to_le16(0xFFFF); in qla24xx_nvram_config()
7670 nv->exchange_count = cpu_to_le16(0); in qla24xx_nvram_config()
7671 nv->hard_address = cpu_to_le16(124); in qla24xx_nvram_config()
7672 nv->port_name[0] = 0x21; in qla24xx_nvram_config()
7673 nv->port_name[1] = 0x00 + ha->port_no + 1; in qla24xx_nvram_config()
7674 nv->port_name[2] = 0x00; in qla24xx_nvram_config()
7675 nv->port_name[3] = 0xe0; in qla24xx_nvram_config()
7676 nv->port_name[4] = 0x8b; in qla24xx_nvram_config()
7677 nv->port_name[5] = 0x1c; in qla24xx_nvram_config()
7678 nv->port_name[6] = 0x55; in qla24xx_nvram_config()
7679 nv->port_name[7] = 0x86; in qla24xx_nvram_config()
7680 nv->node_name[0] = 0x20; in qla24xx_nvram_config()
7681 nv->node_name[1] = 0x00; in qla24xx_nvram_config()
7682 nv->node_name[2] = 0x00; in qla24xx_nvram_config()
7683 nv->node_name[3] = 0xe0; in qla24xx_nvram_config()
7684 nv->node_name[4] = 0x8b; in qla24xx_nvram_config()
7685 nv->node_name[5] = 0x1c; in qla24xx_nvram_config()
7686 nv->node_name[6] = 0x55; in qla24xx_nvram_config()
7687 nv->node_name[7] = 0x86; in qla24xx_nvram_config()
7688 qla24xx_nvram_wwn_from_ofw(vha, nv); in qla24xx_nvram_config()
7689 nv->login_retry_count = cpu_to_le16(8); in qla24xx_nvram_config()
7690 nv->interrupt_delay_timer = cpu_to_le16(0); in qla24xx_nvram_config()
7691 nv->login_timeout = cpu_to_le16(0); in qla24xx_nvram_config()
7692 nv->firmware_options_1 = in qla24xx_nvram_config()
7694 nv->firmware_options_2 = cpu_to_le32(2 << 4); in qla24xx_nvram_config()
7695 nv->firmware_options_2 |= cpu_to_le32(BIT_12); in qla24xx_nvram_config()
7696 nv->firmware_options_3 = cpu_to_le32(2 << 13); in qla24xx_nvram_config()
7697 nv->host_p = cpu_to_le32(BIT_11|BIT_10); in qla24xx_nvram_config()
7698 nv->efi_parameters = cpu_to_le32(0); in qla24xx_nvram_config()
7699 nv->reset_delay = 5; in qla24xx_nvram_config()
7700 nv->max_luns_per_target = cpu_to_le16(128); in qla24xx_nvram_config()
7701 nv->port_down_retry_count = cpu_to_le16(30); in qla24xx_nvram_config()
7702 nv->link_down_timeout = cpu_to_le16(30); in qla24xx_nvram_config()
7709 nv->firmware_options_1 &= cpu_to_le32(~BIT_13); in qla24xx_nvram_config()
7711 nv->host_p &= cpu_to_le32(~BIT_10); in qla24xx_nvram_config()
7714 qlt_24xx_config_nvram_stage1(vha, nv); in qla24xx_nvram_config()
7721 dptr2 = (uint8_t *)&nv->version; in qla24xx_nvram_config()
7726 icb->login_retry_count = nv->login_retry_count; in qla24xx_nvram_config()
7727 icb->link_down_on_nos = nv->link_down_on_nos; in qla24xx_nvram_config()
7731 dptr2 = (uint8_t *)&nv->interrupt_delay_timer; in qla24xx_nvram_config()
7740 qla2x00_set_model_info(vha, nv->model_name, sizeof(nv->model_name), in qla24xx_nvram_config()
7745 if (nv->host_p & cpu_to_le32(BIT_15)) { in qla24xx_nvram_config()
7747 memcpy(icb->node_name, nv->alternate_node_name, WWN_SIZE); in qla24xx_nvram_config()
7748 memcpy(icb->port_name, nv->alternate_port_name, WWN_SIZE); in qla24xx_nvram_config()
7765 le32_to_cpu(nv->host_p) & BIT_10 ? 1 : 0; in qla24xx_nvram_config()
7767 le32_to_cpu(nv->host_p) & BIT_11 ? 1 : 0; in qla24xx_nvram_config()
7769 ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1 : 0; in qla24xx_nvram_config()
7774 memcpy(ha->fw_seriallink_options24, nv->seriallink_options, in qla24xx_nvram_config()
7786 ha->retry_count = le16_to_cpu(nv->login_retry_count); in qla24xx_nvram_config()
7789 if (le16_to_cpu(nv->login_timeout) < ql2xlogintimeout) in qla24xx_nvram_config()
7790 nv->login_timeout = cpu_to_le16(ql2xlogintimeout); in qla24xx_nvram_config()
7791 if (le16_to_cpu(nv->login_timeout) < 4) in qla24xx_nvram_config()
7792 nv->login_timeout = cpu_to_le16(4); in qla24xx_nvram_config()
7793 ha->login_timeout = le16_to_cpu(nv->login_timeout); in qla24xx_nvram_config()
7798 ha->loop_reset_delay = nv->reset_delay; in qla24xx_nvram_config()
7810 if (le16_to_cpu(nv->link_down_timeout) == 0) { in qla24xx_nvram_config()
7814 ha->link_down_timeout = le16_to_cpu(nv->link_down_timeout); in qla24xx_nvram_config()
7820 ha->port_down_retry_count = le16_to_cpu(nv->port_down_retry_count); in qla24xx_nvram_config()
7825 ha->login_retry_count = le16_to_cpu(nv->login_retry_count); in qla24xx_nvram_config()
7827 le16_to_cpu(nv->port_down_retry_count) && in qla24xx_nvram_config()
8791 struct nvram_81xx *nv; in qla81xx_nvram_config() local
8802 nv = ha->nvram; in qla81xx_nvram_config()
8805 ha->nvram_size = sizeof(*nv); in qla81xx_nvram_config()
8839 dptr = (__force __le32 *)nv; in qla81xx_nvram_config()
8846 nv, ha->nvram_size); in qla81xx_nvram_config()
8849 if (chksum || memcmp("ISP ", nv->id, sizeof(nv->id)) || in qla81xx_nvram_config()
8850 le16_to_cpu(nv->nvram_version) < ICB_VERSION) { in qla81xx_nvram_config()
8854 chksum, nv->id, le16_to_cpu(nv->nvram_version)); in qla81xx_nvram_config()
8855 ql_dump_buffer(ql_dbg_init, vha, 0x0073, nv, sizeof(*nv)); in qla81xx_nvram_config()
8863 memset(nv, 0, ha->nvram_size); in qla81xx_nvram_config()
8864 nv->nvram_version = cpu_to_le16(ICB_VERSION); in qla81xx_nvram_config()
8865 nv->version = cpu_to_le16(ICB_VERSION); in qla81xx_nvram_config()
8866 nv->frame_payload_size = cpu_to_le16(2048); in qla81xx_nvram_config()
8867 nv->execution_throttle = cpu_to_le16(0xFFFF); in qla81xx_nvram_config()
8868 nv->exchange_count = cpu_to_le16(0); in qla81xx_nvram_config()
8869 nv->port_name[0] = 0x21; in qla81xx_nvram_config()
8870 nv->port_name[1] = 0x00 + ha->port_no + 1; in qla81xx_nvram_config()
8871 nv->port_name[2] = 0x00; in qla81xx_nvram_config()
8872 nv->port_name[3] = 0xe0; in qla81xx_nvram_config()
8873 nv->port_name[4] = 0x8b; in qla81xx_nvram_config()
8874 nv->port_name[5] = 0x1c; in qla81xx_nvram_config()
8875 nv->port_name[6] = 0x55; in qla81xx_nvram_config()
8876 nv->port_name[7] = 0x86; in qla81xx_nvram_config()
8877 nv->node_name[0] = 0x20; in qla81xx_nvram_config()
8878 nv->node_name[1] = 0x00; in qla81xx_nvram_config()
8879 nv->node_name[2] = 0x00; in qla81xx_nvram_config()
8880 nv->node_name[3] = 0xe0; in qla81xx_nvram_config()
8881 nv->node_name[4] = 0x8b; in qla81xx_nvram_config()
8882 nv->node_name[5] = 0x1c; in qla81xx_nvram_config()
8883 nv->node_name[6] = 0x55; in qla81xx_nvram_config()
8884 nv->node_name[7] = 0x86; in qla81xx_nvram_config()
8885 nv->login_retry_count = cpu_to_le16(8); in qla81xx_nvram_config()
8886 nv->interrupt_delay_timer = cpu_to_le16(0); in qla81xx_nvram_config()
8887 nv->login_timeout = cpu_to_le16(0); in qla81xx_nvram_config()
8888 nv->firmware_options_1 = in qla81xx_nvram_config()
8890 nv->firmware_options_2 = cpu_to_le32(2 << 4); in qla81xx_nvram_config()
8891 nv->firmware_options_2 |= cpu_to_le32(BIT_12); in qla81xx_nvram_config()
8892 nv->firmware_options_3 = cpu_to_le32(2 << 13); in qla81xx_nvram_config()
8893 nv->host_p = cpu_to_le32(BIT_11|BIT_10); in qla81xx_nvram_config()
8894 nv->efi_parameters = cpu_to_le32(0); in qla81xx_nvram_config()
8895 nv->reset_delay = 5; in qla81xx_nvram_config()
8896 nv->max_luns_per_target = cpu_to_le16(128); in qla81xx_nvram_config()
8897 nv->port_down_retry_count = cpu_to_le16(30); in qla81xx_nvram_config()
8898 nv->link_down_timeout = cpu_to_le16(180); in qla81xx_nvram_config()
8899 nv->enode_mac[0] = 0x00; in qla81xx_nvram_config()
8900 nv->enode_mac[1] = 0xC0; in qla81xx_nvram_config()
8901 nv->enode_mac[2] = 0xDD; in qla81xx_nvram_config()
8902 nv->enode_mac[3] = 0x04; in qla81xx_nvram_config()
8903 nv->enode_mac[4] = 0x05; in qla81xx_nvram_config()
8904 nv->enode_mac[5] = 0x06 + ha->port_no + 1; in qla81xx_nvram_config()
8910 nv->frame_payload_size &= cpu_to_le16(~7); in qla81xx_nvram_config()
8912 qlt_81xx_config_nvram_stage1(vha, nv); in qla81xx_nvram_config()
8919 dptr2 = (uint8_t *)&nv->version; in qla81xx_nvram_config()
8924 icb->login_retry_count = nv->login_retry_count; in qla81xx_nvram_config()
8928 dptr2 = (uint8_t *)&nv->interrupt_delay_timer; in qla81xx_nvram_config()
8934 memcpy(icb->enode_mac, nv->enode_mac, sizeof(icb->enode_mac)); in qla81xx_nvram_config()
8946 memcpy(ha->ex_init_cb, &nv->ex_version, sizeof(*ha->ex_init_cb)); in qla81xx_nvram_config()
8951 qla2x00_set_model_info(vha, nv->model_name, sizeof(nv->model_name), in qla81xx_nvram_config()
8957 if (nv->host_p & cpu_to_le32(BIT_15)) { in qla81xx_nvram_config()
8958 memcpy(icb->node_name, nv->alternate_node_name, WWN_SIZE); in qla81xx_nvram_config()
8959 memcpy(icb->port_name, nv->alternate_port_name, WWN_SIZE); in qla81xx_nvram_config()
8973 if ((nv->enhanced_features & BIT_7) == 0) in qla81xx_nvram_config()
8981 le32_to_cpu(nv->host_p) & BIT_10 ? 1 : 0; in qla81xx_nvram_config()
8983 le32_to_cpu(nv->host_p) & BIT_11 ? 1 : 0; in qla81xx_nvram_config()
8985 ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1 : 0; in qla81xx_nvram_config()
8999 ha->retry_count = le16_to_cpu(nv->login_retry_count); in qla81xx_nvram_config()
9002 if (le16_to_cpu(nv->login_timeout) < ql2xlogintimeout) in qla81xx_nvram_config()
9003 nv->login_timeout = cpu_to_le16(ql2xlogintimeout); in qla81xx_nvram_config()
9004 if (le16_to_cpu(nv->login_timeout) < 4) in qla81xx_nvram_config()
9005 nv->login_timeout = cpu_to_le16(4); in qla81xx_nvram_config()
9006 ha->login_timeout = le16_to_cpu(nv->login_timeout); in qla81xx_nvram_config()
9011 ha->loop_reset_delay = nv->reset_delay; in qla81xx_nvram_config()
9023 if (le16_to_cpu(nv->link_down_timeout) == 0) { in qla81xx_nvram_config()
9027 ha->link_down_timeout = le16_to_cpu(nv->link_down_timeout); in qla81xx_nvram_config()
9033 ha->port_down_retry_count = le16_to_cpu(nv->port_down_retry_count); in qla81xx_nvram_config()
9038 ha->login_retry_count = le16_to_cpu(nv->login_retry_count); in qla81xx_nvram_config()
9040 le16_to_cpu(nv->port_down_retry_count) && in qla81xx_nvram_config()