Lines Matching refs:mcdev
11 #define mlx5ctl_err(mcdev, format, ...) \ argument
12 dev_err(&mcdev->fwctl.dev, format, ##__VA_ARGS__)
14 #define mlx5ctl_dbg(mcdev, format, ...) \ argument
15 dev_dbg(&mcdev->fwctl.dev, "PID %u: " format, current->pid, \
90 static int mlx5ctl_alloc_uid(struct mlx5ctl_dev *mcdev, u32 cap) in mlx5ctl_alloc_uid() argument
100 mlx5ctl_dbg(mcdev, "%s: caps 0x%x\n", __func__, cap); in mlx5ctl_alloc_uid()
104 ret = mlx5_cmd_exec(mcdev->mdev, in, sizeof(in), out, sizeof(out)); in mlx5ctl_alloc_uid()
109 mlx5ctl_dbg(mcdev, "allocated uid %u with caps 0x%x\n", uid, cap); in mlx5ctl_alloc_uid()
113 static void mlx5ctl_release_uid(struct mlx5ctl_dev *mcdev, u16 uid) in mlx5ctl_release_uid() argument
116 struct mlx5_core_dev *mdev = mcdev->mdev; in mlx5ctl_release_uid()
123 mlx5ctl_dbg(mcdev, "released uid %u %pe\n", uid, ERR_PTR(ret)); in mlx5ctl_release_uid()
130 struct mlx5ctl_dev *mcdev = in mlx5ctl_open_uctx() local
139 if (MLX5_CAP_GEN(mcdev->mdev, uctx_cap) & in mlx5ctl_open_uctx()
143 uid = mlx5ctl_alloc_uid(mcdev, mfd->uctx_caps); in mlx5ctl_open_uctx()
153 struct mlx5ctl_dev *mcdev = in mlx5ctl_close_uctx() local
158 mlx5ctl_release_uid(mcdev, mfd->uctx_uid); in mlx5ctl_close_uctx()
302 struct mlx5ctl_dev *mcdev = in mlx5ctl_fw_rpc() local
313 mlx5ctl_dbg(mcdev, "[UID %d] cmdif: opcode 0x%x inlen %zu outlen %zu\n", in mlx5ctl_fw_rpc()
334 ret = mlx5_cmd_do(mcdev->mdev, rpc_in, in_len, rpc_out, *out_len); in mlx5ctl_fw_rpc()
336 mlx5ctl_dbg(mcdev, in mlx5ctl_fw_rpc()
369 struct mlx5ctl_dev *mcdev __free(mlx5ctl) = fwctl_alloc_device( in mlx5ctl_probe()
373 if (!mcdev) in mlx5ctl_probe()
376 mcdev->mdev = mdev; in mlx5ctl_probe()
378 ret = fwctl_register(&mcdev->fwctl); in mlx5ctl_probe()
381 auxiliary_set_drvdata(adev, no_free_ptr(mcdev)); in mlx5ctl_probe()
387 struct mlx5ctl_dev *mcdev = auxiliary_get_drvdata(adev); in mlx5ctl_remove() local
389 fwctl_unregister(&mcdev->fwctl); in mlx5ctl_remove()
390 fwctl_put(&mcdev->fwctl); in mlx5ctl_remove()