Lines Matching refs:vha

191 	scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev);
223 ql_dbg(ql_dbg_user, vha, 0x708d,
311 scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev);
354 ql_dbg(ql_dbg_user, vha, 0x708e,
375 scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev);
414 ql_dbg(ql_dbg_user, vha, 0x708f,
476 qla24xx_read_flash_data(scsi_qla_host_t *vha, uint32_t *dwptr, uint32_t faddr,
481 struct qla_hw_data *ha = vha->hw;
547 qla2xxx_find_flt_start(scsi_qla_host_t *vha, uint32_t *start)
553 struct qla_hw_data *ha = vha->hw;
587 qla24xx_read_flash_data(vha, dcode, pcihdr >> 2, 0x20);
594 qla24xx_read_flash_data(vha, dcode, pcids >> 2, 0x20);
609 qla24xx_read_flash_data(vha, dcode, pcihdr >> 2, sizeof(*fltl) >> 2);
618 ql_log(ql_log_fatal, vha, 0x0045,
620 ql_dump_buffer(ql_dbg_init + ql_dbg_buffer, vha, 0x010e,
630 ql_dbg(ql_dbg_init, vha, 0x0046,
637 qla2xxx_get_flt_info(scsi_qla_host_t *vha, uint32_t flt_addr)
670 struct qla_hw_data *ha = vha->hw;
686 ha->isp_ops->read_optrom(vha, flt, flt_addr << 2,
692 ql_log(ql_log_warn, vha, 0x0047,
703 ql_log(ql_log_fatal, vha, 0x0048,
714 ql_dbg(ql_dbg_init, vha, 0x0049,
720 ql_log(ql_dbg_init, vha, 0xffff,
934 ql_dbg(ql_dbg_init, vha, 0x004a,
944 qla2xxx_get_fdt_info(scsi_qla_host_t *vha)
950 struct qla_hw_data *ha = vha->hw;
958 ha->isp_ops->read_optrom(vha, fdt, ha->flt_region_fdt << 2,
968 ql_dbg(ql_dbg_init, vha, 0x004c,
972 ql_dump_buffer(ql_dbg_init + ql_dbg_buffer, vha, 0x0113,
1033 ql_dbg(ql_dbg_init, vha, 0x004d,
1043 qla2xxx_get_idc_param(scsi_qla_host_t *vha)
1047 struct qla_hw_data *ha = vha->hw;
1054 ha->isp_ops->read_optrom(vha, req->ring, QLA82XX_IDC_PARAM_ADDR, 8);
1064 ql_dbg(ql_dbg_init, vha, 0x004e,
1072 qla2xxx_get_flash_info(scsi_qla_host_t *vha)
1076 struct qla_hw_data *ha = vha->hw;
1083 ret = qla2xxx_find_flt_start(vha, &flt_addr);
1087 qla2xxx_get_flt_info(vha, flt_addr);
1088 qla2xxx_get_fdt_info(vha);
1089 qla2xxx_get_idc_param(vha);
1095 qla2xxx_flash_npiv_conf(scsi_qla_host_t *vha)
1104 struct qla_hw_data *ha = vha->hw;
1116 ha->isp_ops->read_optrom(vha, &hdr, ha->flt_region_npiv_conf << 2,
1121 ql_dbg(ql_dbg_user, vha, 0x7090,
1131 ql_log(ql_log_warn, vha, 0x7091,
1136 ha->isp_ops->read_optrom(vha, data, ha->flt_region_npiv_conf << 2,
1143 ql_dbg(ql_dbg_user, vha, 0x7092,
1173 ql_dbg(ql_dbg_user, vha, 0x7093,
1180 vport = fc_vport_create(vha->host, 0, &vid);
1182 ql_log(ql_log_warn, vha, 0x7094,
1192 qla24xx_unprotect_flash(scsi_qla_host_t *vha)
1194 struct qla_hw_data *ha = vha->hw;
1198 return qla81xx_fac_do_write_enable(vha, 1);
1217 qla24xx_protect_flash(scsi_qla_host_t *vha)
1219 struct qla_hw_data *ha = vha->hw;
1225 return qla81xx_fac_do_write_enable(vha, 0);
1251 qla24xx_erase_sector(scsi_qla_host_t *vha, uint32_t fdata)
1253 struct qla_hw_data *ha = vha->hw;
1259 return qla81xx_fac_erase_sector(vha, flash_data_addr(ha,
1269 qla24xx_write_flash_data(scsi_qla_host_t *vha, __le32 *dwptr, uint32_t faddr,
1278 struct qla_hw_data *ha = vha->hw;
1288 ql_log(ql_log_warn, vha, 0x7095,
1293 ql_log(ql_log_warn + ql_dbg_verbose, vha, 0x7095,
1295 ret = qla24xx_unprotect_flash(vha);
1297 ql_log(ql_log_warn, vha, 0x7096,
1309 ql_log(ql_log_warn + ql_dbg_verbose, vha, 0x7095,
1312 ret = qla24xx_erase_sector(vha, fdata);
1314 ql_dbg(ql_dbg_user, vha, 0x7007,
1329 ql_log(ql_log_warn + ql_dbg_verbose, vha, 0x7095,
1331 ret = qla2x00_load_ram(vha, optrom_dma,
1340 ql_log(ql_log_warn, vha, 0x7097,
1350 ql_log(ql_log_warn, vha, 0x7098,
1358 ql_dbg(ql_dbg_user, vha, 0x7006,
1364 ql_log(ql_log_warn + ql_dbg_verbose, vha, 0x7095,
1366 ret = qla24xx_protect_flash(vha);
1368 ql_log(ql_log_warn, vha, 0x7099,
1379 qla2x00_read_nvram_data(scsi_qla_host_t *vha, void *buf, uint32_t naddr,
1384 struct qla_hw_data *ha = vha->hw;
1398 qla24xx_read_nvram_data(scsi_qla_host_t *vha, void *buf, uint32_t naddr,
1401 struct qla_hw_data *ha = vha->hw;
1421 qla2x00_write_nvram_data(scsi_qla_host_t *vha, void *buf, uint32_t naddr,
1428 struct qla_hw_data *ha = vha->hw;
1455 qla24xx_write_nvram_data(scsi_qla_host_t *vha, void *buf, uint32_t naddr,
1458 struct qla_hw_data *ha = vha->hw;
1483 ql_dbg(ql_dbg_user, vha, 0x709a,
1502 qla25xx_read_nvram_data(scsi_qla_host_t *vha, void *buf, uint32_t naddr,
1505 struct qla_hw_data *ha = vha->hw;
1524 qla25xx_write_nvram_data(scsi_qla_host_t *vha, void *buf, uint32_t naddr,
1527 struct qla_hw_data *ha = vha->hw;
1532 ha->isp_ops->read_optrom(vha, dbuf, ha->flt_region_vpd_nvram << 2,
1535 ha->isp_ops->write_optrom(vha, dbuf, ha->flt_region_vpd_nvram << 2,
1573 qla2x00_beacon_blink(struct scsi_qla_host *vha)
1579 struct qla_hw_data *ha = vha->hw;
1626 qla2x00_beacon_on(struct scsi_qla_host *vha)
1631 struct qla_hw_data *ha = vha->hw;
1637 if (qla2x00_set_fw_options(vha, ha->fw_options) != QLA_SUCCESS) {
1638 ql_log(ql_log_warn, vha, 0x709b,
1683 qla2x00_beacon_off(struct scsi_qla_host *vha)
1686 struct qla_hw_data *ha = vha->hw;
1696 ha->isp_ops->beacon_blink(vha); /* This turns green LED off */
1701 rval = qla2x00_set_fw_options(vha, ha->fw_options);
1703 ql_log(ql_log_warn, vha, 0x709c,
1725 qla24xx_beacon_blink(struct scsi_qla_host *vha)
1730 struct qla_hw_data *ha = vha->hw;
1776 qla83xx_beacon_blink(struct scsi_qla_host *vha)
1779 struct qla_hw_data *ha = vha->hw;
1792 qla2x00_write_ram_word(vha, 0x1003, 0x40000230);
1793 qla2x00_write_ram_word(vha, 0x1004, 0x40000230);
1797 qla83xx_wr_reg(vha, led_select_value, 0x40000230);
1798 qla83xx_wr_reg(vha, led_select_value + 4, 0x40000230);
1802 qla83xx_rd_reg(vha, led_select_value, &led_10_value);
1803 qla83xx_rd_reg(vha, led_select_value + 0x10, &led_43_value);
1804 qla83xx_wr_reg(vha, led_select_value, 0x01f44000);
1806 qla83xx_wr_reg(vha, led_select_value, 0x400001f4);
1808 qla83xx_wr_reg(vha, led_select_value, led_10_value);
1809 qla83xx_wr_reg(vha, led_select_value + 0x10, led_43_value);
1814 rval = qla81xx_get_led_config(vha, orig_led_cfg);
1832 rval = qla81xx_set_led_config(vha, led_cfg);
1846 rval = qla81xx_set_led_config(vha, led_cfg);
1849 qla81xx_set_led_config(vha, orig_led_cfg);
1854 qla24xx_beacon_on(struct scsi_qla_host *vha)
1858 struct qla_hw_data *ha = vha->hw;
1871 if (qla2x00_set_fw_options(vha, ha->fw_options) != QLA_SUCCESS)
1874 if (qla2x00_get_fw_options(vha, ha->fw_options) !=
1876 ql_log(ql_log_warn, vha, 0x7009,
1906 qla24xx_beacon_off(struct scsi_qla_host *vha)
1910 struct qla_hw_data *ha = vha->hw;
1929 ha->isp_ops->beacon_blink(vha); /* Will flip to all off. */
1944 if (qla2x00_set_fw_options(vha, ha->fw_options) != QLA_SUCCESS) {
1945 ql_log(ql_log_warn, vha, 0x704d,
1950 if (qla2x00_get_fw_options(vha, ha->fw_options) != QLA_SUCCESS) {
1951 ql_log(ql_log_warn, vha, 0x704e,
2309 qla2x00_suspend_hba(struct scsi_qla_host *vha)
2313 struct qla_hw_data *ha = vha->hw;
2317 scsi_block_requests(vha->host);
2338 qla2x00_resume_hba(struct scsi_qla_host *vha)
2340 struct qla_hw_data *ha = vha->hw;
2344 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
2345 qla2xxx_wake_dpc(vha);
2346 qla2x00_wait_for_chip_reset(vha);
2347 scsi_unblock_requests(vha->host);
2351 qla2x00_read_optrom_data(struct scsi_qla_host *vha, void *buf,
2356 struct qla_hw_data *ha = vha->hw;
2360 qla2x00_suspend_hba(vha);
2379 qla2x00_resume_hba(vha);
2385 qla2x00_write_optrom_data(struct scsi_qla_host *vha, void *buf,
2393 struct qla_hw_data *ha = vha->hw;
2397 qla2x00_suspend_hba(vha);
2598 qla2x00_resume_hba(vha);
2604 qla24xx_read_optrom_data(struct scsi_qla_host *vha, void *buf,
2607 struct qla_hw_data *ha = vha->hw;
2610 scsi_block_requests(vha->host);
2614 qla24xx_read_flash_data(vha, buf, offset >> 2, length >> 2);
2618 scsi_unblock_requests(vha->host);
2624 qla28xx_extract_sfub_and_verify(struct scsi_qla_host *vha, __le32 *buf,
2643 ql_log(ql_log_warn, vha, 0x7097,
2653 qla28xx_get_flash_region(struct scsi_qla_host *vha, uint32_t start,
2656 struct qla_hw_data *ha = vha->hw;
2679 qla28xx_write_flash_data(scsi_qla_host_t *vha, uint32_t *dwptr, uint32_t faddr,
2682 struct qla_hw_data *ha = vha->hw;
2699 rval = qla28xx_get_flash_region(vha, offset, &region);
2702 ql_log(ql_log_warn, vha, 0xffff,
2712 ql_log(ql_log_warn, vha, 0x7095,
2724 ql_log(ql_log_warn + ql_dbg_verbose, vha, 0xffff,
2777 ql_log(ql_log_warn + ql_dbg_verbose, vha,
2788 ql_log(ql_log_warn, vha, 0xffff,
2794 rval = qla28xx_extract_sfub_and_verify(vha, (__le32 *)dwptr,
2800 ql_log(ql_log_warn + ql_dbg_verbose, vha, 0xffff,
2808 rval = qla81xx_fac_semaphore_access(vha, FAC_SEMAPHORE_LOCK);
2810 ql_log(ql_log_warn, vha, 0xffff,
2815 ql_log(ql_log_warn + ql_dbg_verbose, vha, 0x7095,
2817 rval = qla24xx_unprotect_flash(vha);
2819 qla81xx_fac_semaphore_access(vha, FAC_SEMAPHORE_UNLOCK);
2820 ql_log(ql_log_warn, vha, 0x7096, "Failed unprotect flash\n");
2829 ql_log(ql_log_warn + ql_dbg_verbose, vha, 0x7095,
2831 rval = qla24xx_erase_sector(vha, fdata);
2833 ql_dbg(ql_dbg_user, vha, 0x7007,
2847 ql_log(ql_log_warn + ql_dbg_verbose, vha, 0xffff,
2849 rval = qla24xx_protect_flash(vha);
2851 qla81xx_fac_semaphore_access(vha,
2853 ql_log(ql_log_warn, vha, 0xffff,
2858 ql_log(ql_log_warn + ql_dbg_verbose, vha, 0xffff,
2860 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
2861 set_bit(ISP_ABORT_TO_ROM, &vha->dpc_flags);
2862 qla2xxx_wake_dpc(vha);
2863 rval = qla2x00_wait_for_chip_reset(vha);
2865 ql_log(ql_log_warn, vha, 0xffff,
2872 ql_log(ql_log_warn + ql_dbg_verbose, vha, 0xffff,
2874 rval = qla2xxx_write_remote_register(vha,
2877 ql_log(ql_log_warn, vha, 0xffff,
2883 ql_log(ql_log_warn + ql_dbg_verbose, vha, 0xffff,
2885 rval = qla2x00_write_ram_word(vha, 0x7ffd0101, 0);
2887 ql_log(ql_log_warn, vha, 0x7096,
2895 ql_log(ql_log_warn + ql_dbg_verbose, vha, 0xffff,
2897 rval = qla28xx_secure_flash_update(vha, 0,
2902 ql_log(ql_log_warn, vha, 0xffff,
2924 ql_log(ql_log_warn + ql_dbg_verbose, vha, 0x7095,
2926 rval = qla2x00_load_ram(vha, optrom_dma,
2929 ql_log(ql_log_warn, vha, 0x7097,
2942 ql_log(ql_log_warn + ql_dbg_verbose, vha, 0x7095,
2944 ret = qla24xx_protect_flash(vha);
2946 qla81xx_fac_semaphore_access(vha, FAC_SEMAPHORE_UNLOCK);
2947 ql_log(ql_log_warn, vha, 0x7099,
2954 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
2955 qla2xxx_wake_dpc(vha);
2957 ret = qla2x00_wait_for_hba_online(vha);
2959 ql_log(ql_log_warn, vha, 0xffff,
2974 qla24xx_write_optrom_data(struct scsi_qla_host *vha, void *buf,
2978 struct qla_hw_data *ha = vha->hw;
2981 scsi_block_requests(vha->host);
2986 rval = qla28xx_write_flash_data(vha, buf, offset >> 2,
2989 rval = qla24xx_write_flash_data(vha, buf, offset >> 2,
2993 scsi_unblock_requests(vha->host);
2999 qla25xx_read_optrom_data(struct scsi_qla_host *vha, void *buf,
3007 struct qla_hw_data *ha = vha->hw;
3023 ql_log(ql_log_warn, vha, 0x00cc,
3037 rval = qla2x00_dump_ram(vha, optrom_dma,
3040 ql_log(ql_log_warn, vha, 0x00f5,
3044 ql_log(ql_log_warn, vha, 0x00f6,
3065 return qla24xx_read_optrom_data(vha, buf, offset, length);
3161 qla2x00_get_flash_version(scsi_qla_host_t *vha, void *mbuf)
3168 struct qla_hw_data *ha = vha->hw;
3188 ql_log(ql_log_fatal, vha, 0x0050,
3205 ql_log(ql_log_fatal, vha, 0x0051,
3220 ql_dbg(ql_dbg_init, vha, 0x0052,
3235 ql_dbg(ql_dbg_init, vha, 0x0053,
3240 ql_log(ql_log_warn, vha, 0x0054,
3262 ql_dbg(ql_dbg_init + ql_dbg_buffer, vha, 0x010a,
3265 ql_dump_buffer(ql_dbg_init + ql_dbg_buffer, vha, 0x010b,
3272 ql_log(ql_log_warn, vha, 0x0057,
3280 ql_dbg(ql_dbg_init, vha, 0x0058,
3293 qla82xx_get_flash_version(scsi_qla_host_t *vha, void *mbuf)
3300 struct qla_hw_data *ha = vha->hw;
3315 ha->isp_ops->read_optrom(vha, dcode, pcihdr, 0x20 * 4);
3319 ql_log(ql_log_fatal, vha, 0x0154,
3328 ha->isp_ops->read_optrom(vha, dcode, pcids, 0x20 * 4);
3334 ql_log(ql_log_fatal, vha, 0x0155,
3347 ql_dbg(ql_dbg_init, vha, 0x0156,
3355 ql_dbg(ql_dbg_init, vha, 0x0157,
3363 ql_dbg(ql_dbg_init, vha, 0x0158,
3368 ql_log(ql_log_warn, vha, 0x0159,
3383 ha->isp_ops->read_optrom(vha, dcode, ha->flt_region_fw << 2, 0x20);
3392 ql_dbg(ql_dbg_init, vha, 0x0153,
3402 qla24xx_get_flash_version(scsi_qla_host_t *vha, void *mbuf)
3410 struct qla_hw_data *ha = vha->hw;
3427 qla27xx_get_active_image(vha, &active_regions);
3435 qla24xx_read_flash_data(vha, dcode, pcihdr >> 2, 0x20);
3439 ql_log(ql_log_fatal, vha, 0x0059,
3448 qla24xx_read_flash_data(vha, dcode, pcids >> 2, 0x20);
3454 ql_log(ql_log_fatal, vha, 0x005a,
3456 ql_dump_buffer(ql_dbg_init, vha, 0x0059, dcode, 32);
3468 ql_dbg(ql_dbg_init, vha, 0x005b,
3476 ql_dbg(ql_dbg_init, vha, 0x005c,
3484 ql_dbg(ql_dbg_init, vha, 0x005d,
3489 ql_log(ql_log_warn, vha, 0x005e,
3505 qla27xx_get_active_image(vha, &active_regions);
3510 qla24xx_read_flash_data(vha, dcode, faddr, 8);
3512 ql_log(ql_log_warn, vha, 0x005f,
3515 ql_dump_buffer(ql_dbg_init, vha, 0x005f, dcode, 32);
3520 ql_dbg(ql_dbg_init, vha, 0x0060,
3534 qla24xx_read_flash_data(vha, dcode, ha->flt_region_gold_fw, 8);
3536 ql_log(ql_log_warn, vha, 0x0056,
3538 ql_dump_buffer(ql_dbg_init, vha, 0x0056, dcode, 32);
3567 qla2xxx_get_vpd_field(scsi_qla_host_t *vha, char *key, char *str, size_t size)
3569 struct qla_hw_data *ha = vha->hw;
3596 qla24xx_read_fcp_prio_cfg(scsi_qla_host_t *vha)
3600 struct qla_hw_data *ha = vha->hw;
3605 ql_log(ql_log_warn, vha, 0x00d5,
3616 ha->isp_ops->read_optrom(vha, ha->fcp_prio_cfg,
3619 if (!qla24xx_fcp_prio_cfg_valid(vha, ha->fcp_prio_cfg, 0))
3627 ha->isp_ops->read_optrom(vha, &ha->fcp_prio_cfg->entry[0],
3631 if (!qla24xx_fcp_prio_cfg_valid(vha, ha->fcp_prio_cfg, 1))