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 for (i = 0; i < ha->max_qpairs; i++) { in qla_dfs_fw_resource_cnt_show()
267 if (ha->queue_pair_map[i]) in qla_dfs_fw_resource_cnt_show()
268 iocbs_used += ha->queue_pair_map[i]->fwres.iocbs_used; in qla_dfs_fw_resource_cnt_show()
272 iocbs_used, ha->base_qpair->fwres.iocbs_limit); in qla_dfs_fw_resource_cnt_show()
392 struct qla_hw_data *ha = vha->hw; in qla2x00_dfs_fce_show() local
394 mutex_lock(&ha->fce_mutex); in qla2x00_dfs_fce_show()
397 seq_printf(s, "In Pointer = %llx\n\n", (unsigned long long)ha->fce_wr); in qla2x00_dfs_fce_show()
398 seq_printf(s, "Base = %llx\n\n", (unsigned long long) ha->fce_dma); in qla2x00_dfs_fce_show()
401 ha->fce_mb[0], ha->fce_mb[2], ha->fce_mb[3], ha->fce_mb[4], in qla2x00_dfs_fce_show()
402 ha->fce_mb[5], ha->fce_mb[6]); in qla2x00_dfs_fce_show()
404 fce = (uint32_t *) ha->fce; in qla2x00_dfs_fce_show()
405 fce_start = (unsigned long long) ha->fce_dma; in qla2x00_dfs_fce_show()
406 for (cnt = 0; cnt < fce_calc_size(ha->fce_bufs) / 4; cnt++) { in qla2x00_dfs_fce_show()
417 mutex_unlock(&ha->fce_mutex); in qla2x00_dfs_fce_show()
426 struct qla_hw_data *ha = vha->hw; in qla2x00_dfs_fce_open() local
429 if (!ha->flags.fce_enabled) in qla2x00_dfs_fce_open()
432 mutex_lock(&ha->fce_mutex); in qla2x00_dfs_fce_open()
435 rval = qla2x00_disable_fce_trace(vha, &ha->fce_wr, &ha->fce_rd); in qla2x00_dfs_fce_open()
440 ha->flags.fce_enabled = 0; in qla2x00_dfs_fce_open()
442 mutex_unlock(&ha->fce_mutex); in qla2x00_dfs_fce_open()
451 struct qla_hw_data *ha = vha->hw; in qla2x00_dfs_fce_release() local
454 if (ha->flags.fce_enabled) in qla2x00_dfs_fce_release()
457 mutex_lock(&ha->fce_mutex); in qla2x00_dfs_fce_release()
460 ha->flags.fce_enabled = 1; in qla2x00_dfs_fce_release()
461 memset(ha->fce, 0, fce_calc_size(ha->fce_bufs)); in qla2x00_dfs_fce_release()
462 rval = qla2x00_enable_fce_trace(vha, ha->fce_dma, ha->fce_bufs, in qla2x00_dfs_fce_release()
463 ha->fce_mb, &ha->fce_bufs); in qla2x00_dfs_fce_release()
467 ha->flags.fce_enabled = 0; in qla2x00_dfs_fce_release()
470 mutex_unlock(&ha->fce_mutex); in qla2x00_dfs_fce_release()
486 struct qla_hw_data *ha = vha->hw; in qla_dfs_naqp_show() local
488 seq_printf(s, "%d\n", ha->tgt.num_act_qpairs); in qla_dfs_naqp_show()
506 struct qla_hw_data *ha = vha->hw; in qla_dfs_naqp_write() local
511 if (!(IS_QLA27XX(ha) || IS_QLA83XX(ha) || IS_QLA28XX(ha))) { in qla_dfs_naqp_write()
538 if (num_act_qp != ha->tgt.num_act_qpairs) { in qla_dfs_naqp_write()
539 ha->tgt.num_act_qpairs = num_act_qp; in qla_dfs_naqp_write()
560 struct qla_hw_data *ha = vha->hw; in qla2x00_dfs_setup() local
562 if (!IS_QLA25XX(ha) && !IS_QLA81XX(ha) && !IS_QLA83XX(ha) && in qla2x00_dfs_setup()
563 !IS_QLA27XX(ha) && !IS_QLA28XX(ha)) in qla2x00_dfs_setup()
565 if (!ha->fce) in qla2x00_dfs_setup()
575 if (ha->dfs_dir) in qla2x00_dfs_setup()
578 mutex_init(&ha->fce_mutex); in qla2x00_dfs_setup()
579 ha->dfs_dir = debugfs_create_dir(vha->host_str, qla2x00_dfs_root); in qla2x00_dfs_setup()
584 ha->dfs_fw_resource_cnt = debugfs_create_file("fw_resource_count", in qla2x00_dfs_setup()
585 S_IRUSR, ha->dfs_dir, vha, &qla_dfs_fw_resource_cnt_fops); in qla2x00_dfs_setup()
587 ha->dfs_tgt_counters = debugfs_create_file("tgt_counters", S_IRUSR, in qla2x00_dfs_setup()
588 ha->dfs_dir, vha, &qla_dfs_tgt_counters_fops); in qla2x00_dfs_setup()
590 ha->tgt.dfs_tgt_port_database = debugfs_create_file("tgt_port_database", in qla2x00_dfs_setup()
591 S_IRUSR, ha->dfs_dir, vha, &qla2x00_dfs_tgt_port_database_fops); in qla2x00_dfs_setup()
593 ha->dfs_fce = debugfs_create_file("fce", S_IRUSR, ha->dfs_dir, vha, in qla2x00_dfs_setup()
596 ha->tgt.dfs_tgt_sess = debugfs_create_file("tgt_sess", in qla2x00_dfs_setup()
597 S_IRUSR, ha->dfs_dir, vha, &qla2x00_dfs_tgt_sess_fops); in qla2x00_dfs_setup()
599 if (IS_QLA27XX(ha) || IS_QLA83XX(ha) || IS_QLA28XX(ha)) { in qla2x00_dfs_setup()
600 ha->tgt.dfs_naqp = debugfs_create_file("naqp", in qla2x00_dfs_setup()
601 0400, ha->dfs_dir, vha, &dfs_naqp_ops); in qla2x00_dfs_setup()
602 if (!ha->tgt.dfs_naqp) { in qla2x00_dfs_setup()
608 vha->dfs_rport_root = debugfs_create_dir("rports", ha->dfs_dir); in qla2x00_dfs_setup()
621 struct qla_hw_data *ha = vha->hw; in qla2x00_dfs_remove() local
623 if (ha->tgt.dfs_naqp) { in qla2x00_dfs_remove()
624 debugfs_remove(ha->tgt.dfs_naqp); in qla2x00_dfs_remove()
625 ha->tgt.dfs_naqp = NULL; in qla2x00_dfs_remove()
628 if (ha->tgt.dfs_tgt_sess) { in qla2x00_dfs_remove()
629 debugfs_remove(ha->tgt.dfs_tgt_sess); in qla2x00_dfs_remove()
630 ha->tgt.dfs_tgt_sess = NULL; in qla2x00_dfs_remove()
633 if (ha->tgt.dfs_tgt_port_database) { in qla2x00_dfs_remove()
634 debugfs_remove(ha->tgt.dfs_tgt_port_database); in qla2x00_dfs_remove()
635 ha->tgt.dfs_tgt_port_database = NULL; in qla2x00_dfs_remove()
638 if (ha->dfs_fw_resource_cnt) { in qla2x00_dfs_remove()
639 debugfs_remove(ha->dfs_fw_resource_cnt); in qla2x00_dfs_remove()
640 ha->dfs_fw_resource_cnt = NULL; in qla2x00_dfs_remove()
643 if (ha->dfs_tgt_counters) { in qla2x00_dfs_remove()
644 debugfs_remove(ha->dfs_tgt_counters); in qla2x00_dfs_remove()
645 ha->dfs_tgt_counters = NULL; in qla2x00_dfs_remove()
648 if (ha->dfs_fce) { in qla2x00_dfs_remove()
649 debugfs_remove(ha->dfs_fce); in qla2x00_dfs_remove()
650 ha->dfs_fce = NULL; in qla2x00_dfs_remove()
658 if (ha->dfs_dir) { in qla2x00_dfs_remove()
659 debugfs_remove(ha->dfs_dir); in qla2x00_dfs_remove()
660 ha->dfs_dir = NULL; in qla2x00_dfs_remove()