Lines Matching refs:nv

3697 	struct nvram_81xx *nv = ha->nvram;
3707 (nv->enhanced_features & NEF_LR_DIST_ENABLE)) {
3711 (nv->enhanced_features >> LR_DIST_NV_POS)
4669 static void qla2xxx_nvram_wwn_from_ofw(scsi_qla_host_t *vha, nvram_t *nv)
4680 memcpy(nv->port_name, val, WWN_SIZE);
4684 memcpy(nv->node_name, val, WWN_SIZE);
4710 nvram_t *nv = ha->nvram;
4717 ha->nvram_size = sizeof(*nv);
4731 nv, ha->nvram_size);
4734 if (chksum || memcmp("ISP ", nv->id, sizeof(nv->id)) ||
4735 nv->nvram_version < 1) {
4739 chksum, nv->id, nv->nvram_version);
4747 memset(nv, 0, ha->nvram_size);
4748 nv->parameter_block_version = ICB_VERSION;
4751 nv->firmware_options[0] = BIT_2 | BIT_1;
4752 nv->firmware_options[1] = BIT_7 | BIT_5;
4753 nv->add_firmware_options[0] = BIT_5;
4754 nv->add_firmware_options[1] = BIT_5 | BIT_4;
4755 nv->frame_payload_size = cpu_to_le16(2048);
4756 nv->special_options[1] = BIT_7;
4758 nv->firmware_options[0] = BIT_2 | BIT_1;
4759 nv->firmware_options[1] = BIT_7 | BIT_5;
4760 nv->add_firmware_options[0] = BIT_5;
4761 nv->add_firmware_options[1] = BIT_5 | BIT_4;
4762 nv->frame_payload_size = cpu_to_le16(1024);
4764 nv->firmware_options[0] = BIT_3 | BIT_1;
4765 nv->firmware_options[1] = BIT_5;
4766 nv->frame_payload_size = cpu_to_le16(1024);
4769 nv->max_iocb_allocation = cpu_to_le16(256);
4770 nv->execution_throttle = cpu_to_le16(16);
4771 nv->retry_count = 8;
4772 nv->retry_delay = 1;
4774 nv->port_name[0] = 33;
4775 nv->port_name[3] = 224;
4776 nv->port_name[4] = 139;
4778 qla2xxx_nvram_wwn_from_ofw(vha, nv);
4780 nv->login_timeout = 4;
4785 nv->host_p[1] = BIT_2;
4786 nv->reset_delay = 5;
4787 nv->port_down_retry_count = 8;
4788 nv->max_luns_per_target = cpu_to_le16(8);
4789 nv->link_down_timeout = 60;
4800 nv->firmware_options[0] |= (BIT_6 | BIT_1);
4801 nv->firmware_options[0] &= ~(BIT_5 | BIT_4);
4802 nv->firmware_options[1] |= (BIT_5 | BIT_0);
4803 nv->firmware_options[1] &= ~BIT_4;
4806 nv->firmware_options[0] |= BIT_2;
4807 nv->firmware_options[0] &= ~BIT_3;
4808 nv->special_options[0] &= ~BIT_6;
4809 nv->add_firmware_options[1] |= BIT_5 | BIT_4;
4818 qla2x00_set_model_info(vha, nv->model_number,
4819 sizeof(nv->model_number), "QLA23xx");
4822 nv->firmware_options[0] |= BIT_2;
4827 if ((nv->add_firmware_options[0] & (BIT_6 | BIT_5 | BIT_4)) ==
4830 nv->add_firmware_options[0] &= ~(BIT_6 | BIT_5 | BIT_4);
4831 nv->add_firmware_options[0] |= BIT_5;
4842 dptr2 = (uint8_t *)&nv->parameter_block_version;
4854 if (nv->host_p[1] & BIT_7) {
4855 memcpy(icb->node_name, nv->alternate_node_name, WWN_SIZE);
4856 memcpy(icb->port_name, nv->alternate_port_name, WWN_SIZE);
4877 if (nv->host_p[0] & BIT_7)
4879 ha->flags.disable_risc_code_load = ((nv->host_p[0] & BIT_4) ? 1 : 0);
4883 ha->flags.enable_lip_reset = ((nv->host_p[1] & BIT_1) ? 1 : 0);
4884 ha->flags.enable_lip_full_login = ((nv->host_p[1] & BIT_2) ? 1 : 0);
4885 ha->flags.enable_target_reset = ((nv->host_p[1] & BIT_3) ? 1 : 0);
4886 ha->flags.enable_led_scheme = (nv->special_options[1] & BIT_4) ? 1 : 0;
4892 memcpy(ha->fw_seriallink_options, nv->seriallink_options,
4904 ha->retry_count = nv->retry_count;
4907 if (nv->login_timeout != ql2xlogintimeout)
4908 nv->login_timeout = ql2xlogintimeout;
4909 if (nv->login_timeout < 4)
4910 nv->login_timeout = 4;
4911 ha->login_timeout = nv->login_timeout;
4916 ha->loop_reset_delay = nv->reset_delay;
4928 if (nv->link_down_timeout == 0) {
4932 ha->link_down_timeout = nv->link_down_timeout;
4940 ha->port_down_retry_count = nv->port_down_retry_count;
4944 ha->login_retry_count = nv->retry_count;
4945 if (ha->port_down_retry_count == nv->port_down_retry_count &&
7345 struct nvram_24xx *nv)
7356 memcpy(nv->port_name, val, WWN_SIZE);
7360 memcpy(nv->node_name, val, WWN_SIZE);
7369 struct nvram_24xx *nv;
7378 nv = ha->nvram;
7389 ha->nvram_size = sizeof(*nv);
7398 dptr = (__force __le32 *)nv;
7406 nv, ha->nvram_size);
7409 if (chksum || memcmp("ISP ", nv->id, sizeof(nv->id)) ||
7410 le16_to_cpu(nv->nvram_version) < ICB_VERSION) {
7414 chksum, nv->id, nv->nvram_version);
7415 ql_dump_buffer(ql_dbg_init, vha, 0x006b, nv, sizeof(*nv));
7423 memset(nv, 0, ha->nvram_size);
7424 nv->nvram_version = cpu_to_le16(ICB_VERSION);
7425 nv->version = cpu_to_le16(ICB_VERSION);
7426 nv->frame_payload_size = cpu_to_le16(2048);
7427 nv->execution_throttle = cpu_to_le16(0xFFFF);
7428 nv->exchange_count = cpu_to_le16(0);
7429 nv->hard_address = cpu_to_le16(124);
7430 nv->port_name[0] = 0x21;
7431 nv->port_name[1] = 0x00 + ha->port_no + 1;
7432 nv->port_name[2] = 0x00;
7433 nv->port_name[3] = 0xe0;
7434 nv->port_name[4] = 0x8b;
7435 nv->port_name[5] = 0x1c;
7436 nv->port_name[6] = 0x55;
7437 nv->port_name[7] = 0x86;
7438 nv->node_name[0] = 0x20;
7439 nv->node_name[1] = 0x00;
7440 nv->node_name[2] = 0x00;
7441 nv->node_name[3] = 0xe0;
7442 nv->node_name[4] = 0x8b;
7443 nv->node_name[5] = 0x1c;
7444 nv->node_name[6] = 0x55;
7445 nv->node_name[7] = 0x86;
7446 qla24xx_nvram_wwn_from_ofw(vha, nv);
7447 nv->login_retry_count = cpu_to_le16(8);
7448 nv->interrupt_delay_timer = cpu_to_le16(0);
7449 nv->login_timeout = cpu_to_le16(0);
7450 nv->firmware_options_1 =
7452 nv->firmware_options_2 = cpu_to_le32(2 << 4);
7453 nv->firmware_options_2 |= cpu_to_le32(BIT_12);
7454 nv->firmware_options_3 = cpu_to_le32(2 << 13);
7455 nv->host_p = cpu_to_le32(BIT_11|BIT_10);
7456 nv->efi_parameters = cpu_to_le32(0);
7457 nv->reset_delay = 5;
7458 nv->max_luns_per_target = cpu_to_le16(128);
7459 nv->port_down_retry_count = cpu_to_le16(30);
7460 nv->link_down_timeout = cpu_to_le16(30);
7467 nv->firmware_options_1 &= cpu_to_le32(~BIT_13);
7469 nv->host_p &= cpu_to_le32(~BIT_10);
7472 qlt_24xx_config_nvram_stage1(vha, nv);
7479 dptr2 = (uint8_t *)&nv->version;
7484 icb->login_retry_count = nv->login_retry_count;
7485 icb->link_down_on_nos = nv->link_down_on_nos;
7489 dptr2 = (uint8_t *)&nv->interrupt_delay_timer;
7498 qla2x00_set_model_info(vha, nv->model_name, sizeof(nv->model_name),
7503 if (nv->host_p & cpu_to_le32(BIT_15)) {
7505 memcpy(icb->node_name, nv->alternate_node_name, WWN_SIZE);
7506 memcpy(icb->port_name, nv->alternate_port_name, WWN_SIZE);
7523 le32_to_cpu(nv->host_p) & BIT_10 ? 1 : 0;
7525 le32_to_cpu(nv->host_p) & BIT_11 ? 1 : 0;
7527 ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1 : 0;
7532 memcpy(ha->fw_seriallink_options24, nv->seriallink_options,
7544 ha->retry_count = le16_to_cpu(nv->login_retry_count);
7547 if (le16_to_cpu(nv->login_timeout) < ql2xlogintimeout)
7548 nv->login_timeout = cpu_to_le16(ql2xlogintimeout);
7549 if (le16_to_cpu(nv->login_timeout) < 4)
7550 nv->login_timeout = cpu_to_le16(4);
7551 ha->login_timeout = le16_to_cpu(nv->login_timeout);
7556 ha->loop_reset_delay = nv->reset_delay;
7568 if (le16_to_cpu(nv->link_down_timeout) == 0) {
7572 ha->link_down_timeout = le16_to_cpu(nv->link_down_timeout);
7578 ha->port_down_retry_count = le16_to_cpu(nv->port_down_retry_count);
7583 ha->login_retry_count = le16_to_cpu(nv->login_retry_count);
7585 le16_to_cpu(nv->port_down_retry_count) &&
8549 struct nvram_81xx *nv;
8560 nv = ha->nvram;
8563 ha->nvram_size = sizeof(*nv);
8597 dptr = (__force __le32 *)nv;
8604 nv, ha->nvram_size);
8607 if (chksum || memcmp("ISP ", nv->id, sizeof(nv->id)) ||
8608 le16_to_cpu(nv->nvram_version) < ICB_VERSION) {
8612 chksum, nv->id, le16_to_cpu(nv->nvram_version));
8613 ql_dump_buffer(ql_dbg_init, vha, 0x0073, nv, sizeof(*nv));
8621 memset(nv, 0, ha->nvram_size);
8622 nv->nvram_version = cpu_to_le16(ICB_VERSION);
8623 nv->version = cpu_to_le16(ICB_VERSION);
8624 nv->frame_payload_size = cpu_to_le16(2048);
8625 nv->execution_throttle = cpu_to_le16(0xFFFF);
8626 nv->exchange_count = cpu_to_le16(0);
8627 nv->port_name[0] = 0x21;
8628 nv->port_name[1] = 0x00 + ha->port_no + 1;
8629 nv->port_name[2] = 0x00;
8630 nv->port_name[3] = 0xe0;
8631 nv->port_name[4] = 0x8b;
8632 nv->port_name[5] = 0x1c;
8633 nv->port_name[6] = 0x55;
8634 nv->port_name[7] = 0x86;
8635 nv->node_name[0] = 0x20;
8636 nv->node_name[1] = 0x00;
8637 nv->node_name[2] = 0x00;
8638 nv->node_name[3] = 0xe0;
8639 nv->node_name[4] = 0x8b;
8640 nv->node_name[5] = 0x1c;
8641 nv->node_name[6] = 0x55;
8642 nv->node_name[7] = 0x86;
8643 nv->login_retry_count = cpu_to_le16(8);
8644 nv->interrupt_delay_timer = cpu_to_le16(0);
8645 nv->login_timeout = cpu_to_le16(0);
8646 nv->firmware_options_1 =
8648 nv->firmware_options_2 = cpu_to_le32(2 << 4);
8649 nv->firmware_options_2 |= cpu_to_le32(BIT_12);
8650 nv->firmware_options_3 = cpu_to_le32(2 << 13);
8651 nv->host_p = cpu_to_le32(BIT_11|BIT_10);
8652 nv->efi_parameters = cpu_to_le32(0);
8653 nv->reset_delay = 5;
8654 nv->max_luns_per_target = cpu_to_le16(128);
8655 nv->port_down_retry_count = cpu_to_le16(30);
8656 nv->link_down_timeout = cpu_to_le16(180);
8657 nv->enode_mac[0] = 0x00;
8658 nv->enode_mac[1] = 0xC0;
8659 nv->enode_mac[2] = 0xDD;
8660 nv->enode_mac[3] = 0x04;
8661 nv->enode_mac[4] = 0x05;
8662 nv->enode_mac[5] = 0x06 + ha->port_no + 1;
8668 nv->frame_payload_size &= cpu_to_le16(~7);
8670 qlt_81xx_config_nvram_stage1(vha, nv);
8677 dptr2 = (uint8_t *)&nv->version;
8682 icb->login_retry_count = nv->login_retry_count;
8686 dptr2 = (uint8_t *)&nv->interrupt_delay_timer;
8692 memcpy(icb->enode_mac, nv->enode_mac, sizeof(icb->enode_mac));
8704 memcpy(ha->ex_init_cb, &nv->ex_version, sizeof(*ha->ex_init_cb));
8709 qla2x00_set_model_info(vha, nv->model_name, sizeof(nv->model_name),
8715 if (nv->host_p & cpu_to_le32(BIT_15)) {
8716 memcpy(icb->node_name, nv->alternate_node_name, WWN_SIZE);
8717 memcpy(icb->port_name, nv->alternate_port_name, WWN_SIZE);
8731 if ((nv->enhanced_features & BIT_7) == 0)
8739 le32_to_cpu(nv->host_p) & BIT_10 ? 1 : 0;
8741 le32_to_cpu(nv->host_p) & BIT_11 ? 1 : 0;
8743 ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1 : 0;
8757 ha->retry_count = le16_to_cpu(nv->login_retry_count);
8760 if (le16_to_cpu(nv->login_timeout) < ql2xlogintimeout)
8761 nv->login_timeout = cpu_to_le16(ql2xlogintimeout);
8762 if (le16_to_cpu(nv->login_timeout) < 4)
8763 nv->login_timeout = cpu_to_le16(4);
8764 ha->login_timeout = le16_to_cpu(nv->login_timeout);
8769 ha->loop_reset_delay = nv->reset_delay;
8781 if (le16_to_cpu(nv->link_down_timeout) == 0) {
8785 ha->link_down_timeout = le16_to_cpu(nv->link_down_timeout);
8791 ha->port_down_retry_count = le16_to_cpu(nv->port_down_retry_count);
8796 ha->login_retry_count = le16_to_cpu(nv->login_retry_count);
8798 le16_to_cpu(nv->port_down_retry_count) &&