Date: Wed, 8 May 2019 11:05:59 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347315 - head/sys/dev/mlx5/mlx5_core Message-ID: <201905081105.x48B5xaq063592@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Wed May 8 11:05:59 2019 New Revision: 347315 URL: https://svnweb.freebsd.org/changeset/base/347315 Log: Rename functions from mlx5_fwdump to mlx5_ctl in mlx5core. Submitted by: kib@ MFC after: 3 days Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_core/mlx5_core.h head/sys/dev/mlx5/mlx5_core/mlx5_fwdump.c head/sys/dev/mlx5/mlx5_core/mlx5_main.c Modified: head/sys/dev/mlx5/mlx5_core/mlx5_core.h ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_core.h Wed May 8 11:05:30 2019 (r347314) +++ head/sys/dev/mlx5/mlx5_core/mlx5_core.h Wed May 8 11:05:59 2019 (r347315) @@ -104,8 +104,8 @@ void mlx5e_cleanup(void); int mlx5_rename_eq(struct mlx5_core_dev *dev, int eq_ix, char *name); -int mlx5_fwdump_init(void); -void mlx5_fwdump_fini(void); +int mlx5_ctl_init(void); +void mlx5_ctl_fini(void); void mlx5_fwdump_prep(struct mlx5_core_dev *mdev); void mlx5_fwdump(struct mlx5_core_dev *mdev); void mlx5_fwdump_clean(struct mlx5_core_dev *mdev); Modified: head/sys/dev/mlx5/mlx5_core/mlx5_fwdump.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_fwdump.c Wed May 8 11:05:30 2019 (r347314) +++ head/sys/dev/mlx5/mlx5_core/mlx5_fwdump.c Wed May 8 11:05:59 2019 (r347315) @@ -244,7 +244,7 @@ mlx5_fw_reset(struct mlx5_core_dev *mdev) } static int -mlx5_fwdump_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, +mlx5_ctl_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td) { struct mlx5_core_dev *mdev; @@ -343,34 +343,34 @@ mlx5_fwdump_ioctl(struct cdev *dev, u_long cmd, caddr_ return (error); } -static struct cdevsw mlx5_fwdump_devsw = { +static struct cdevsw mlx5_ctl_devsw = { .d_version = D_VERSION, - .d_ioctl = mlx5_fwdump_ioctl, + .d_ioctl = mlx5_ctl_ioctl, }; -static struct cdev *mlx5_fwdump_dev; +static struct cdev *mlx5_ctl_dev; int -mlx5_fwdump_init(void) +mlx5_ctl_init(void) { struct make_dev_args mda; int error; make_dev_args_init(&mda); mda.mda_flags = MAKEDEV_WAITOK | MAKEDEV_CHECKNAME; - mda.mda_devsw = &mlx5_fwdump_devsw; + mda.mda_devsw = &mlx5_ctl_devsw; mda.mda_uid = UID_ROOT; mda.mda_gid = GID_OPERATOR; mda.mda_mode = 0640; - error = make_dev_s(&mda, &mlx5_fwdump_dev, "mlx5ctl"); + error = make_dev_s(&mda, &mlx5_ctl_dev, "mlx5ctl"); return (-error); } void -mlx5_fwdump_fini(void) +mlx5_ctl_fini(void) { - if (mlx5_fwdump_dev != NULL) - destroy_dev(mlx5_fwdump_dev); + if (mlx5_ctl_dev != NULL) + destroy_dev(mlx5_ctl_dev); } Modified: head/sys/dev/mlx5/mlx5_core/mlx5_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_main.c Wed May 8 11:05:30 2019 (r347314) +++ head/sys/dev/mlx5/mlx5_core/mlx5_main.c Wed May 8 11:05:59 2019 (r347315) @@ -1608,13 +1608,13 @@ static int __init init(void) if (err) goto err_debug; - err = mlx5_fwdump_init(); + err = mlx5_ctl_init(); if (err) - goto err_fwdump; + goto err_ctl; return 0; -err_fwdump: +err_ctl: pci_unregister_driver(&mlx5_core_driver); err_debug: @@ -1623,7 +1623,7 @@ err_debug: static void __exit cleanup(void) { - mlx5_fwdump_fini(); + mlx5_ctl_fini(); pci_unregister_driver(&mlx5_core_driver); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905081105.x48B5xaq063592>