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()
364 struct qla_hw_data *ha = vha->hw; in qla2x00_dfs_fce_show() local
366 mutex_lock(&ha->fce_mutex); in qla2x00_dfs_fce_show()
369 seq_printf(s, "In Pointer = %llx\n\n", (unsigned long long)ha->fce_wr); in qla2x00_dfs_fce_show()
370 seq_printf(s, "Base = %llx\n\n", (unsigned long long) ha->fce_dma); in qla2x00_dfs_fce_show()
373 ha->fce_mb[0], ha->fce_mb[2], ha->fce_mb[3], ha->fce_mb[4], in qla2x00_dfs_fce_show()
374 ha->fce_mb[5], ha->fce_mb[6]); in qla2x00_dfs_fce_show()
376 fce = (uint32_t *) ha->fce; in qla2x00_dfs_fce_show()
377 fce_start = (unsigned long long) ha->fce_dma; in qla2x00_dfs_fce_show()
378 for (cnt = 0; cnt < fce_calc_size(ha->fce_bufs) / 4; cnt++) { in qla2x00_dfs_fce_show()
389 mutex_unlock(&ha->fce_mutex); in qla2x00_dfs_fce_show()
398 struct qla_hw_data *ha = vha->hw; in qla2x00_dfs_fce_open() local
401 if (!ha->flags.fce_enabled) in qla2x00_dfs_fce_open()
404 mutex_lock(&ha->fce_mutex); in qla2x00_dfs_fce_open()
407 rval = qla2x00_disable_fce_trace(vha, &ha->fce_wr, &ha->fce_rd); in qla2x00_dfs_fce_open()
412 ha->flags.fce_enabled = 0; in qla2x00_dfs_fce_open()
414 mutex_unlock(&ha->fce_mutex); in qla2x00_dfs_fce_open()
423 struct qla_hw_data *ha = vha->hw; in qla2x00_dfs_fce_release() local
426 if (ha->flags.fce_enabled) in qla2x00_dfs_fce_release()
429 mutex_lock(&ha->fce_mutex); in qla2x00_dfs_fce_release()
432 ha->flags.fce_enabled = 1; in qla2x00_dfs_fce_release()
433 memset(ha->fce, 0, fce_calc_size(ha->fce_bufs)); in qla2x00_dfs_fce_release()
434 rval = qla2x00_enable_fce_trace(vha, ha->fce_dma, ha->fce_bufs, in qla2x00_dfs_fce_release()
435 ha->fce_mb, &ha->fce_bufs); in qla2x00_dfs_fce_release()
439 ha->flags.fce_enabled = 0; in qla2x00_dfs_fce_release()
442 mutex_unlock(&ha->fce_mutex); in qla2x00_dfs_fce_release()
458 struct qla_hw_data *ha = vha->hw; in qla_dfs_naqp_show() local
460 seq_printf(s, "%d\n", ha->tgt.num_act_qpairs); in qla_dfs_naqp_show()
478 struct qla_hw_data *ha = vha->hw; in qla_dfs_naqp_write() local
483 if (!(IS_QLA27XX(ha) || IS_QLA83XX(ha) || IS_QLA28XX(ha))) { in qla_dfs_naqp_write()
510 if (num_act_qp != ha->tgt.num_act_qpairs) { in qla_dfs_naqp_write()
511 ha->tgt.num_act_qpairs = num_act_qp; in qla_dfs_naqp_write()
532 struct qla_hw_data *ha = vha->hw; in qla2x00_dfs_setup() local
534 if (!IS_QLA25XX(ha) && !IS_QLA81XX(ha) && !IS_QLA83XX(ha) && in qla2x00_dfs_setup()
535 !IS_QLA27XX(ha) && !IS_QLA28XX(ha)) in qla2x00_dfs_setup()
537 if (!ha->fce) in qla2x00_dfs_setup()
547 if (ha->dfs_dir) in qla2x00_dfs_setup()
550 mutex_init(&ha->fce_mutex); in qla2x00_dfs_setup()
551 ha->dfs_dir = debugfs_create_dir(vha->host_str, qla2x00_dfs_root); in qla2x00_dfs_setup()
556 ha->dfs_fw_resource_cnt = debugfs_create_file("fw_resource_count", in qla2x00_dfs_setup()
557 S_IRUSR, ha->dfs_dir, vha, &qla_dfs_fw_resource_cnt_fops); in qla2x00_dfs_setup()
559 ha->dfs_tgt_counters = debugfs_create_file("tgt_counters", S_IRUSR, in qla2x00_dfs_setup()
560 ha->dfs_dir, vha, &qla_dfs_tgt_counters_fops); in qla2x00_dfs_setup()
562 ha->tgt.dfs_tgt_port_database = debugfs_create_file("tgt_port_database", in qla2x00_dfs_setup()
563 S_IRUSR, ha->dfs_dir, vha, &qla2x00_dfs_tgt_port_database_fops); in qla2x00_dfs_setup()
565 ha->dfs_fce = debugfs_create_file("fce", S_IRUSR, ha->dfs_dir, vha, in qla2x00_dfs_setup()
568 ha->tgt.dfs_tgt_sess = debugfs_create_file("tgt_sess", in qla2x00_dfs_setup()
569 S_IRUSR, ha->dfs_dir, vha, &qla2x00_dfs_tgt_sess_fops); in qla2x00_dfs_setup()
571 if (IS_QLA27XX(ha) || IS_QLA83XX(ha) || IS_QLA28XX(ha)) { in qla2x00_dfs_setup()
572 ha->tgt.dfs_naqp = debugfs_create_file("naqp", in qla2x00_dfs_setup()
573 0400, ha->dfs_dir, vha, &dfs_naqp_ops); in qla2x00_dfs_setup()
574 if (!ha->tgt.dfs_naqp) { in qla2x00_dfs_setup()
580 vha->dfs_rport_root = debugfs_create_dir("rports", ha->dfs_dir); in qla2x00_dfs_setup()
593 struct qla_hw_data *ha = vha->hw; in qla2x00_dfs_remove() local
595 if (ha->tgt.dfs_naqp) { in qla2x00_dfs_remove()
596 debugfs_remove(ha->tgt.dfs_naqp); in qla2x00_dfs_remove()
597 ha->tgt.dfs_naqp = NULL; in qla2x00_dfs_remove()
600 if (ha->tgt.dfs_tgt_sess) { in qla2x00_dfs_remove()
601 debugfs_remove(ha->tgt.dfs_tgt_sess); in qla2x00_dfs_remove()
602 ha->tgt.dfs_tgt_sess = NULL; in qla2x00_dfs_remove()
605 if (ha->tgt.dfs_tgt_port_database) { in qla2x00_dfs_remove()
606 debugfs_remove(ha->tgt.dfs_tgt_port_database); in qla2x00_dfs_remove()
607 ha->tgt.dfs_tgt_port_database = NULL; in qla2x00_dfs_remove()
610 if (ha->dfs_fw_resource_cnt) { in qla2x00_dfs_remove()
611 debugfs_remove(ha->dfs_fw_resource_cnt); in qla2x00_dfs_remove()
612 ha->dfs_fw_resource_cnt = NULL; in qla2x00_dfs_remove()
615 if (ha->dfs_tgt_counters) { in qla2x00_dfs_remove()
616 debugfs_remove(ha->dfs_tgt_counters); in qla2x00_dfs_remove()
617 ha->dfs_tgt_counters = NULL; in qla2x00_dfs_remove()
620 if (ha->dfs_fce) { in qla2x00_dfs_remove()
621 debugfs_remove(ha->dfs_fce); in qla2x00_dfs_remove()
622 ha->dfs_fce = NULL; in qla2x00_dfs_remove()
630 if (ha->dfs_dir) { in qla2x00_dfs_remove()
631 debugfs_remove(ha->dfs_dir); in qla2x00_dfs_remove()
632 ha->dfs_dir = NULL; in qla2x00_dfs_remove()