Searched refs:devr (Results 1 - 4 of 4) sorted by relevance
/linux-4.4.14/drivers/infiniband/hw/mlx5/ |
H A D | main.c | 1185 static int create_dev_resources(struct mlx5_ib_resources *devr) create_dev_resources() argument 1192 dev = container_of(devr, struct mlx5_ib_dev, devr); create_dev_resources() 1194 devr->p0 = mlx5_ib_alloc_pd(&dev->ib_dev, NULL, NULL); create_dev_resources() 1195 if (IS_ERR(devr->p0)) { create_dev_resources() 1196 ret = PTR_ERR(devr->p0); create_dev_resources() 1199 devr->p0->device = &dev->ib_dev; create_dev_resources() 1200 devr->p0->uobject = NULL; create_dev_resources() 1201 atomic_set(&devr->p0->usecnt, 0); create_dev_resources() 1203 devr->c0 = mlx5_ib_create_cq(&dev->ib_dev, &cq_attr, NULL, NULL); create_dev_resources() 1204 if (IS_ERR(devr->c0)) { create_dev_resources() 1205 ret = PTR_ERR(devr->c0); create_dev_resources() 1208 devr->c0->device = &dev->ib_dev; create_dev_resources() 1209 devr->c0->uobject = NULL; create_dev_resources() 1210 devr->c0->comp_handler = NULL; create_dev_resources() 1211 devr->c0->event_handler = NULL; create_dev_resources() 1212 devr->c0->cq_context = NULL; create_dev_resources() 1213 atomic_set(&devr->c0->usecnt, 0); create_dev_resources() 1215 devr->x0 = mlx5_ib_alloc_xrcd(&dev->ib_dev, NULL, NULL); create_dev_resources() 1216 if (IS_ERR(devr->x0)) { create_dev_resources() 1217 ret = PTR_ERR(devr->x0); create_dev_resources() 1220 devr->x0->device = &dev->ib_dev; create_dev_resources() 1221 devr->x0->inode = NULL; create_dev_resources() 1222 atomic_set(&devr->x0->usecnt, 0); create_dev_resources() 1223 mutex_init(&devr->x0->tgt_qp_mutex); create_dev_resources() 1224 INIT_LIST_HEAD(&devr->x0->tgt_qp_list); create_dev_resources() 1226 devr->x1 = mlx5_ib_alloc_xrcd(&dev->ib_dev, NULL, NULL); create_dev_resources() 1227 if (IS_ERR(devr->x1)) { create_dev_resources() 1228 ret = PTR_ERR(devr->x1); create_dev_resources() 1231 devr->x1->device = &dev->ib_dev; create_dev_resources() 1232 devr->x1->inode = NULL; create_dev_resources() 1233 atomic_set(&devr->x1->usecnt, 0); create_dev_resources() 1234 mutex_init(&devr->x1->tgt_qp_mutex); create_dev_resources() 1235 INIT_LIST_HEAD(&devr->x1->tgt_qp_list); create_dev_resources() 1241 attr.ext.xrc.cq = devr->c0; create_dev_resources() 1242 attr.ext.xrc.xrcd = devr->x0; create_dev_resources() 1244 devr->s0 = mlx5_ib_create_srq(devr->p0, &attr, NULL); create_dev_resources() 1245 if (IS_ERR(devr->s0)) { create_dev_resources() 1246 ret = PTR_ERR(devr->s0); create_dev_resources() 1249 devr->s0->device = &dev->ib_dev; create_dev_resources() 1250 devr->s0->pd = devr->p0; create_dev_resources() 1251 devr->s0->uobject = NULL; create_dev_resources() 1252 devr->s0->event_handler = NULL; create_dev_resources() 1253 devr->s0->srq_context = NULL; create_dev_resources() 1254 devr->s0->srq_type = IB_SRQT_XRC; create_dev_resources() 1255 devr->s0->ext.xrc.xrcd = devr->x0; create_dev_resources() 1256 devr->s0->ext.xrc.cq = devr->c0; create_dev_resources() 1257 atomic_inc(&devr->s0->ext.xrc.xrcd->usecnt); create_dev_resources() 1258 atomic_inc(&devr->s0->ext.xrc.cq->usecnt); create_dev_resources() 1259 atomic_inc(&devr->p0->usecnt); create_dev_resources() 1260 atomic_set(&devr->s0->usecnt, 0); create_dev_resources() 1266 devr->s1 = mlx5_ib_create_srq(devr->p0, &attr, NULL); create_dev_resources() 1267 if (IS_ERR(devr->s1)) { create_dev_resources() 1268 ret = PTR_ERR(devr->s1); create_dev_resources() 1271 devr->s1->device = &dev->ib_dev; create_dev_resources() 1272 devr->s1->pd = devr->p0; create_dev_resources() 1273 devr->s1->uobject = NULL; create_dev_resources() 1274 devr->s1->event_handler = NULL; create_dev_resources() 1275 devr->s1->srq_context = NULL; create_dev_resources() 1276 devr->s1->srq_type = IB_SRQT_BASIC; create_dev_resources() 1277 devr->s1->ext.xrc.cq = devr->c0; create_dev_resources() 1278 atomic_inc(&devr->p0->usecnt); create_dev_resources() 1279 atomic_set(&devr->s0->usecnt, 0); create_dev_resources() 1284 mlx5_ib_destroy_srq(devr->s0); create_dev_resources() 1286 mlx5_ib_dealloc_xrcd(devr->x1); create_dev_resources() 1288 mlx5_ib_dealloc_xrcd(devr->x0); create_dev_resources() 1290 mlx5_ib_destroy_cq(devr->c0); create_dev_resources() 1292 mlx5_ib_dealloc_pd(devr->p0); create_dev_resources() 1297 static void destroy_dev_resources(struct mlx5_ib_resources *devr) destroy_dev_resources() argument 1299 mlx5_ib_destroy_srq(devr->s1); destroy_dev_resources() 1300 mlx5_ib_destroy_srq(devr->s0); destroy_dev_resources() 1301 mlx5_ib_dealloc_xrcd(devr->x0); destroy_dev_resources() 1302 mlx5_ib_dealloc_xrcd(devr->x1); destroy_dev_resources() 1303 mlx5_ib_destroy_cq(devr->c0); destroy_dev_resources() 1304 mlx5_ib_dealloc_pd(devr->p0); destroy_dev_resources() 1448 err = create_dev_resources(&dev->devr); mlx5_ib_add() 1485 destroy_dev_resources(&dev->devr); mlx5_ib_add() 1500 destroy_dev_resources(&dev->devr); mlx5_ib_remove()
|
H A D | qp.c | 860 struct mlx5_ib_resources *devr = &dev->devr; create_qp_common() local 947 in->ctx.flags_pd = cpu_to_be32(to_mpd(pd ? pd : devr->p0)->pdn); create_qp_common() 992 in->ctx.cqn_recv = cpu_to_be32(to_mcq(devr->c0)->mcq.cqn); create_qp_common() 993 in->ctx.cqn_send = cpu_to_be32(to_mcq(devr->c0)->mcq.cqn); create_qp_common() 994 in->ctx.rq_type_srqn |= cpu_to_be32(to_msrq(devr->s0)->msrq.srqn); create_qp_common() 998 in->ctx.cqn_recv = cpu_to_be32(to_mcq(devr->c0)->mcq.cqn); create_qp_common() 999 in->ctx.xrcd = cpu_to_be32(to_mxrcd(devr->x1)->xrcdn); create_qp_common() 1000 in->ctx.rq_type_srqn |= cpu_to_be32(to_msrq(devr->s0)->msrq.srqn); create_qp_common() 1004 in->ctx.xrcd = cpu_to_be32(to_mxrcd(devr->x0)->xrcdn); create_qp_common() 1007 in->ctx.xrcd = cpu_to_be32(to_mxrcd(devr->x1)->xrcdn); create_qp_common() 1009 cpu_to_be32(to_msrq(devr->s1)->msrq.srqn); create_qp_common() 1646 context->flags_pd = cpu_to_be32(pd ? pd->pdn : to_mpd(dev->devr.p0)->pdn); __mlx5_ib_modify_qp()
|
H A D | srq.c | 297 xrcdn = to_mxrcd(dev->devr.x0)->xrcdn; mlx5_ib_create_srq() 298 in->ctx.pgoff_cqn |= cpu_to_be32(to_mcq(dev->devr.c0)->mcq.cqn); mlx5_ib_create_srq()
|
H A D | mlx5_ib.h | 422 struct mlx5_ib_resources devr; member in struct:mlx5_ib_dev
|
Completed in 129 milliseconds