Lines Matching full:nv

3691 	struct nvram_81xx *nv = ha->nvram;  in qla24xx_detect_sfp()  local
3701 (nv->enhanced_features & NEF_LR_DIST_ENABLE)) { in qla24xx_detect_sfp()
3705 (nv->enhanced_features >> LR_DIST_NV_POS) in qla24xx_detect_sfp()
4662 static void qla2xxx_nvram_wwn_from_ofw(scsi_qla_host_t *vha, nvram_t *nv) in qla2xxx_nvram_wwn_from_ofw() argument
4673 memcpy(nv->port_name, val, WWN_SIZE); in qla2xxx_nvram_wwn_from_ofw()
4677 memcpy(nv->node_name, val, WWN_SIZE); in qla2xxx_nvram_wwn_from_ofw()
4703 nvram_t *nv = ha->nvram; in qla2x00_nvram_config() local
4710 ha->nvram_size = sizeof(*nv); in qla2x00_nvram_config()
4724 nv, ha->nvram_size); in qla2x00_nvram_config()
4727 if (chksum || memcmp("ISP ", nv->id, sizeof(nv->id)) || in qla2x00_nvram_config()
4728 nv->nvram_version < 1) { in qla2x00_nvram_config()
4732 chksum, nv->id, nv->nvram_version); in qla2x00_nvram_config()
4740 memset(nv, 0, ha->nvram_size); in qla2x00_nvram_config()
4741 nv->parameter_block_version = ICB_VERSION; in qla2x00_nvram_config()
4744 nv->firmware_options[0] = BIT_2 | BIT_1; in qla2x00_nvram_config()
4745 nv->firmware_options[1] = BIT_7 | BIT_5; in qla2x00_nvram_config()
4746 nv->add_firmware_options[0] = BIT_5; in qla2x00_nvram_config()
4747 nv->add_firmware_options[1] = BIT_5 | BIT_4; in qla2x00_nvram_config()
4748 nv->frame_payload_size = cpu_to_le16(2048); in qla2x00_nvram_config()
4749 nv->special_options[1] = BIT_7; in qla2x00_nvram_config()
4751 nv->firmware_options[0] = BIT_2 | BIT_1; in qla2x00_nvram_config()
4752 nv->firmware_options[1] = BIT_7 | BIT_5; in qla2x00_nvram_config()
4753 nv->add_firmware_options[0] = BIT_5; in qla2x00_nvram_config()
4754 nv->add_firmware_options[1] = BIT_5 | BIT_4; in qla2x00_nvram_config()
4755 nv->frame_payload_size = cpu_to_le16(1024); in qla2x00_nvram_config()
4757 nv->firmware_options[0] = BIT_3 | BIT_1; in qla2x00_nvram_config()
4758 nv->firmware_options[1] = BIT_5; in qla2x00_nvram_config()
4759 nv->frame_payload_size = cpu_to_le16(1024); in qla2x00_nvram_config()
4762 nv->max_iocb_allocation = cpu_to_le16(256); in qla2x00_nvram_config()
4763 nv->execution_throttle = cpu_to_le16(16); in qla2x00_nvram_config()
4764 nv->retry_count = 8; in qla2x00_nvram_config()
4765 nv->retry_delay = 1; in qla2x00_nvram_config()
4767 nv->port_name[0] = 33; in qla2x00_nvram_config()
4768 nv->port_name[3] = 224; in qla2x00_nvram_config()
4769 nv->port_name[4] = 139; in qla2x00_nvram_config()
4771 qla2xxx_nvram_wwn_from_ofw(vha, nv); in qla2x00_nvram_config()
4773 nv->login_timeout = 4; in qla2x00_nvram_config()
4778 nv->host_p[1] = BIT_2; in qla2x00_nvram_config()
4779 nv->reset_delay = 5; in qla2x00_nvram_config()
4780 nv->port_down_retry_count = 8; in qla2x00_nvram_config()
4781 nv->max_luns_per_target = cpu_to_le16(8); in qla2x00_nvram_config()
4782 nv->link_down_timeout = 60; in qla2x00_nvram_config()
4793 nv->firmware_options[0] |= (BIT_6 | BIT_1); in qla2x00_nvram_config()
4794 nv->firmware_options[0] &= ~(BIT_5 | BIT_4); in qla2x00_nvram_config()
4795 nv->firmware_options[1] |= (BIT_5 | BIT_0); in qla2x00_nvram_config()
4796 nv->firmware_options[1] &= ~BIT_4; in qla2x00_nvram_config()
4799 nv->firmware_options[0] |= BIT_2; in qla2x00_nvram_config()
4800 nv->firmware_options[0] &= ~BIT_3; in qla2x00_nvram_config()
4801 nv->special_options[0] &= ~BIT_6; in qla2x00_nvram_config()
4802 nv->add_firmware_options[1] |= BIT_5 | BIT_4; in qla2x00_nvram_config()
4811 qla2x00_set_model_info(vha, nv->model_number, in qla2x00_nvram_config()
4812 sizeof(nv->model_number), "QLA23xx"); in qla2x00_nvram_config()
4815 nv->firmware_options[0] |= BIT_2; in qla2x00_nvram_config()
4820 if ((nv->add_firmware_options[0] & (BIT_6 | BIT_5 | BIT_4)) == in qla2x00_nvram_config()
4823 nv->add_firmware_options[0] &= ~(BIT_6 | BIT_5 | BIT_4); in qla2x00_nvram_config()
4824 nv->add_firmware_options[0] |= BIT_5; in qla2x00_nvram_config()
4835 dptr2 = (uint8_t *)&nv->parameter_block_version; in qla2x00_nvram_config()
4847 if (nv->host_p[1] & BIT_7) { in qla2x00_nvram_config()
4848 memcpy(icb->node_name, nv->alternate_node_name, WWN_SIZE); in qla2x00_nvram_config()
4849 memcpy(icb->port_name, nv->alternate_port_name, WWN_SIZE); in qla2x00_nvram_config()
4870 if (nv->host_p[0] & BIT_7) in qla2x00_nvram_config()
4872 ha->flags.disable_risc_code_load = ((nv->host_p[0] & BIT_4) ? 1 : 0); in qla2x00_nvram_config()
4876 ha->flags.enable_lip_reset = ((nv->host_p[1] & BIT_1) ? 1 : 0); in qla2x00_nvram_config()
4877 ha->flags.enable_lip_full_login = ((nv->host_p[1] & BIT_2) ? 1 : 0); in qla2x00_nvram_config()
4878 ha->flags.enable_target_reset = ((nv->host_p[1] & BIT_3) ? 1 : 0); in qla2x00_nvram_config()
4879 ha->flags.enable_led_scheme = (nv->special_options[1] & BIT_4) ? 1 : 0; in qla2x00_nvram_config()
4885 memcpy(ha->fw_seriallink_options, nv->seriallink_options, in qla2x00_nvram_config()
4897 ha->retry_count = nv->retry_count; in qla2x00_nvram_config()
4900 if (nv->login_timeout != ql2xlogintimeout) in qla2x00_nvram_config()
4901 nv->login_timeout = ql2xlogintimeout; in qla2x00_nvram_config()
4902 if (nv->login_timeout < 4) in qla2x00_nvram_config()
4903 nv->login_timeout = 4; in qla2x00_nvram_config()
4904 ha->login_timeout = nv->login_timeout; in qla2x00_nvram_config()
4909 ha->loop_reset_delay = nv->reset_delay; in qla2x00_nvram_config()
4921 if (nv->link_down_timeout == 0) { in qla2x00_nvram_config()
4925 ha->link_down_timeout = nv->link_down_timeout; in qla2x00_nvram_config()
4933 ha->port_down_retry_count = nv->port_down_retry_count; in qla2x00_nvram_config()
4937 ha->login_retry_count = nv->retry_count; in qla2x00_nvram_config()
4938 if (ha->port_down_retry_count == nv->port_down_retry_count && in qla2x00_nvram_config()
7319 struct nvram_24xx *nv) in qla24xx_nvram_wwn_from_ofw() argument
7330 memcpy(nv->port_name, val, WWN_SIZE); in qla24xx_nvram_wwn_from_ofw()
7334 memcpy(nv->node_name, val, WWN_SIZE); in qla24xx_nvram_wwn_from_ofw()
7343 struct nvram_24xx *nv; in qla24xx_nvram_config() local
7352 nv = ha->nvram; in qla24xx_nvram_config()
7363 ha->nvram_size = sizeof(*nv); in qla24xx_nvram_config()
7372 dptr = (__force __le32 *)nv; in qla24xx_nvram_config()
7380 nv, ha->nvram_size); in qla24xx_nvram_config()
7383 if (chksum || memcmp("ISP ", nv->id, sizeof(nv->id)) || in qla24xx_nvram_config()
7384 le16_to_cpu(nv->nvram_version) < ICB_VERSION) { in qla24xx_nvram_config()
7388 chksum, nv->id, nv->nvram_version); in qla24xx_nvram_config()
7389 ql_dump_buffer(ql_dbg_init, vha, 0x006b, nv, sizeof(*nv)); in qla24xx_nvram_config()
7397 memset(nv, 0, ha->nvram_size); in qla24xx_nvram_config()
7398 nv->nvram_version = cpu_to_le16(ICB_VERSION); in qla24xx_nvram_config()
7399 nv->version = cpu_to_le16(ICB_VERSION); in qla24xx_nvram_config()
7400 nv->frame_payload_size = cpu_to_le16(2048); in qla24xx_nvram_config()
7401 nv->execution_throttle = cpu_to_le16(0xFFFF); in qla24xx_nvram_config()
7402 nv->exchange_count = cpu_to_le16(0); in qla24xx_nvram_config()
7403 nv->hard_address = cpu_to_le16(124); in qla24xx_nvram_config()
7404 nv->port_name[0] = 0x21; in qla24xx_nvram_config()
7405 nv->port_name[1] = 0x00 + ha->port_no + 1; in qla24xx_nvram_config()
7406 nv->port_name[2] = 0x00; in qla24xx_nvram_config()
7407 nv->port_name[3] = 0xe0; in qla24xx_nvram_config()
7408 nv->port_name[4] = 0x8b; in qla24xx_nvram_config()
7409 nv->port_name[5] = 0x1c; in qla24xx_nvram_config()
7410 nv->port_name[6] = 0x55; in qla24xx_nvram_config()
7411 nv->port_name[7] = 0x86; in qla24xx_nvram_config()
7412 nv->node_name[0] = 0x20; in qla24xx_nvram_config()
7413 nv->node_name[1] = 0x00; in qla24xx_nvram_config()
7414 nv->node_name[2] = 0x00; in qla24xx_nvram_config()
7415 nv->node_name[3] = 0xe0; in qla24xx_nvram_config()
7416 nv->node_name[4] = 0x8b; in qla24xx_nvram_config()
7417 nv->node_name[5] = 0x1c; in qla24xx_nvram_config()
7418 nv->node_name[6] = 0x55; in qla24xx_nvram_config()
7419 nv->node_name[7] = 0x86; in qla24xx_nvram_config()
7420 qla24xx_nvram_wwn_from_ofw(vha, nv); in qla24xx_nvram_config()
7421 nv->login_retry_count = cpu_to_le16(8); in qla24xx_nvram_config()
7422 nv->interrupt_delay_timer = cpu_to_le16(0); in qla24xx_nvram_config()
7423 nv->login_timeout = cpu_to_le16(0); in qla24xx_nvram_config()
7424 nv->firmware_options_1 = in qla24xx_nvram_config()
7426 nv->firmware_options_2 = cpu_to_le32(2 << 4); in qla24xx_nvram_config()
7427 nv->firmware_options_2 |= cpu_to_le32(BIT_12); in qla24xx_nvram_config()
7428 nv->firmware_options_3 = cpu_to_le32(2 << 13); in qla24xx_nvram_config()
7429 nv->host_p = cpu_to_le32(BIT_11|BIT_10); in qla24xx_nvram_config()
7430 nv->efi_parameters = cpu_to_le32(0); in qla24xx_nvram_config()
7431 nv->reset_delay = 5; in qla24xx_nvram_config()
7432 nv->max_luns_per_target = cpu_to_le16(128); in qla24xx_nvram_config()
7433 nv->port_down_retry_count = cpu_to_le16(30); in qla24xx_nvram_config()
7434 nv->link_down_timeout = cpu_to_le16(30); in qla24xx_nvram_config()
7441 nv->firmware_options_1 &= cpu_to_le32(~BIT_13); in qla24xx_nvram_config()
7443 nv->host_p &= cpu_to_le32(~BIT_10); in qla24xx_nvram_config()
7446 qlt_24xx_config_nvram_stage1(vha, nv); in qla24xx_nvram_config()
7453 dptr2 = (uint8_t *)&nv->version; in qla24xx_nvram_config()
7458 icb->login_retry_count = nv->login_retry_count; in qla24xx_nvram_config()
7459 icb->link_down_on_nos = nv->link_down_on_nos; in qla24xx_nvram_config()
7463 dptr2 = (uint8_t *)&nv->interrupt_delay_timer; in qla24xx_nvram_config()
7472 qla2x00_set_model_info(vha, nv->model_name, sizeof(nv->model_name), in qla24xx_nvram_config()
7477 if (nv->host_p & cpu_to_le32(BIT_15)) { in qla24xx_nvram_config()
7479 memcpy(icb->node_name, nv->alternate_node_name, WWN_SIZE); in qla24xx_nvram_config()
7480 memcpy(icb->port_name, nv->alternate_port_name, WWN_SIZE); in qla24xx_nvram_config()
7497 le32_to_cpu(nv->host_p) & BIT_10 ? 1 : 0; in qla24xx_nvram_config()
7499 le32_to_cpu(nv->host_p) & BIT_11 ? 1 : 0; in qla24xx_nvram_config()
7501 ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1 : 0; in qla24xx_nvram_config()
7506 memcpy(ha->fw_seriallink_options24, nv->seriallink_options, in qla24xx_nvram_config()
7518 ha->retry_count = le16_to_cpu(nv->login_retry_count); in qla24xx_nvram_config()
7521 if (le16_to_cpu(nv->login_timeout) < ql2xlogintimeout) in qla24xx_nvram_config()
7522 nv->login_timeout = cpu_to_le16(ql2xlogintimeout); in qla24xx_nvram_config()
7523 if (le16_to_cpu(nv->login_timeout) < 4) in qla24xx_nvram_config()
7524 nv->login_timeout = cpu_to_le16(4); in qla24xx_nvram_config()
7525 ha->login_timeout = le16_to_cpu(nv->login_timeout); in qla24xx_nvram_config()
7530 ha->loop_reset_delay = nv->reset_delay; in qla24xx_nvram_config()
7542 if (le16_to_cpu(nv->link_down_timeout) == 0) { in qla24xx_nvram_config()
7546 ha->link_down_timeout = le16_to_cpu(nv->link_down_timeout); in qla24xx_nvram_config()
7552 ha->port_down_retry_count = le16_to_cpu(nv->port_down_retry_count); in qla24xx_nvram_config()
7557 ha->login_retry_count = le16_to_cpu(nv->login_retry_count); in qla24xx_nvram_config()
7559 le16_to_cpu(nv->port_down_retry_count) && in qla24xx_nvram_config()
8523 struct nvram_81xx *nv; in qla81xx_nvram_config() local
8534 nv = ha->nvram; in qla81xx_nvram_config()
8537 ha->nvram_size = sizeof(*nv); in qla81xx_nvram_config()
8571 dptr = (__force __le32 *)nv; in qla81xx_nvram_config()
8578 nv, ha->nvram_size); in qla81xx_nvram_config()
8581 if (chksum || memcmp("ISP ", nv->id, sizeof(nv->id)) || in qla81xx_nvram_config()
8582 le16_to_cpu(nv->nvram_version) < ICB_VERSION) { in qla81xx_nvram_config()
8586 chksum, nv->id, le16_to_cpu(nv->nvram_version)); in qla81xx_nvram_config()
8587 ql_dump_buffer(ql_dbg_init, vha, 0x0073, nv, sizeof(*nv)); in qla81xx_nvram_config()
8595 memset(nv, 0, ha->nvram_size); in qla81xx_nvram_config()
8596 nv->nvram_version = cpu_to_le16(ICB_VERSION); in qla81xx_nvram_config()
8597 nv->version = cpu_to_le16(ICB_VERSION); in qla81xx_nvram_config()
8598 nv->frame_payload_size = cpu_to_le16(2048); in qla81xx_nvram_config()
8599 nv->execution_throttle = cpu_to_le16(0xFFFF); in qla81xx_nvram_config()
8600 nv->exchange_count = cpu_to_le16(0); in qla81xx_nvram_config()
8601 nv->port_name[0] = 0x21; in qla81xx_nvram_config()
8602 nv->port_name[1] = 0x00 + ha->port_no + 1; in qla81xx_nvram_config()
8603 nv->port_name[2] = 0x00; in qla81xx_nvram_config()
8604 nv->port_name[3] = 0xe0; in qla81xx_nvram_config()
8605 nv->port_name[4] = 0x8b; in qla81xx_nvram_config()
8606 nv->port_name[5] = 0x1c; in qla81xx_nvram_config()
8607 nv->port_name[6] = 0x55; in qla81xx_nvram_config()
8608 nv->port_name[7] = 0x86; in qla81xx_nvram_config()
8609 nv->node_name[0] = 0x20; in qla81xx_nvram_config()
8610 nv->node_name[1] = 0x00; in qla81xx_nvram_config()
8611 nv->node_name[2] = 0x00; in qla81xx_nvram_config()
8612 nv->node_name[3] = 0xe0; in qla81xx_nvram_config()
8613 nv->node_name[4] = 0x8b; in qla81xx_nvram_config()
8614 nv->node_name[5] = 0x1c; in qla81xx_nvram_config()
8615 nv->node_name[6] = 0x55; in qla81xx_nvram_config()
8616 nv->node_name[7] = 0x86; in qla81xx_nvram_config()
8617 nv->login_retry_count = cpu_to_le16(8); in qla81xx_nvram_config()
8618 nv->interrupt_delay_timer = cpu_to_le16(0); in qla81xx_nvram_config()
8619 nv->login_timeout = cpu_to_le16(0); in qla81xx_nvram_config()
8620 nv->firmware_options_1 = in qla81xx_nvram_config()
8622 nv->firmware_options_2 = cpu_to_le32(2 << 4); in qla81xx_nvram_config()
8623 nv->firmware_options_2 |= cpu_to_le32(BIT_12); in qla81xx_nvram_config()
8624 nv->firmware_options_3 = cpu_to_le32(2 << 13); in qla81xx_nvram_config()
8625 nv->host_p = cpu_to_le32(BIT_11|BIT_10); in qla81xx_nvram_config()
8626 nv->efi_parameters = cpu_to_le32(0); in qla81xx_nvram_config()
8627 nv->reset_delay = 5; in qla81xx_nvram_config()
8628 nv->max_luns_per_target = cpu_to_le16(128); in qla81xx_nvram_config()
8629 nv->port_down_retry_count = cpu_to_le16(30); in qla81xx_nvram_config()
8630 nv->link_down_timeout = cpu_to_le16(180); in qla81xx_nvram_config()
8631 nv->enode_mac[0] = 0x00; in qla81xx_nvram_config()
8632 nv->enode_mac[1] = 0xC0; in qla81xx_nvram_config()
8633 nv->enode_mac[2] = 0xDD; in qla81xx_nvram_config()
8634 nv->enode_mac[3] = 0x04; in qla81xx_nvram_config()
8635 nv->enode_mac[4] = 0x05; in qla81xx_nvram_config()
8636 nv->enode_mac[5] = 0x06 + ha->port_no + 1; in qla81xx_nvram_config()
8642 nv->frame_payload_size &= cpu_to_le16(~7); in qla81xx_nvram_config()
8644 qlt_81xx_config_nvram_stage1(vha, nv); in qla81xx_nvram_config()
8651 dptr2 = (uint8_t *)&nv->version; in qla81xx_nvram_config()
8656 icb->login_retry_count = nv->login_retry_count; in qla81xx_nvram_config()
8660 dptr2 = (uint8_t *)&nv->interrupt_delay_timer; in qla81xx_nvram_config()
8666 memcpy(icb->enode_mac, nv->enode_mac, sizeof(icb->enode_mac)); in qla81xx_nvram_config()
8678 memcpy(ha->ex_init_cb, &nv->ex_version, sizeof(*ha->ex_init_cb)); in qla81xx_nvram_config()
8683 qla2x00_set_model_info(vha, nv->model_name, sizeof(nv->model_name), in qla81xx_nvram_config()
8689 if (nv->host_p & cpu_to_le32(BIT_15)) { in qla81xx_nvram_config()
8690 memcpy(icb->node_name, nv->alternate_node_name, WWN_SIZE); in qla81xx_nvram_config()
8691 memcpy(icb->port_name, nv->alternate_port_name, WWN_SIZE); in qla81xx_nvram_config()
8705 if ((nv->enhanced_features & BIT_7) == 0) in qla81xx_nvram_config()
8713 le32_to_cpu(nv->host_p) & BIT_10 ? 1 : 0; in qla81xx_nvram_config()
8715 le32_to_cpu(nv->host_p) & BIT_11 ? 1 : 0; in qla81xx_nvram_config()
8717 ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1 : 0; in qla81xx_nvram_config()
8731 ha->retry_count = le16_to_cpu(nv->login_retry_count); in qla81xx_nvram_config()
8734 if (le16_to_cpu(nv->login_timeout) < ql2xlogintimeout) in qla81xx_nvram_config()
8735 nv->login_timeout = cpu_to_le16(ql2xlogintimeout); in qla81xx_nvram_config()
8736 if (le16_to_cpu(nv->login_timeout) < 4) in qla81xx_nvram_config()
8737 nv->login_timeout = cpu_to_le16(4); in qla81xx_nvram_config()
8738 ha->login_timeout = le16_to_cpu(nv->login_timeout); in qla81xx_nvram_config()
8743 ha->loop_reset_delay = nv->reset_delay; in qla81xx_nvram_config()
8755 if (le16_to_cpu(nv->link_down_timeout) == 0) { in qla81xx_nvram_config()
8759 ha->link_down_timeout = le16_to_cpu(nv->link_down_timeout); in qla81xx_nvram_config()
8765 ha->port_down_retry_count = le16_to_cpu(nv->port_down_retry_count); in qla81xx_nvram_config()
8770 ha->login_retry_count = le16_to_cpu(nv->login_retry_count); in qla81xx_nvram_config()
8772 le16_to_cpu(nv->port_down_retry_count) && in qla81xx_nvram_config()