Lines Matching refs:ha
152 struct qla_hw_data *ha = vha->hw; in qla2x00_dfs_tgt_sess_show() local
161 spin_lock_irqsave(&ha->tgt.sess_lock, flags); in qla2x00_dfs_tgt_sess_show()
167 spin_unlock_irqrestore(&ha->tgt.sess_lock, flags); in qla2x00_dfs_tgt_sess_show()
179 struct qla_hw_data *ha = vha->hw; in qla2x00_dfs_tgt_port_database_show() local
188 gid_list = dma_alloc_coherent(&ha->pdev->dev, in qla2x00_dfs_tgt_port_database_show()
189 qla2x00_gid_list_size(ha), in qla2x00_dfs_tgt_port_database_show()
194 qla2x00_gid_list_size(ha)); in qla2x00_dfs_tgt_port_database_show()
220 id_iter += ha->gid_list_info_size; in qla2x00_dfs_tgt_port_database_show()
223 dma_free_coherent(&ha->pdev->dev, qla2x00_gid_list_size(ha), in qla2x00_dfs_tgt_port_database_show()
237 struct qla_hw_data *ha = vha->hw; in qla_dfs_fw_resource_cnt_show() local
265 iocbs_used = ha->base_qpair->fwres.iocbs_used; in qla_dfs_fw_resource_cnt_show()
266 exch_used = ha->base_qpair->fwres.exch_used; in qla_dfs_fw_resource_cnt_show()
267 for (i = 0; i < ha->max_qpairs; i++) { in qla_dfs_fw_resource_cnt_show()
268 if (ha->queue_pair_map[i]) { in qla_dfs_fw_resource_cnt_show()
269 iocbs_used += ha->queue_pair_map[i]->fwres.iocbs_used; in qla_dfs_fw_resource_cnt_show()
270 exch_used += ha->queue_pair_map[i]->fwres.exch_used; in qla_dfs_fw_resource_cnt_show()
275 iocbs_used, ha->base_qpair->fwres.iocbs_limit); in qla_dfs_fw_resource_cnt_show()
278 exch_used, ha->base_qpair->fwres.exch_limit); in qla_dfs_fw_resource_cnt_show()
281 iocbs_used = atomic_read(&ha->fwres.iocb_used); in qla_dfs_fw_resource_cnt_show()
282 exch_used = atomic_read(&ha->fwres.exch_used); in qla_dfs_fw_resource_cnt_show()
284 iocbs_used, ha->fwres.iocb_limit); in qla_dfs_fw_resource_cnt_show()
287 exch_used, ha->fwres.exch_limit); in qla_dfs_fw_resource_cnt_show()
408 struct qla_hw_data *ha = vha->hw; in qla2x00_dfs_fce_show() local
410 mutex_lock(&ha->fce_mutex); in qla2x00_dfs_fce_show()
413 seq_printf(s, "In Pointer = %llx\n\n", (unsigned long long)ha->fce_wr); in qla2x00_dfs_fce_show()
414 seq_printf(s, "Base = %llx\n\n", (unsigned long long) ha->fce_dma); in qla2x00_dfs_fce_show()
417 ha->fce_mb[0], ha->fce_mb[2], ha->fce_mb[3], ha->fce_mb[4], in qla2x00_dfs_fce_show()
418 ha->fce_mb[5], ha->fce_mb[6]); in qla2x00_dfs_fce_show()
420 fce = (uint32_t *) ha->fce; in qla2x00_dfs_fce_show()
421 fce_start = (unsigned long long) ha->fce_dma; in qla2x00_dfs_fce_show()
422 for (cnt = 0; cnt < fce_calc_size(ha->fce_bufs) / 4; cnt++) { in qla2x00_dfs_fce_show()
433 mutex_unlock(&ha->fce_mutex); in qla2x00_dfs_fce_show()
442 struct qla_hw_data *ha = vha->hw; in qla2x00_dfs_fce_open() local
445 if (!ha->flags.fce_enabled) in qla2x00_dfs_fce_open()
448 mutex_lock(&ha->fce_mutex); in qla2x00_dfs_fce_open()
451 rval = qla2x00_disable_fce_trace(vha, &ha->fce_wr, &ha->fce_rd); in qla2x00_dfs_fce_open()
456 ha->flags.fce_enabled = 0; in qla2x00_dfs_fce_open()
458 mutex_unlock(&ha->fce_mutex); in qla2x00_dfs_fce_open()
467 struct qla_hw_data *ha = vha->hw; in qla2x00_dfs_fce_release() local
470 if (ha->flags.fce_enabled) in qla2x00_dfs_fce_release()
473 mutex_lock(&ha->fce_mutex); in qla2x00_dfs_fce_release()
476 ha->flags.fce_enabled = 1; in qla2x00_dfs_fce_release()
477 memset(ha->fce, 0, fce_calc_size(ha->fce_bufs)); in qla2x00_dfs_fce_release()
478 rval = qla2x00_enable_fce_trace(vha, ha->fce_dma, ha->fce_bufs, in qla2x00_dfs_fce_release()
479 ha->fce_mb, &ha->fce_bufs); in qla2x00_dfs_fce_release()
483 ha->flags.fce_enabled = 0; in qla2x00_dfs_fce_release()
486 mutex_unlock(&ha->fce_mutex); in qla2x00_dfs_fce_release()
502 struct qla_hw_data *ha = vha->hw; in qla_dfs_naqp_show() local
504 seq_printf(s, "%d\n", ha->tgt.num_act_qpairs); in qla_dfs_naqp_show()
615 struct qla_hw_data *ha = vha->hw; in qla_dfs_naqp_write() local
620 if (!(IS_QLA27XX(ha) || IS_QLA83XX(ha) || IS_QLA28XX(ha))) { in qla_dfs_naqp_write()
647 if (num_act_qp != ha->tgt.num_act_qpairs) { in qla_dfs_naqp_write()
648 ha->tgt.num_act_qpairs = num_act_qp; in qla_dfs_naqp_write()
669 struct qla_hw_data *ha = vha->hw; in qla2x00_dfs_setup() local
671 if (!IS_QLA25XX(ha) && !IS_QLA81XX(ha) && !IS_QLA83XX(ha) && in qla2x00_dfs_setup()
672 !IS_QLA27XX(ha) && !IS_QLA28XX(ha)) in qla2x00_dfs_setup()
674 if (!ha->fce) in qla2x00_dfs_setup()
684 if (ha->dfs_dir) in qla2x00_dfs_setup()
687 mutex_init(&ha->fce_mutex); in qla2x00_dfs_setup()
688 ha->dfs_dir = debugfs_create_dir(vha->host_str, qla2x00_dfs_root); in qla2x00_dfs_setup()
693 ha->dfs_fw_resource_cnt = debugfs_create_file("fw_resource_count", in qla2x00_dfs_setup()
694 S_IRUSR, ha->dfs_dir, vha, &qla_dfs_fw_resource_cnt_fops); in qla2x00_dfs_setup()
696 ha->dfs_tgt_counters = debugfs_create_file("tgt_counters", S_IRUSR, in qla2x00_dfs_setup()
697 ha->dfs_dir, vha, &qla_dfs_tgt_counters_fops); in qla2x00_dfs_setup()
699 ha->tgt.dfs_tgt_port_database = debugfs_create_file("tgt_port_database", in qla2x00_dfs_setup()
700 S_IRUSR, ha->dfs_dir, vha, &qla2x00_dfs_tgt_port_database_fops); in qla2x00_dfs_setup()
702 ha->dfs_fce = debugfs_create_file("fce", S_IRUSR, ha->dfs_dir, vha, in qla2x00_dfs_setup()
705 ha->tgt.dfs_tgt_sess = debugfs_create_file("tgt_sess", in qla2x00_dfs_setup()
706 S_IRUSR, ha->dfs_dir, vha, &qla2x00_dfs_tgt_sess_fops); in qla2x00_dfs_setup()
708 if (IS_QLA27XX(ha) || IS_QLA83XX(ha) || IS_QLA28XX(ha)) { in qla2x00_dfs_setup()
709 ha->tgt.dfs_naqp = debugfs_create_file("naqp", in qla2x00_dfs_setup()
710 0400, ha->dfs_dir, vha, &dfs_naqp_ops); in qla2x00_dfs_setup()
711 if (IS_ERR(ha->tgt.dfs_naqp)) { in qla2x00_dfs_setup()
717 vha->dfs_rport_root = debugfs_create_dir("rports", ha->dfs_dir); in qla2x00_dfs_setup()
730 struct qla_hw_data *ha = vha->hw; in qla2x00_dfs_remove() local
732 if (ha->tgt.dfs_naqp) { in qla2x00_dfs_remove()
733 debugfs_remove(ha->tgt.dfs_naqp); in qla2x00_dfs_remove()
734 ha->tgt.dfs_naqp = NULL; in qla2x00_dfs_remove()
737 if (ha->tgt.dfs_tgt_sess) { in qla2x00_dfs_remove()
738 debugfs_remove(ha->tgt.dfs_tgt_sess); in qla2x00_dfs_remove()
739 ha->tgt.dfs_tgt_sess = NULL; in qla2x00_dfs_remove()
742 if (ha->tgt.dfs_tgt_port_database) { in qla2x00_dfs_remove()
743 debugfs_remove(ha->tgt.dfs_tgt_port_database); in qla2x00_dfs_remove()
744 ha->tgt.dfs_tgt_port_database = NULL; in qla2x00_dfs_remove()
747 if (ha->dfs_fw_resource_cnt) { in qla2x00_dfs_remove()
748 debugfs_remove(ha->dfs_fw_resource_cnt); in qla2x00_dfs_remove()
749 ha->dfs_fw_resource_cnt = NULL; in qla2x00_dfs_remove()
752 if (ha->dfs_tgt_counters) { in qla2x00_dfs_remove()
753 debugfs_remove(ha->dfs_tgt_counters); in qla2x00_dfs_remove()
754 ha->dfs_tgt_counters = NULL; in qla2x00_dfs_remove()
757 if (ha->dfs_fce) { in qla2x00_dfs_remove()
758 debugfs_remove(ha->dfs_fce); in qla2x00_dfs_remove()
759 ha->dfs_fce = NULL; in qla2x00_dfs_remove()
767 if (ha->dfs_dir) { in qla2x00_dfs_remove()
768 debugfs_remove(ha->dfs_dir); in qla2x00_dfs_remove()
769 ha->dfs_dir = NULL; in qla2x00_dfs_remove()