Lines Matching refs:mplane
4697 struct mlx5_ib_dev *mparent = to_mdev(parent), *mplane; in mlx5_ib_add_sub_dev() local
4711 mplane = ib_alloc_device(mlx5_ib_dev, ib_dev); in mlx5_ib_add_sub_dev()
4712 if (!mplane) in mlx5_ib_add_sub_dev()
4715 mplane->port = kcalloc(mparent->num_plane * mparent->num_ports, in mlx5_ib_add_sub_dev()
4716 sizeof(*mplane->port), GFP_KERNEL); in mlx5_ib_add_sub_dev()
4717 if (!mplane->port) { in mlx5_ib_add_sub_dev()
4722 mplane->ib_dev.type = type; in mlx5_ib_add_sub_dev()
4723 mplane->mdev = mparent->mdev; in mlx5_ib_add_sub_dev()
4724 mplane->num_ports = mparent->num_plane; in mlx5_ib_add_sub_dev()
4725 mplane->sub_dev_name = name; in mlx5_ib_add_sub_dev()
4726 mplane->ib_dev.phys_port_cnt = mplane->num_ports; in mlx5_ib_add_sub_dev()
4728 ret = __mlx5_ib_add(mplane, &plane_profile); in mlx5_ib_add_sub_dev()
4732 mparent->smi_dev = mplane; in mlx5_ib_add_sub_dev()
4733 return &mplane->ib_dev; in mlx5_ib_add_sub_dev()
4736 kfree(mplane->port); in mlx5_ib_add_sub_dev()
4738 ib_dealloc_device(&mplane->ib_dev); in mlx5_ib_add_sub_dev()