Lines Matching refs:int_params

573 	if (cdev->int_params.out.int_mode == QED_INT_MODE_MSIX) {  in qed_disable_msix()
575 kfree(cdev->int_params.msix_table); in qed_disable_msix()
576 } else if (cdev->int_params.out.int_mode == QED_INT_MODE_MSI) { in qed_disable_msix()
580 memset(&cdev->int_params.out, 0, sizeof(struct qed_int_param)); in qed_disable_msix()
584 struct qed_int_params *int_params) in qed_enable_msix() argument
588 cnt = int_params->in.num_vectors; in qed_enable_msix()
591 int_params->msix_table[i].entry = i; in qed_enable_msix()
593 rc = pci_enable_msix_range(cdev->pdev, int_params->msix_table, in qed_enable_msix()
594 int_params->in.min_msix_cnt, cnt); in qed_enable_msix()
595 if (rc < cnt && rc >= int_params->in.min_msix_cnt && in qed_enable_msix()
606 cnt, int_params->in.num_vectors); in qed_enable_msix()
607 rc = pci_enable_msix_exact(cdev->pdev, int_params->msix_table, in qed_enable_msix()
620 int_params->out.int_mode = QED_INT_MODE_MSIX; in qed_enable_msix()
621 int_params->out.num_vectors = rc; in qed_enable_msix()
635 struct qed_int_params *int_params = &cdev->int_params; in qed_set_int_mode() local
639 switch (int_params->in.int_mode) { in qed_set_int_mode()
642 cnt = int_params->in.num_vectors; in qed_set_int_mode()
643 int_params->msix_table = kcalloc(cnt, sizeof(*tbl), GFP_KERNEL); in qed_set_int_mode()
644 if (!int_params->msix_table) { in qed_set_int_mode()
650 rc = qed_enable_msix(cdev, int_params); in qed_set_int_mode()
655 kfree(int_params->msix_table); in qed_set_int_mode()
664 int_params->out.int_mode = QED_INT_MODE_MSI; in qed_set_int_mode()
675 int_params->out.int_mode = QED_INT_MODE_INTA; in qed_set_int_mode()
680 int_params->in.int_mode); in qed_set_int_mode()
687 int_params->out.int_mode == QED_INT_MODE_INTA ? in qed_set_int_mode()
688 "INTa" : int_params->out.int_mode == QED_INT_MODE_MSI ? in qed_set_int_mode()
777 int_mode = cdev->int_params.out.int_mode; in qed_slowpath_irq_req()
783 rc = request_irq(cdev->int_params.msix_table[id].vector, in qed_slowpath_irq_req()
792 if (cdev->int_params.out.int_mode == QED_INT_MODE_INTA) in qed_slowpath_irq_req()
827 int_mode = cdev->int_params.out.int_mode; in qed_slowpath_irq_sync()
829 synchronize_irq(cdev->int_params.msix_table[id].vector); in qed_slowpath_irq_sync()
840 if (cdev->int_params.out.int_mode == QED_INT_MODE_MSIX) { in qed_slowpath_irq_free()
844 synchronize_irq(cdev->int_params.msix_table[i].vector); in qed_slowpath_irq_free()
845 free_irq(cdev->int_params.msix_table[i].vector, in qed_slowpath_irq_free()
907 cdev->int_params.fp_initialized = cnt ? true : false; in qed_set_int_fp()
909 if (cdev->int_params.out.int_mode != QED_INT_MODE_MSIX) in qed_set_int_fp()
911 else if (cdev->int_params.fp_msix_cnt) in qed_set_int_fp()
912 limit = cdev->int_params.fp_msix_cnt; in qed_set_int_fp()
924 if (!cdev->int_params.fp_initialized) { in qed_get_int_fp()
933 if (cdev->int_params.out.int_mode == QED_INT_MODE_MSIX) { in qed_get_int_fp()
934 int msix_base = cdev->int_params.fp_msix_base; in qed_get_int_fp()
936 info->msix_cnt = cdev->int_params.fp_msix_cnt; in qed_get_int_fp()
937 info->msix = &cdev->int_params.msix_table[msix_base]; in qed_get_int_fp()
956 memset(&cdev->int_params, 0, sizeof(struct qed_int_params)); in qed_slowpath_setup_int()
957 cdev->int_params.in.int_mode = int_mode; in qed_slowpath_setup_int()
961 cdev->int_params.in.num_vectors += sb_cnt_info.cnt; in qed_slowpath_setup_int()
962 cdev->int_params.in.num_vectors++; /* slowpath */ in qed_slowpath_setup_int()
966 cdev->int_params.in.min_msix_cnt = cdev->num_hwfns * 2; in qed_slowpath_setup_int()
971 cdev->int_params.in.min_msix_cnt); in qed_slowpath_setup_int()
972 cdev->int_params.in.num_vectors = in qed_slowpath_setup_int()
973 cdev->int_params.in.min_msix_cnt; in qed_slowpath_setup_int()
982 cdev->int_params.fp_msix_base = cdev->num_hwfns; in qed_slowpath_setup_int()
983 cdev->int_params.fp_msix_cnt = cdev->int_params.out.num_vectors - in qed_slowpath_setup_int()
995 cdev->int_params.fp_msix_cnt, num_l2_queues); in qed_slowpath_setup_int()
997 if (cdev->int_params.fp_msix_cnt > num_l2_queues) { in qed_slowpath_setup_int()
998 cdev->int_params.rdma_msix_cnt = in qed_slowpath_setup_int()
999 (cdev->int_params.fp_msix_cnt - num_l2_queues) in qed_slowpath_setup_int()
1001 cdev->int_params.rdma_msix_base = in qed_slowpath_setup_int()
1002 cdev->int_params.fp_msix_base + num_l2_queues; in qed_slowpath_setup_int()
1003 cdev->int_params.fp_msix_cnt = num_l2_queues; in qed_slowpath_setup_int()
1005 cdev->int_params.rdma_msix_cnt = 0; in qed_slowpath_setup_int()
1009 cdev->int_params.rdma_msix_cnt, in qed_slowpath_setup_int()
1010 cdev->int_params.rdma_msix_base); in qed_slowpath_setup_int()
1019 memset(&cdev->int_params, 0, sizeof(struct qed_int_params)); in qed_slowpath_vf_setup_int()
1020 cdev->int_params.in.int_mode = QED_INT_MODE_MSIX; in qed_slowpath_vf_setup_int()
1023 &cdev->int_params.in.num_vectors); in qed_slowpath_vf_setup_int()
1028 cdev->int_params.in.num_vectors += vectors; in qed_slowpath_vf_setup_int()
1032 cdev->int_params.in.min_msix_cnt = cdev->num_hwfns; in qed_slowpath_vf_setup_int()
1038 cdev->int_params.fp_msix_base = 0; in qed_slowpath_vf_setup_int()
1039 cdev->int_params.fp_msix_cnt = cdev->int_params.out.num_vectors; in qed_slowpath_vf_setup_int()
1343 hw_init_params.int_mode = cdev->int_params.out.int_mode; in qed_slowpath_start()