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, \
93 static int mlx5ctl_alloc_uid(struct mlx5ctl_dev *mcdev, u32 cap) in mlx5ctl_alloc_uid() argument
103 mlx5ctl_dbg(mcdev, "%s: caps 0x%x\n", __func__, cap); in mlx5ctl_alloc_uid()
107 ret = mlx5_cmd_exec(mcdev->mdev, in, sizeof(in), out, sizeof(out)); in mlx5ctl_alloc_uid()
112 mlx5ctl_dbg(mcdev, "allocated uid %u with caps 0x%x\n", uid, cap); in mlx5ctl_alloc_uid()
116 static void mlx5ctl_release_uid(struct mlx5ctl_dev *mcdev, u16 uid) in mlx5ctl_release_uid() argument
119 struct mlx5_core_dev *mdev = mcdev->mdev; in mlx5ctl_release_uid()
126 mlx5ctl_dbg(mcdev, "released uid %u %pe\n", uid, ERR_PTR(ret)); in mlx5ctl_release_uid()
133 struct mlx5ctl_dev *mcdev = in mlx5ctl_open_uctx() local
142 if (MLX5_CAP_GEN(mcdev->mdev, uctx_cap) & in mlx5ctl_open_uctx()
146 uid = mlx5ctl_alloc_uid(mcdev, mfd->uctx_caps); in mlx5ctl_open_uctx()
156 struct mlx5ctl_dev *mcdev = in mlx5ctl_close_uctx() local
161 mlx5ctl_release_uid(mcdev, mfd->uctx_uid); in mlx5ctl_close_uctx()
309 struct mlx5ctl_dev *mcdev = in mlx5ctl_fw_rpc() local
320 mlx5ctl_dbg(mcdev, "[UID %d] cmdif: opcode 0x%x inlen %zu outlen %zu\n", in mlx5ctl_fw_rpc()
341 ret = mlx5_cmd_do(mcdev->mdev, rpc_in, in_len, rpc_out, *out_len); in mlx5ctl_fw_rpc()
343 mlx5ctl_dbg(mcdev, in mlx5ctl_fw_rpc()
376 struct mlx5ctl_dev *mcdev __free(mlx5ctl) = fwctl_alloc_device( in mlx5ctl_probe()
380 if (!mcdev) in mlx5ctl_probe()
383 mcdev->mdev = mdev; in mlx5ctl_probe()
385 ret = fwctl_register(&mcdev->fwctl); in mlx5ctl_probe()
388 auxiliary_set_drvdata(adev, no_free_ptr(mcdev)); in mlx5ctl_probe()
394 struct mlx5ctl_dev *mcdev = auxiliary_get_drvdata(adev); in mlx5ctl_remove() local
396 fwctl_unregister(&mcdev->fwctl); in mlx5ctl_remove()
397 fwctl_put(&mcdev->fwctl); in mlx5ctl_remove()