Lines Matching refs:devr

2653 		schedule_work(&ibdev->devr.ports[port - 1].pkey_change_work);  in handle_port_change()
2810 struct mlx5_ib_resources *devr = &dev->devr; in mlx5_ib_dev_res_init() local
2822 devr->p0 = ib_alloc_pd(ibdev, 0); in mlx5_ib_dev_res_init()
2823 if (IS_ERR(devr->p0)) in mlx5_ib_dev_res_init()
2824 return PTR_ERR(devr->p0); in mlx5_ib_dev_res_init()
2826 devr->c0 = ib_create_cq(ibdev, NULL, NULL, NULL, &cq_attr); in mlx5_ib_dev_res_init()
2827 if (IS_ERR(devr->c0)) { in mlx5_ib_dev_res_init()
2828 ret = PTR_ERR(devr->c0); in mlx5_ib_dev_res_init()
2832 ret = mlx5_cmd_xrcd_alloc(dev->mdev, &devr->xrcdn0, 0); in mlx5_ib_dev_res_init()
2836 ret = mlx5_cmd_xrcd_alloc(dev->mdev, &devr->xrcdn1, 0); in mlx5_ib_dev_res_init()
2844 attr.ext.cq = devr->c0; in mlx5_ib_dev_res_init()
2846 devr->s0 = ib_create_srq(devr->p0, &attr); in mlx5_ib_dev_res_init()
2847 if (IS_ERR(devr->s0)) { in mlx5_ib_dev_res_init()
2848 ret = PTR_ERR(devr->s0); in mlx5_ib_dev_res_init()
2857 devr->s1 = ib_create_srq(devr->p0, &attr); in mlx5_ib_dev_res_init()
2858 if (IS_ERR(devr->s1)) { in mlx5_ib_dev_res_init()
2859 ret = PTR_ERR(devr->s1); in mlx5_ib_dev_res_init()
2863 for (port = 0; port < ARRAY_SIZE(devr->ports); ++port) in mlx5_ib_dev_res_init()
2864 INIT_WORK(&devr->ports[port].pkey_change_work, in mlx5_ib_dev_res_init()
2870 ib_destroy_srq(devr->s0); in mlx5_ib_dev_res_init()
2872 mlx5_cmd_xrcd_dealloc(dev->mdev, devr->xrcdn1, 0); in mlx5_ib_dev_res_init()
2874 mlx5_cmd_xrcd_dealloc(dev->mdev, devr->xrcdn0, 0); in mlx5_ib_dev_res_init()
2876 ib_destroy_cq(devr->c0); in mlx5_ib_dev_res_init()
2878 ib_dealloc_pd(devr->p0); in mlx5_ib_dev_res_init()
2884 struct mlx5_ib_resources *devr = &dev->devr; in mlx5_ib_dev_res_cleanup() local
2893 for (port = 0; port < ARRAY_SIZE(devr->ports); ++port) in mlx5_ib_dev_res_cleanup()
2894 cancel_work_sync(&devr->ports[port].pkey_change_work); in mlx5_ib_dev_res_cleanup()
2896 ib_destroy_srq(devr->s1); in mlx5_ib_dev_res_cleanup()
2897 ib_destroy_srq(devr->s0); in mlx5_ib_dev_res_cleanup()
2898 mlx5_cmd_xrcd_dealloc(dev->mdev, devr->xrcdn1, 0); in mlx5_ib_dev_res_cleanup()
2899 mlx5_cmd_xrcd_dealloc(dev->mdev, devr->xrcdn0, 0); in mlx5_ib_dev_res_cleanup()
2900 ib_destroy_cq(devr->c0); in mlx5_ib_dev_res_cleanup()
2901 ib_dealloc_pd(devr->p0); in mlx5_ib_dev_res_cleanup()