Lines Matching refs:xrcd
1180 struct mlx4_ib_xrcd *xrcd; in mlx4_ib_alloc_xrcd() local
1187 xrcd = kmalloc(sizeof *xrcd, GFP_KERNEL); in mlx4_ib_alloc_xrcd()
1188 if (!xrcd) in mlx4_ib_alloc_xrcd()
1191 err = mlx4_xrcd_alloc(to_mdev(ibdev)->dev, &xrcd->xrcdn); in mlx4_ib_alloc_xrcd()
1195 xrcd->pd = ib_alloc_pd(ibdev); in mlx4_ib_alloc_xrcd()
1196 if (IS_ERR(xrcd->pd)) { in mlx4_ib_alloc_xrcd()
1197 err = PTR_ERR(xrcd->pd); in mlx4_ib_alloc_xrcd()
1202 xrcd->cq = ib_create_cq(ibdev, NULL, NULL, xrcd, &cq_attr); in mlx4_ib_alloc_xrcd()
1203 if (IS_ERR(xrcd->cq)) { in mlx4_ib_alloc_xrcd()
1204 err = PTR_ERR(xrcd->cq); in mlx4_ib_alloc_xrcd()
1208 return &xrcd->ibxrcd; in mlx4_ib_alloc_xrcd()
1211 ib_dealloc_pd(xrcd->pd); in mlx4_ib_alloc_xrcd()
1213 mlx4_xrcd_free(to_mdev(ibdev)->dev, xrcd->xrcdn); in mlx4_ib_alloc_xrcd()
1215 kfree(xrcd); in mlx4_ib_alloc_xrcd()
1219 static int mlx4_ib_dealloc_xrcd(struct ib_xrcd *xrcd) in mlx4_ib_dealloc_xrcd() argument
1221 ib_destroy_cq(to_mxrcd(xrcd)->cq); in mlx4_ib_dealloc_xrcd()
1222 ib_dealloc_pd(to_mxrcd(xrcd)->pd); in mlx4_ib_dealloc_xrcd()
1223 mlx4_xrcd_free(to_mdev(xrcd->device)->dev, to_mxrcd(xrcd)->xrcdn); in mlx4_ib_dealloc_xrcd()
1224 kfree(xrcd); in mlx4_ib_dealloc_xrcd()