Lines Matching refs:int_params
578 if (cdev->int_params.out.int_mode == QED_INT_MODE_MSIX) { in qed_disable_msix()
580 kfree(cdev->int_params.msix_table); in qed_disable_msix()
581 } else if (cdev->int_params.out.int_mode == QED_INT_MODE_MSI) { in qed_disable_msix()
585 memset(&cdev->int_params.out, 0, sizeof(struct qed_int_param)); in qed_disable_msix()
589 struct qed_int_params *int_params) in qed_enable_msix() argument
593 cnt = int_params->in.num_vectors; in qed_enable_msix()
596 int_params->msix_table[i].entry = i; in qed_enable_msix()
598 rc = pci_enable_msix_range(cdev->pdev, int_params->msix_table, in qed_enable_msix()
599 int_params->in.min_msix_cnt, cnt); in qed_enable_msix()
600 if (rc < cnt && rc >= int_params->in.min_msix_cnt && in qed_enable_msix()
611 cnt, int_params->in.num_vectors); in qed_enable_msix()
612 rc = pci_enable_msix_exact(cdev->pdev, int_params->msix_table, in qed_enable_msix()
625 int_params->out.int_mode = QED_INT_MODE_MSIX; in qed_enable_msix()
626 int_params->out.num_vectors = rc; in qed_enable_msix()
640 struct qed_int_params *int_params = &cdev->int_params; in qed_set_int_mode() local
644 switch (int_params->in.int_mode) { in qed_set_int_mode()
647 cnt = int_params->in.num_vectors; in qed_set_int_mode()
648 int_params->msix_table = kcalloc(cnt, sizeof(*tbl), GFP_KERNEL); in qed_set_int_mode()
649 if (!int_params->msix_table) { in qed_set_int_mode()
655 rc = qed_enable_msix(cdev, int_params); in qed_set_int_mode()
660 kfree(int_params->msix_table); in qed_set_int_mode()
669 int_params->out.int_mode = QED_INT_MODE_MSI; in qed_set_int_mode()
680 int_params->out.int_mode = QED_INT_MODE_INTA; in qed_set_int_mode()
685 int_params->in.int_mode); in qed_set_int_mode()
692 int_params->out.int_mode == QED_INT_MODE_INTA ? in qed_set_int_mode()
693 "INTa" : int_params->out.int_mode == QED_INT_MODE_MSI ? in qed_set_int_mode()
782 int_mode = cdev->int_params.out.int_mode; in qed_slowpath_irq_req()
788 rc = request_irq(cdev->int_params.msix_table[id].vector, in qed_slowpath_irq_req()
797 if (cdev->int_params.out.int_mode == QED_INT_MODE_INTA) in qed_slowpath_irq_req()
832 int_mode = cdev->int_params.out.int_mode; in qed_slowpath_irq_sync()
834 synchronize_irq(cdev->int_params.msix_table[id].vector); in qed_slowpath_irq_sync()
845 if (cdev->int_params.out.int_mode == QED_INT_MODE_MSIX) { in qed_slowpath_irq_free()
849 synchronize_irq(cdev->int_params.msix_table[i].vector); in qed_slowpath_irq_free()
850 free_irq(cdev->int_params.msix_table[i].vector, in qed_slowpath_irq_free()
912 cdev->int_params.fp_initialized = cnt ? true : false; in qed_set_int_fp()
914 if (cdev->int_params.out.int_mode != QED_INT_MODE_MSIX) in qed_set_int_fp()
916 else if (cdev->int_params.fp_msix_cnt) in qed_set_int_fp()
917 limit = cdev->int_params.fp_msix_cnt; in qed_set_int_fp()
929 if (!cdev->int_params.fp_initialized) { in qed_get_int_fp()
938 if (cdev->int_params.out.int_mode == QED_INT_MODE_MSIX) { in qed_get_int_fp()
939 int msix_base = cdev->int_params.fp_msix_base; in qed_get_int_fp()
941 info->msix_cnt = cdev->int_params.fp_msix_cnt; in qed_get_int_fp()
942 info->msix = &cdev->int_params.msix_table[msix_base]; in qed_get_int_fp()
961 memset(&cdev->int_params, 0, sizeof(struct qed_int_params)); in qed_slowpath_setup_int()
962 cdev->int_params.in.int_mode = int_mode; in qed_slowpath_setup_int()
966 cdev->int_params.in.num_vectors += sb_cnt_info.cnt; in qed_slowpath_setup_int()
967 cdev->int_params.in.num_vectors++; /* slowpath */ in qed_slowpath_setup_int()
971 cdev->int_params.in.min_msix_cnt = cdev->num_hwfns * 2; in qed_slowpath_setup_int()
976 cdev->int_params.in.min_msix_cnt); in qed_slowpath_setup_int()
977 cdev->int_params.in.num_vectors = in qed_slowpath_setup_int()
978 cdev->int_params.in.min_msix_cnt; in qed_slowpath_setup_int()
987 cdev->int_params.fp_msix_base = cdev->num_hwfns; in qed_slowpath_setup_int()
988 cdev->int_params.fp_msix_cnt = cdev->int_params.out.num_vectors - in qed_slowpath_setup_int()
1000 cdev->int_params.fp_msix_cnt, num_l2_queues); in qed_slowpath_setup_int()
1002 if (cdev->int_params.fp_msix_cnt > num_l2_queues) { in qed_slowpath_setup_int()
1003 cdev->int_params.rdma_msix_cnt = in qed_slowpath_setup_int()
1004 (cdev->int_params.fp_msix_cnt - num_l2_queues) in qed_slowpath_setup_int()
1006 cdev->int_params.rdma_msix_base = in qed_slowpath_setup_int()
1007 cdev->int_params.fp_msix_base + num_l2_queues; in qed_slowpath_setup_int()
1008 cdev->int_params.fp_msix_cnt = num_l2_queues; in qed_slowpath_setup_int()
1010 cdev->int_params.rdma_msix_cnt = 0; in qed_slowpath_setup_int()
1014 cdev->int_params.rdma_msix_cnt, in qed_slowpath_setup_int()
1015 cdev->int_params.rdma_msix_base); in qed_slowpath_setup_int()
1024 memset(&cdev->int_params, 0, sizeof(struct qed_int_params)); in qed_slowpath_vf_setup_int()
1025 cdev->int_params.in.int_mode = QED_INT_MODE_MSIX; in qed_slowpath_vf_setup_int()
1028 &cdev->int_params.in.num_vectors); in qed_slowpath_vf_setup_int()
1033 cdev->int_params.in.num_vectors += vectors; in qed_slowpath_vf_setup_int()
1037 cdev->int_params.in.min_msix_cnt = cdev->num_hwfns; in qed_slowpath_vf_setup_int()
1043 cdev->int_params.fp_msix_base = 0; in qed_slowpath_vf_setup_int()
1044 cdev->int_params.fp_msix_cnt = cdev->int_params.out.num_vectors; in qed_slowpath_vf_setup_int()
1347 hw_init_params.int_mode = cdev->int_params.out.int_mode; in qed_slowpath_start()