Lines Matching refs:ha
48 struct qla_hw_data *ha = vha->hw; in qla2x00_mailbox_command() local
49 scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); in qla2x00_mailbox_command()
54 if (ha->pdev->error_state > pci_channel_io_frozen) { in qla2x00_mailbox_command()
67 reg = ha->iobase; in qla2x00_mailbox_command()
74 if (ha->flags.pci_channel_io_perm_failure) { in qla2x00_mailbox_command()
80 if (IS_P3P_TYPE(ha) && ha->flags.isp82xx_fw_hung) { in qla2x00_mailbox_command()
84 "FW hung = %d.\n", ha->flags.isp82xx_fw_hung); in qla2x00_mailbox_command()
93 if (!wait_for_completion_timeout(&ha->mbx_cmd_comp, mcp->tov * HZ)) { in qla2x00_mailbox_command()
101 ha->flags.mbox_busy = 1; in qla2x00_mailbox_command()
103 ha->mcp = mcp; in qla2x00_mailbox_command()
108 spin_lock_irqsave(&ha->hardware_lock, flags); in qla2x00_mailbox_command()
111 if (IS_P3P_TYPE(ha)) in qla2x00_mailbox_command()
113 else if (IS_FWI2_CAPABLE(ha) && !(IS_P3P_TYPE(ha))) in qla2x00_mailbox_command()
116 optr = (uint16_t __iomem *)MAILBOX_REG(ha, ®->isp, 0); in qla2x00_mailbox_command()
124 for (cnt = 0; cnt < ha->mbx_count; cnt++) { in qla2x00_mailbox_command()
125 if (IS_QLA2200(ha) && cnt == 8) in qla2x00_mailbox_command()
127 (uint16_t __iomem *)MAILBOX_REG(ha, ®->isp, 8); in qla2x00_mailbox_command()
143 ha->flags.mbox_int = 0; in qla2x00_mailbox_command()
144 clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); in qla2x00_mailbox_command()
153 if ((!abort_active && io_lock_on) || IS_NOPOLLING_TYPE(ha)) { in qla2x00_mailbox_command()
154 set_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags); in qla2x00_mailbox_command()
156 if (IS_P3P_TYPE(ha)) { in qla2x00_mailbox_command()
159 spin_unlock_irqrestore(&ha->hardware_lock, in qla2x00_mailbox_command()
161 ha->flags.mbox_busy = 0; in qla2x00_mailbox_command()
168 } else if (IS_FWI2_CAPABLE(ha)) in qla2x00_mailbox_command()
172 spin_unlock_irqrestore(&ha->hardware_lock, flags); in qla2x00_mailbox_command()
174 if (!wait_for_completion_timeout(&ha->mbx_intr_comp, in qla2x00_mailbox_command()
178 spin_lock_irqsave(&ha->hardware_lock, flags); in qla2x00_mailbox_command()
179 clear_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags); in qla2x00_mailbox_command()
180 spin_unlock_irqrestore(&ha->hardware_lock, flags); in qla2x00_mailbox_command()
186 if (IS_P3P_TYPE(ha)) { in qla2x00_mailbox_command()
189 spin_unlock_irqrestore(&ha->hardware_lock, in qla2x00_mailbox_command()
191 ha->flags.mbox_busy = 0; in qla2x00_mailbox_command()
198 } else if (IS_FWI2_CAPABLE(ha)) in qla2x00_mailbox_command()
202 spin_unlock_irqrestore(&ha->hardware_lock, flags); in qla2x00_mailbox_command()
205 while (!ha->flags.mbox_int) { in qla2x00_mailbox_command()
210 qla2x00_poll(ha->rsp_q_map[0]); in qla2x00_mailbox_command()
212 if (!ha->flags.mbox_int && in qla2x00_mailbox_command()
213 !(IS_QLA2200(ha) && in qla2x00_mailbox_command()
223 if (ha->flags.mbox_int) { in qla2x00_mailbox_command()
230 ha->flags.mbox_int = 0; in qla2x00_mailbox_command()
231 clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); in qla2x00_mailbox_command()
233 if (IS_P3P_TYPE(ha) && ha->flags.isp82xx_fw_hung) { in qla2x00_mailbox_command()
234 ha->flags.mbox_busy = 0; in qla2x00_mailbox_command()
237 ha->mcp = NULL; in qla2x00_mailbox_command()
240 "FW hung = %d.\n", ha->flags.isp82xx_fw_hung); in qla2x00_mailbox_command()
244 if (ha->mailbox_out[0] != MBS_COMMAND_COMPLETE) in qla2x00_mailbox_command()
249 iptr = (uint16_t *)&ha->mailbox_out[0]; in qla2x00_mailbox_command()
254 for (cnt = 0; cnt < ha->mbx_count; cnt++) { in qla2x00_mailbox_command()
270 if (IS_FWI2_CAPABLE(ha)) { in qla2x00_mailbox_command()
274 mb0 = RD_MAILBOX_REG(ha, ®->isp, 0); in qla2x00_mailbox_command()
288 ha->isp_ops->fw_dump(vha, 0); in qla2x00_mailbox_command()
293 ha->flags.mbox_busy = 0; in qla2x00_mailbox_command()
296 ha->mcp = NULL; in qla2x00_mailbox_command()
298 if ((abort_active || !io_lock_on) && !IS_NOPOLLING_TYPE(ha)) { in qla2x00_mailbox_command()
303 qla2x00_poll(ha->rsp_q_map[0]); in qla2x00_mailbox_command()
309 ha->flags.eeh_busy) { in qla2x00_mailbox_command()
317 if (IS_QLA82XX(ha)) { in qla2x00_mailbox_command()
321 qla82xx_wr_32(ha, in qla2x00_mailbox_command()
330 ha->flags.eeh_busy); in qla2x00_mailbox_command()
342 if (IS_QLA82XX(ha)) { in qla2x00_mailbox_command()
346 qla82xx_wr_32(ha, in qla2x00_mailbox_command()
358 complete(&ha->mbx_cmd_comp); in qla2x00_mailbox_command()
359 if (ha->isp_ops->abort_isp(vha)) { in qla2x00_mailbox_command()
374 complete(&ha->mbx_cmd_comp); in qla2x00_mailbox_command()
385 ha->fw_dump_cap_flags, in qla2x00_mailbox_command()
405 struct qla_hw_data *ha = vha->hw; in qla2x00_load_ram() local
412 if (MSW(risc_addr) || IS_FWI2_CAPABLE(ha)) { in qla2x00_load_ram()
426 if (IS_FWI2_CAPABLE(ha)) { in qla2x00_load_ram()
471 struct qla_hw_data *ha = vha->hw; in qla2x00_execute_fw() local
481 if (IS_FWI2_CAPABLE(ha)) { in qla2x00_execute_fw()
485 if (IS_QLA25XX(ha) || IS_QLA81XX(ha) || IS_QLA83XX(ha) || in qla2x00_execute_fw()
486 IS_QLA27XX(ha)) { in qla2x00_execute_fw()
487 struct nvram_81xx *nv = ha->nvram; in qla2x00_execute_fw()
497 if (IS_QLA2322(ha) || IS_QLA6322(ha)) { in qla2x00_execute_fw()
511 if (IS_FWI2_CAPABLE(ha)) { in qla2x00_execute_fw()
545 struct qla_hw_data *ha = vha->hw; in qla2x00_get_fw_version() local
553 if (IS_QLA81XX(vha->hw) || IS_QLA8031(ha) || IS_QLA8044(ha)) in qla2x00_get_fw_version()
555 if (IS_FWI2_CAPABLE(ha)) in qla2x00_get_fw_version()
557 if (IS_QLA27XX(ha)) in qla2x00_get_fw_version()
568 ha->fw_major_version = mcp->mb[1]; in qla2x00_get_fw_version()
569 ha->fw_minor_version = mcp->mb[2]; in qla2x00_get_fw_version()
570 ha->fw_subminor_version = mcp->mb[3]; in qla2x00_get_fw_version()
571 ha->fw_attributes = mcp->mb[6]; in qla2x00_get_fw_version()
573 ha->fw_memory_size = 0x1FFFF; /* Defaults to 128KB. */ in qla2x00_get_fw_version()
575 ha->fw_memory_size = (mcp->mb[5] << 16) | mcp->mb[4]; in qla2x00_get_fw_version()
577 if (IS_QLA81XX(vha->hw) || IS_QLA8031(vha->hw) || IS_QLA8044(ha)) { in qla2x00_get_fw_version()
578 ha->mpi_version[0] = mcp->mb[10] & 0xff; in qla2x00_get_fw_version()
579 ha->mpi_version[1] = mcp->mb[11] >> 8; in qla2x00_get_fw_version()
580 ha->mpi_version[2] = mcp->mb[11] & 0xff; in qla2x00_get_fw_version()
581 ha->mpi_capabilities = (mcp->mb[12] << 16) | mcp->mb[13]; in qla2x00_get_fw_version()
582 ha->phy_version[0] = mcp->mb[8] & 0xff; in qla2x00_get_fw_version()
583 ha->phy_version[1] = mcp->mb[9] >> 8; in qla2x00_get_fw_version()
584 ha->phy_version[2] = mcp->mb[9] & 0xff; in qla2x00_get_fw_version()
587 if (IS_FWI2_CAPABLE(ha)) { in qla2x00_get_fw_version()
588 ha->fw_attributes_h = mcp->mb[15]; in qla2x00_get_fw_version()
589 ha->fw_attributes_ext[0] = mcp->mb[16]; in qla2x00_get_fw_version()
590 ha->fw_attributes_ext[1] = mcp->mb[17]; in qla2x00_get_fw_version()
599 if (IS_QLA27XX(ha)) { in qla2x00_get_fw_version()
600 ha->mpi_version[0] = mcp->mb[10] & 0xff; in qla2x00_get_fw_version()
601 ha->mpi_version[1] = mcp->mb[11] >> 8; in qla2x00_get_fw_version()
602 ha->mpi_version[2] = mcp->mb[11] & 0xff; in qla2x00_get_fw_version()
603 ha->pep_version[0] = mcp->mb[13] & 0xff; in qla2x00_get_fw_version()
604 ha->pep_version[1] = mcp->mb[14] >> 8; in qla2x00_get_fw_version()
605 ha->pep_version[2] = mcp->mb[14] & 0xff; in qla2x00_get_fw_version()
606 ha->fw_shared_ram_start = (mcp->mb[19] << 16) | mcp->mb[18]; in qla2x00_get_fw_version()
607 ha->fw_shared_ram_end = (mcp->mb[21] << 16) | mcp->mb[20]; in qla2x00_get_fw_version()
931 struct qla_hw_data *ha = vha->hw; in qla2x00_abort_command() local
938 spin_lock_irqsave(&ha->hardware_lock, flags); in qla2x00_abort_command()
943 spin_unlock_irqrestore(&ha->hardware_lock, flags); in qla2x00_abort_command()
951 if (HAS_EXTENDED_IDS(ha)) in qla2x00_abort_command()
1249 struct qla_hw_data *ha = vha->hw; in qla2x00_init_firmware() local
1254 if (IS_P3P_TYPE(ha) && ql2xdbwr) in qla2x00_init_firmware()
1255 qla82xx_wr_32(ha, (uintptr_t __force)ha->nxdb_wr_ptr, in qla2x00_init_firmware()
1256 (0x04 | (ha->portnum << 5) | (0 << 8) | (0 << 16))); in qla2x00_init_firmware()
1258 if (ha->flags.npiv_supported) in qla2x00_init_firmware()
1264 mcp->mb[2] = MSW(ha->init_cb_dma); in qla2x00_init_firmware()
1265 mcp->mb[3] = LSW(ha->init_cb_dma); in qla2x00_init_firmware()
1266 mcp->mb[6] = MSW(MSD(ha->init_cb_dma)); in qla2x00_init_firmware()
1267 mcp->mb[7] = LSW(MSD(ha->init_cb_dma)); in qla2x00_init_firmware()
1269 if (ha->ex_init_cb && ha->ex_init_cb->ex_version) { in qla2x00_init_firmware()
1271 mcp->mb[10] = MSW(ha->ex_init_cb_dma); in qla2x00_init_firmware()
1272 mcp->mb[11] = LSW(ha->ex_init_cb_dma); in qla2x00_init_firmware()
1273 mcp->mb[12] = MSW(MSD(ha->ex_init_cb_dma)); in qla2x00_init_firmware()
1274 mcp->mb[13] = LSW(MSD(ha->ex_init_cb_dma)); in qla2x00_init_firmware()
1275 mcp->mb[14] = sizeof(*ha->ex_init_cb); in qla2x00_init_firmware()
1280 if (IS_QLA83XX(ha) || IS_QLA27XX(ha)) in qla2x00_init_firmware()
1321 struct qla_hw_data *ha = vha->hw; in qla2x00_get_node_name_list() local
1332 pmap = dma_alloc_coherent(&ha->pdev->dev, dma_size, in qla2x00_get_node_name_list()
1377 dma_free_coherent(&ha->pdev->dev, dma_size, pmap, pmap_dma); in qla2x00_get_node_name_list()
1387 dma_free_coherent(&ha->pdev->dev, dma_size, pmap, pmap_dma); in qla2x00_get_node_name_list()
1416 struct qla_hw_data *ha = vha->hw; in qla2x00_get_port_database() local
1422 pd = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &pd_dma); in qla2x00_get_port_database()
1431 if (opt != 0 && !IS_FWI2_CAPABLE(ha)) in qla2x00_get_port_database()
1440 if (IS_FWI2_CAPABLE(ha)) { in qla2x00_get_port_database()
1445 } else if (HAS_EXTENDED_IDS(ha)) { in qla2x00_get_port_database()
1453 mcp->buf_size = IS_FWI2_CAPABLE(ha) ? in qla2x00_get_port_database()
1456 mcp->tov = (ha->login_timeout * 2) + (ha->login_timeout / 2); in qla2x00_get_port_database()
1461 if (IS_FWI2_CAPABLE(ha)) { in qla2x00_get_port_database()
1551 dma_pool_free(ha->s_dma_pool, pd, pd_dma); in qla2x00_get_port_database()
1879 struct qla_hw_data *ha = vha->hw; in qla24xx_login_fabric() local
1885 if (ha->flags.cpu_affinity_enabled) in qla24xx_login_fabric()
1886 req = ha->req_q_map[0]; in qla24xx_login_fabric()
1890 lg = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &lg_dma); in qla24xx_login_fabric()
1912 (ha->r_a_tov / 10 * 2) + 2); in qla24xx_login_fabric()
1981 dma_pool_free(ha->s_dma_pool, lg, lg_dma); in qla24xx_login_fabric()
2014 struct qla_hw_data *ha = vha->hw; in qla2x00_login_fabric() local
2021 if (HAS_EXTENDED_IDS(ha)) { in qla2x00_login_fabric()
2032 mcp->tov = (ha->login_timeout * 2) + (ha->login_timeout / 2); in qla2x00_login_fabric()
2095 struct qla_hw_data *ha = vha->hw; in qla2x00_login_local_device() local
2100 if (IS_FWI2_CAPABLE(ha)) in qla2x00_login_local_device()
2106 if (HAS_EXTENDED_IDS(ha)) in qla2x00_login_local_device()
2113 mcp->tov = (ha->login_timeout * 2) + (ha->login_timeout / 2); in qla2x00_login_local_device()
2154 struct qla_hw_data *ha = vha->hw; in qla24xx_fabric_logout() local
2160 lg = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &lg_dma); in qla24xx_fabric_logout()
2169 req = ha->req_q_map[0]; in qla24xx_fabric_logout()
2184 (ha->r_a_tov / 10 * 2) + 2); in qla24xx_fabric_logout()
2205 dma_pool_free(ha->s_dma_pool, lg, lg_dma); in qla24xx_fabric_logout()
2457 struct qla_hw_data *ha = vha->hw; in qla2x00_get_fcal_position_map() local
2462 pmap = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &pmap_dma); in qla2x00_get_fcal_position_map()
2479 mcp->tov = (ha->login_timeout * 2) + (ha->login_timeout / 2); in qla2x00_get_fcal_position_map()
2492 dma_pool_free(ha->s_dma_pool, pmap, pmap_dma); in qla2x00_get_fcal_position_map()
2525 struct qla_hw_data *ha = vha->hw; in qla2x00_get_link_status() local
2537 if (IS_FWI2_CAPABLE(ha)) { in qla2x00_get_link_status()
2543 } else if (HAS_EXTENDED_IDS(ha)) { in qla2x00_get_link_status()
2636 struct qla_hw_data *ha = vha->hw; in qla24xx_abort_command() local
2645 spin_lock_irqsave(&ha->hardware_lock, flags); in qla24xx_abort_command()
2650 spin_unlock_irqrestore(&ha->hardware_lock, flags); in qla24xx_abort_command()
2656 abt = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &abt_dma); in qla24xx_abort_command()
2698 dma_pool_free(ha->s_dma_pool, abt, abt_dma); in qla24xx_abort_command()
2719 struct qla_hw_data *ha; in __qla24xx_issue_tmf() local
2724 ha = vha->hw; in __qla24xx_issue_tmf()
2730 if (ha->flags.cpu_affinity_enabled) in __qla24xx_issue_tmf()
2731 rsp = ha->rsp_q_map[tag + 1]; in __qla24xx_issue_tmf()
2734 tsk = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &tsk_dma); in __qla24xx_issue_tmf()
2746 tsk->p.tsk.timeout = cpu_to_le16(ha->r_a_tov / 10 * 2); in __qla24xx_issue_tmf()
2799 dma_pool_free(ha->s_dma_pool, tsk, tsk_dma); in __qla24xx_issue_tmf()
2807 struct qla_hw_data *ha = fcport->vha->hw; in qla24xx_abort_target() local
2809 if ((ql2xasynctmfenable) && IS_FWI2_CAPABLE(ha)) in qla24xx_abort_target()
2818 struct qla_hw_data *ha = fcport->vha->hw; in qla24xx_lun_reset() local
2820 if ((ql2xasynctmfenable) && IS_FWI2_CAPABLE(ha)) in qla24xx_lun_reset()
2832 struct qla_hw_data *ha = vha->hw; in qla2x00_system_error() local
2834 if (!IS_QLA23XX(ha) && !IS_FWI2_CAPABLE(ha)) in qla2x00_system_error()
3353 struct qla_hw_data *ha = vha->hw; in qla24xx_report_id_acquisition() local
3384 void *wwpn = ha->init_cb->port_name; in qla24xx_report_id_acquisition()
3409 spin_lock_irqsave(&ha->vport_slock, flags); in qla24xx_report_id_acquisition()
3410 list_for_each_entry(vp, &ha->vp_list, list) { in qla24xx_report_id_acquisition()
3416 spin_unlock_irqrestore(&ha->vport_slock, flags); in qla24xx_report_id_acquisition()
3458 struct qla_hw_data *ha = vha->hw; in qla24xx_modify_vp_config() local
3459 struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); in qla24xx_modify_vp_config()
3466 vpmod = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &vpmod_dma); in qla24xx_modify_vp_config()
3507 dma_pool_free(ha->s_dma_pool, vpmod, vpmod_dma); in qla24xx_modify_vp_config()
3534 struct qla_hw_data *ha = vha->hw; in qla24xx_control_vp() local
3536 struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); in qla24xx_control_vp()
3541 if (vp_index == 0 || vp_index >= ha->max_npiv_vports) in qla24xx_control_vp()
3544 vce = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &vce_dma); in qla24xx_control_vp()
3562 mutex_lock(&ha->vport_lock); in qla24xx_control_vp()
3564 mutex_unlock(&ha->vport_lock); in qla24xx_control_vp()
3585 dma_pool_free(ha->s_dma_pool, vce, vce_dma); in qla24xx_control_vp()
3707 struct qla_hw_data *ha = vha->hw; in qla84xx_verify_chip() local
3712 mn = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &mn_dma); in qla84xx_verify_chip()
3718 options = ha->cs84xx->fw_update ? VCO_FORCE_UPDATE : 0; in qla84xx_verify_chip()
3770 spin_lock_irqsave(&ha->cs84xx->access_lock, flags); in qla84xx_verify_chip()
3771 ha->cs84xx->op_fw_version = in qla84xx_verify_chip()
3773 spin_unlock_irqrestore(&ha->cs84xx->access_lock, in qla84xx_verify_chip()
3779 dma_pool_free(ha->s_dma_pool, mn, mn_dma); in qla84xx_verify_chip()
3799 struct qla_hw_data *ha = vha->hw; in qla25xx_init_req_que() local
3804 if (IS_SHADOW_REG_CAPABLE(ha)) in qla25xx_init_req_que()
3819 if (IS_QLA83XX(ha) || IS_QLA27XX(ha)) in qla25xx_init_req_que()
3833 if (IS_QLA81XX(ha) || IS_QLA83XX(ha) || IS_QLA27XX(ha)) in qla25xx_init_req_que()
3835 if (IS_QLA83XX(ha) || IS_QLA27XX(ha)) { in qla25xx_init_req_que()
3841 spin_lock_irqsave(&ha->hardware_lock, flags); in qla25xx_init_req_que()
3844 if (!IS_QLA83XX(ha) && !IS_QLA27XX(ha)) in qla25xx_init_req_que()
3847 spin_unlock_irqrestore(&ha->hardware_lock, flags); in qla25xx_init_req_que()
3868 struct qla_hw_data *ha = vha->hw; in qla25xx_init_rsp_que() local
3873 if (IS_SHADOW_REG_CAPABLE(ha)) in qla25xx_init_rsp_que()
3885 if (IS_QLA83XX(ha) || IS_QLA27XX(ha)) in qla25xx_init_rsp_que()
3899 if (IS_QLA81XX(ha)) { in qla25xx_init_rsp_que()
3902 } else if (IS_QLA83XX(ha) || IS_QLA27XX(ha)) { in qla25xx_init_rsp_que()
3909 spin_lock_irqsave(&ha->hardware_lock, flags); in qla25xx_init_rsp_que()
3912 if (!IS_QLA83XX(ha) && !IS_QLA27XX(ha)) in qla25xx_init_rsp_que()
3916 spin_unlock_irqrestore(&ha->hardware_lock, flags); in qla25xx_init_rsp_que()
4105 struct qla_hw_data *ha = vha->hw; in qla82xx_set_driver_version() local
4107 if (!IS_P3P_TYPE(ha)) in qla82xx_set_driver_version()
4153 struct qla_hw_data *ha = vha->hw; in qla25xx_set_driver_version() local
4155 if (!IS_FWI2_CAPABLE(ha) || IS_QLA24XX_TYPE(ha) || IS_QLA81XX(ha) || in qla25xx_set_driver_version()
4156 IS_P3P_TYPE(ha)) in qla25xx_set_driver_version()
4162 str = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &str_dma); in qla25xx_set_driver_version()
4197 dma_pool_free(ha->s_dma_pool, str, str_dma); in qla25xx_set_driver_version()
4242 struct qla_hw_data *ha = vha->hw; in qla2x00_read_sfp() local
4247 if (!IS_FWI2_CAPABLE(ha)) in qla2x00_read_sfp()
4289 struct qla_hw_data *ha = vha->hw; in qla2x00_write_sfp() local
4294 if (!IS_FWI2_CAPABLE(ha)) in qla2x00_write_sfp()
4511 struct qla_hw_data *ha = vha->hw; in qla2x00_echo_test() local
4519 if (IS_CNA_CAPABLE(ha)) { in qla2x00_echo_test()
4537 if (IS_CNA_CAPABLE(ha)) in qla2x00_echo_test()
4541 if (IS_QLA24XX_TYPE(ha) || IS_QLA25XX(ha) || in qla2x00_echo_test()
4542 IS_CNA_CAPABLE(ha) || IS_QLA2031(ha)) in qla2x00_echo_test()
4544 if (IS_CNA_CAPABLE(ha) || IS_QLA2031(ha)) in qla2x00_echo_test()
4634 struct qla_hw_data *ha = vha->hw; in qla81xx_write_mpi_register() local
4635 struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; in qla81xx_write_mpi_register()
4642 clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); in qla81xx_write_mpi_register()
4663 &ha->mbx_cmd_flags); in qla81xx_write_mpi_register()
4674 if (test_and_clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags)) in qla81xx_write_mpi_register()
4696 struct qla_hw_data *ha = vha->hw; in qla2x00_get_data_rate() local
4701 if (!IS_FWI2_CAPABLE(ha)) in qla2x00_get_data_rate()
4708 if (IS_QLA83XX(ha) || IS_QLA27XX(ha)) in qla2x00_get_data_rate()
4720 ha->link_data_rate = mcp->mb[1]; in qla2x00_get_data_rate()
4732 struct qla_hw_data *ha = vha->hw; in qla81xx_get_port_config() local
4737 if (!IS_QLA81XX(ha) && !IS_QLA83XX(ha) && !IS_QLA8044(ha) && in qla81xx_get_port_config()
4738 !IS_QLA27XX(ha)) in qla81xx_get_port_config()
4798 struct qla_hw_data *ha = vha->hw; in qla24xx_set_fcp_prio() local
4803 if (!IS_QLA24XX_TYPE(ha) && !IS_QLA25XX(ha)) in qla24xx_set_fcp_prio()
4808 if (ha->flags.fcp_prio_enabled) in qla24xx_set_fcp_prio()
4840 struct qla_hw_data *ha = vha->hw; in qla2x00_get_thermal_temp() local
4843 if (!IS_FWI2_CAPABLE(ha) || IS_QLA24XX_TYPE(ha) || IS_QLA81XX(ha)) { in qla2x00_get_thermal_temp()
4849 if (IS_QLA25XX(ha)) { in qla2x00_get_thermal_temp()
4850 if (ha->pdev->subsystem_vendor == PCI_VENDOR_ID_QLOGIC && in qla2x00_get_thermal_temp()
4851 ha->pdev->subsystem_device == 0x0175) { in qla2x00_get_thermal_temp()
4857 if (ha->pdev->subsystem_vendor == PCI_VENDOR_ID_HP && in qla2x00_get_thermal_temp()
4858 ha->pdev->subsystem_device == 0x338e) { in qla2x00_get_thermal_temp()
4869 if (IS_QLA82XX(ha)) { in qla2x00_get_thermal_temp()
4873 } else if (IS_QLA8044(ha)) { in qla2x00_get_thermal_temp()
4887 struct qla_hw_data *ha = vha->hw; in qla82xx_mbx_intr_enable() local
4894 if (!IS_FWI2_CAPABLE(ha)) in qla82xx_mbx_intr_enable()
4922 struct qla_hw_data *ha = vha->hw; in qla82xx_mbx_intr_disable() local
4929 if (!IS_P3P_TYPE(ha)) in qla82xx_mbx_intr_disable()
4956 struct qla_hw_data *ha = vha->hw; in qla82xx_md_get_template_size() local
4987 ha->md_template_size = ((mcp->mb[3] << 16) | mcp->mb[2]); in qla82xx_md_get_template_size()
4988 if (!ha->md_template_size) { in qla82xx_md_get_template_size()
5000 struct qla_hw_data *ha = vha->hw; in qla82xx_md_get_template() local
5008 ha->md_tmplt_hdr = dma_alloc_coherent(&ha->pdev->dev, in qla82xx_md_get_template()
5009 ha->md_template_size, &ha->md_tmplt_hdr_dma, GFP_KERNEL); in qla82xx_md_get_template()
5010 if (!ha->md_tmplt_hdr) { in qla82xx_md_get_template()
5021 mcp->mb[4] = LSW(LSD(ha->md_tmplt_hdr_dma)); in qla82xx_md_get_template()
5022 mcp->mb[5] = MSW(LSD(ha->md_tmplt_hdr_dma)); in qla82xx_md_get_template()
5023 mcp->mb[6] = LSW(MSD(ha->md_tmplt_hdr_dma)); in qla82xx_md_get_template()
5024 mcp->mb[7] = MSW(MSD(ha->md_tmplt_hdr_dma)); in qla82xx_md_get_template()
5025 mcp->mb[8] = LSW(ha->md_template_size); in qla82xx_md_get_template()
5026 mcp->mb[9] = MSW(ha->md_template_size); in qla82xx_md_get_template()
5049 struct qla_hw_data *ha = vha->hw; in qla8044_md_get_template() local
5057 ha->md_tmplt_hdr = dma_alloc_coherent(&ha->pdev->dev, in qla8044_md_get_template()
5058 ha->md_template_size, &ha->md_tmplt_hdr_dma, GFP_KERNEL); in qla8044_md_get_template()
5059 if (!ha->md_tmplt_hdr) { in qla8044_md_get_template()
5066 while (offset < ha->md_template_size) { in qla8044_md_get_template()
5071 mcp->mb[4] = LSW(LSD(ha->md_tmplt_hdr_dma + offset)); in qla8044_md_get_template()
5072 mcp->mb[5] = MSW(LSD(ha->md_tmplt_hdr_dma + offset)); in qla8044_md_get_template()
5073 mcp->mb[6] = LSW(MSD(ha->md_tmplt_hdr_dma + offset)); in qla8044_md_get_template()
5074 mcp->mb[7] = MSW(MSD(ha->md_tmplt_hdr_dma + offset)); in qla8044_md_get_template()
5104 struct qla_hw_data *ha = vha->hw; in qla81xx_set_led_config() local
5108 if (!IS_QLA81XX(ha) && !IS_QLA8031(ha)) in qla81xx_set_led_config()
5118 if (IS_QLA8031(ha)) { in qla81xx_set_led_config()
5126 if (IS_QLA8031(ha)) in qla81xx_set_led_config()
5148 struct qla_hw_data *ha = vha->hw; in qla81xx_get_led_config() local
5152 if (!IS_QLA81XX(ha) && !IS_QLA8031(ha)) in qla81xx_get_led_config()
5163 if (IS_QLA8031(ha)) in qla81xx_get_led_config()
5175 if (IS_QLA8031(ha)) { in qla81xx_get_led_config()
5192 struct qla_hw_data *ha = vha->hw; in qla82xx_mbx_beacon_ctl() local
5196 if (!IS_P3P_TYPE(ha)) in qla82xx_mbx_beacon_ctl()
5230 struct qla_hw_data *ha = vha->hw; in qla83xx_wr_reg() local
5234 if (!IS_QLA83XX(ha) && !IS_QLA27XX(ha)) in qla83xx_wr_reg()
5267 struct qla_hw_data *ha = vha->hw; in qla2x00_port_logout() local
5271 if (IS_QLA2100(ha) || IS_QLA2200(ha)) { in qla2x00_port_logout()
5306 struct qla_hw_data *ha = vha->hw; in qla83xx_rd_reg() local
5309 if (!IS_QLA83XX(ha) && !IS_QLA27XX(ha)) in qla83xx_rd_reg()
5357 struct qla_hw_data *ha = vha->hw; in qla83xx_restart_nic_firmware() local
5359 if (!IS_QLA83XX(ha) && !IS_QLA27XX(ha)) in qla83xx_restart_nic_firmware()
5375 ha->isp_ops->fw_dump(vha, 0); in qla83xx_restart_nic_firmware()
5391 struct qla_hw_data *ha = vha->hw; in qla83xx_access_control() local
5393 if (!IS_QLA8031(ha)) in qla83xx_access_control()
5420 ha->isp_ops->fw_dump(vha, 0); in qla83xx_access_control()