Lines Matching refs:eq_table
397 if (dev->eq_table.clr_mask) in mthca_tavor_interrupt()
398 writel(dev->eq_table.clr_mask, dev->eq_table.clr_int); in mthca_tavor_interrupt()
408 if (ecr & dev->eq_table.eq[i].eqn_mask) { in mthca_tavor_interrupt()
409 if (mthca_eq_int(dev, &dev->eq_table.eq[i])) in mthca_tavor_interrupt()
410 tavor_set_eq_ci(dev, &dev->eq_table.eq[i], in mthca_tavor_interrupt()
411 dev->eq_table.eq[i].cons_index); in mthca_tavor_interrupt()
412 tavor_eq_req_not(dev, dev->eq_table.eq[i].eqn); in mthca_tavor_interrupt()
437 if (dev->eq_table.clr_mask) in mthca_arbel_interrupt()
438 writel(dev->eq_table.clr_mask, dev->eq_table.clr_int); in mthca_arbel_interrupt()
441 if (mthca_eq_int(dev, &dev->eq_table.eq[i])) { in mthca_arbel_interrupt()
443 arbel_set_eq_ci(dev, &dev->eq_table.eq[i], in mthca_arbel_interrupt()
444 dev->eq_table.eq[i].cons_index); in mthca_arbel_interrupt()
447 arbel_eq_req_not(dev, dev->eq_table.arm_mask); in mthca_arbel_interrupt()
514 eq->eqn = mthca_alloc(&dev->eq_table.alloc); in mthca_create_eq()
557 dev->eq_table.arm_mask |= eq->eqn_mask; in mthca_create_eq()
568 mthca_free(&dev->eq_table.alloc, eq->eqn); in mthca_create_eq()
605 dev->eq_table.arm_mask &= ~eq->eqn_mask; in mthca_free_eq()
632 if (dev->eq_table.have_irq) in mthca_free_irqs()
635 if (dev->eq_table.eq[i].have_irq) { in mthca_free_irqs()
636 free_irq(dev->eq_table.eq[i].msi_x_vector, in mthca_free_irqs()
637 dev->eq_table.eq + i); in mthca_free_irqs()
638 dev->eq_table.eq[i].have_irq = 0; in mthca_free_irqs()
738 dev->eq_table.icm_virt = icm_virt; in mthca_map_eq_icm()
739 dev->eq_table.icm_page = alloc_page(GFP_HIGHUSER); in mthca_map_eq_icm()
740 if (!dev->eq_table.icm_page) in mthca_map_eq_icm()
742 dev->eq_table.icm_dma = in mthca_map_eq_icm()
743 dma_map_page(&dev->pdev->dev, dev->eq_table.icm_page, 0, in mthca_map_eq_icm()
745 if (dma_mapping_error(&dev->pdev->dev, dev->eq_table.icm_dma)) { in mthca_map_eq_icm()
746 __free_page(dev->eq_table.icm_page); in mthca_map_eq_icm()
750 ret = mthca_MAP_ICM_page(dev, dev->eq_table.icm_dma, icm_virt); in mthca_map_eq_icm()
752 dma_unmap_page(&dev->pdev->dev, dev->eq_table.icm_dma, in mthca_map_eq_icm()
754 __free_page(dev->eq_table.icm_page); in mthca_map_eq_icm()
762 mthca_UNMAP_ICM(dev, dev->eq_table.icm_virt, 1); in mthca_unmap_eq_icm()
763 dma_unmap_page(&dev->pdev->dev, dev->eq_table.icm_dma, PAGE_SIZE, in mthca_unmap_eq_icm()
765 __free_page(dev->eq_table.icm_page); in mthca_unmap_eq_icm()
774 err = mthca_alloc_init(&dev->eq_table.alloc, in mthca_init_eq_table()
786 dev->eq_table.clr_mask = 0; in mthca_init_eq_table()
788 dev->eq_table.clr_mask = in mthca_init_eq_table()
789 swab32(1 << (dev->eq_table.inta_pin & 31)); in mthca_init_eq_table()
790 dev->eq_table.clr_int = dev->clr_base + in mthca_init_eq_table()
791 (dev->eq_table.inta_pin < 32 ? 4 : 0); in mthca_init_eq_table()
794 dev->eq_table.arm_mask = 0; in mthca_init_eq_table()
796 intr = dev->eq_table.inta_pin; in mthca_init_eq_table()
800 &dev->eq_table.eq[MTHCA_EQ_COMP]); in mthca_init_eq_table()
806 &dev->eq_table.eq[MTHCA_EQ_ASYNC]); in mthca_init_eq_table()
812 &dev->eq_table.eq[MTHCA_EQ_CMD]); in mthca_init_eq_table()
824 snprintf(dev->eq_table.eq[i].irq_name, in mthca_init_eq_table()
828 err = request_irq(dev->eq_table.eq[i].msi_x_vector, in mthca_init_eq_table()
832 0, dev->eq_table.eq[i].irq_name, in mthca_init_eq_table()
833 dev->eq_table.eq + i); in mthca_init_eq_table()
836 dev->eq_table.eq[i].have_irq = 1; in mthca_init_eq_table()
839 snprintf(dev->eq_table.eq[0].irq_name, IB_DEVICE_NAME_MAX, in mthca_init_eq_table()
845 IRQF_SHARED, dev->eq_table.eq[0].irq_name, dev); in mthca_init_eq_table()
848 dev->eq_table.have_irq = 1; in mthca_init_eq_table()
852 0, dev->eq_table.eq[MTHCA_EQ_ASYNC].eqn); in mthca_init_eq_table()
855 dev->eq_table.eq[MTHCA_EQ_ASYNC].eqn, err); in mthca_init_eq_table()
858 0, dev->eq_table.eq[MTHCA_EQ_CMD].eqn); in mthca_init_eq_table()
861 dev->eq_table.eq[MTHCA_EQ_CMD].eqn, err); in mthca_init_eq_table()
865 arbel_eq_req_not(dev, dev->eq_table.eq[i].eqn_mask); in mthca_init_eq_table()
867 tavor_eq_req_not(dev, dev->eq_table.eq[i].eqn); in mthca_init_eq_table()
873 mthca_free_eq(dev, &dev->eq_table.eq[MTHCA_EQ_CMD]); in mthca_init_eq_table()
876 mthca_free_eq(dev, &dev->eq_table.eq[MTHCA_EQ_ASYNC]); in mthca_init_eq_table()
879 mthca_free_eq(dev, &dev->eq_table.eq[MTHCA_EQ_COMP]); in mthca_init_eq_table()
885 mthca_alloc_cleanup(&dev->eq_table.alloc); in mthca_init_eq_table()
896 1, dev->eq_table.eq[MTHCA_EQ_ASYNC].eqn); in mthca_cleanup_eq_table()
898 1, dev->eq_table.eq[MTHCA_EQ_CMD].eqn); in mthca_cleanup_eq_table()
901 mthca_free_eq(dev, &dev->eq_table.eq[i]); in mthca_cleanup_eq_table()
905 mthca_alloc_cleanup(&dev->eq_table.alloc); in mthca_cleanup_eq_table()