Lines Matching refs:ibdev

66 static int c2_query_device(struct ib_device *ibdev,  in c2_query_device()  argument
69 struct c2_dev *c2dev = to_c2dev(ibdev); in c2_query_device()
77 static int c2_query_port(struct ib_device *ibdev, in c2_query_port() argument
102 static int c2_query_pkey(struct ib_device *ibdev, in c2_query_pkey() argument
110 static int c2_query_gid(struct ib_device *ibdev, u8 port, in c2_query_gid() argument
113 struct c2_dev *c2dev = to_c2dev(ibdev); in c2_query_gid()
125 static struct ib_ucontext *c2_alloc_ucontext(struct ib_device *ibdev, in c2_alloc_ucontext() argument
151 static struct ib_pd *c2_alloc_pd(struct ib_device *ibdev, in c2_alloc_pd() argument
164 err = c2_pd_alloc(to_c2dev(ibdev), !context, pd); in c2_alloc_pd()
172 c2_pd_free(to_c2dev(ibdev), pd); in c2_alloc_pd()
289 static struct ib_cq *c2_create_cq(struct ib_device *ibdev, int entries, int vector, in c2_create_cq() argument
302 err = c2_init_cq(to_c2dev(ibdev), entries, NULL, cq); in c2_create_cq()
521 struct c2_dev *c2dev = container_of(dev, struct c2_dev, ibdev.dev); in show_rev()
529 struct c2_dev *c2dev = container_of(dev, struct c2_dev, ibdev.dev); in show_fw_ver()
587 static int c2_process_mad(struct ib_device *ibdev, in c2_process_mad() argument
780 strlcpy(dev->ibdev.name, "amso%d", IB_DEVICE_NAME_MAX); in c2_register_device()
781 dev->ibdev.owner = THIS_MODULE; in c2_register_device()
782 dev->ibdev.uverbs_cmd_mask = in c2_register_device()
801 dev->ibdev.node_type = RDMA_NODE_RNIC; in c2_register_device()
802 memset(&dev->ibdev.node_guid, 0, sizeof(dev->ibdev.node_guid)); in c2_register_device()
803 memcpy(&dev->ibdev.node_guid, dev->pseudo_netdev->dev_addr, 6); in c2_register_device()
804 dev->ibdev.phys_port_cnt = 1; in c2_register_device()
805 dev->ibdev.num_comp_vectors = 1; in c2_register_device()
806 dev->ibdev.dma_device = &dev->pcidev->dev; in c2_register_device()
807 dev->ibdev.query_device = c2_query_device; in c2_register_device()
808 dev->ibdev.query_port = c2_query_port; in c2_register_device()
809 dev->ibdev.query_pkey = c2_query_pkey; in c2_register_device()
810 dev->ibdev.query_gid = c2_query_gid; in c2_register_device()
811 dev->ibdev.alloc_ucontext = c2_alloc_ucontext; in c2_register_device()
812 dev->ibdev.dealloc_ucontext = c2_dealloc_ucontext; in c2_register_device()
813 dev->ibdev.mmap = c2_mmap_uar; in c2_register_device()
814 dev->ibdev.alloc_pd = c2_alloc_pd; in c2_register_device()
815 dev->ibdev.dealloc_pd = c2_dealloc_pd; in c2_register_device()
816 dev->ibdev.create_ah = c2_ah_create; in c2_register_device()
817 dev->ibdev.destroy_ah = c2_ah_destroy; in c2_register_device()
818 dev->ibdev.create_qp = c2_create_qp; in c2_register_device()
819 dev->ibdev.modify_qp = c2_modify_qp; in c2_register_device()
820 dev->ibdev.destroy_qp = c2_destroy_qp; in c2_register_device()
821 dev->ibdev.create_cq = c2_create_cq; in c2_register_device()
822 dev->ibdev.destroy_cq = c2_destroy_cq; in c2_register_device()
823 dev->ibdev.poll_cq = c2_poll_cq; in c2_register_device()
824 dev->ibdev.get_dma_mr = c2_get_dma_mr; in c2_register_device()
825 dev->ibdev.reg_phys_mr = c2_reg_phys_mr; in c2_register_device()
826 dev->ibdev.reg_user_mr = c2_reg_user_mr; in c2_register_device()
827 dev->ibdev.dereg_mr = c2_dereg_mr; in c2_register_device()
829 dev->ibdev.alloc_fmr = NULL; in c2_register_device()
830 dev->ibdev.unmap_fmr = NULL; in c2_register_device()
831 dev->ibdev.dealloc_fmr = NULL; in c2_register_device()
832 dev->ibdev.map_phys_fmr = NULL; in c2_register_device()
834 dev->ibdev.attach_mcast = c2_multicast_attach; in c2_register_device()
835 dev->ibdev.detach_mcast = c2_multicast_detach; in c2_register_device()
836 dev->ibdev.process_mad = c2_process_mad; in c2_register_device()
838 dev->ibdev.req_notify_cq = c2_arm_cq; in c2_register_device()
839 dev->ibdev.post_send = c2_post_send; in c2_register_device()
840 dev->ibdev.post_recv = c2_post_receive; in c2_register_device()
842 dev->ibdev.iwcm = kmalloc(sizeof(*dev->ibdev.iwcm), GFP_KERNEL); in c2_register_device()
843 if (dev->ibdev.iwcm == NULL) { in c2_register_device()
847 dev->ibdev.iwcm->add_ref = c2_add_ref; in c2_register_device()
848 dev->ibdev.iwcm->rem_ref = c2_rem_ref; in c2_register_device()
849 dev->ibdev.iwcm->get_qp = c2_get_qp; in c2_register_device()
850 dev->ibdev.iwcm->connect = c2_connect; in c2_register_device()
851 dev->ibdev.iwcm->accept = c2_accept; in c2_register_device()
852 dev->ibdev.iwcm->reject = c2_reject; in c2_register_device()
853 dev->ibdev.iwcm->create_listen = c2_service_create; in c2_register_device()
854 dev->ibdev.iwcm->destroy_listen = c2_service_destroy; in c2_register_device()
856 ret = ib_register_device(&dev->ibdev, NULL); in c2_register_device()
861 ret = device_create_file(&dev->ibdev.dev, in c2_register_device()
869 ib_unregister_device(&dev->ibdev); in c2_register_device()
871 kfree(dev->ibdev.iwcm); in c2_register_device()
886 ib_unregister_device(&dev->ibdev); in c2_unregister_device()