Date: Thu, 16 May 2019 17:38:59 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r347835 - stable/11/sys/dev/mlx5/mlx5_core Message-ID: <201905161738.x4GHcxNc011543@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Thu May 16 17:38:59 2019 New Revision: 347835 URL: https://svnweb.freebsd.org/changeset/base/347835 Log: MFC r347284: Convert remaining module parameters into SYSCTLs in mlx5core. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c Thu May 16 17:38:11 2019 (r347834) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c Thu May 16 17:38:59 2019 (r347835) @@ -25,8 +25,6 @@ * $FreeBSD$ */ -#define LINUXKPI_PARAM_PREFIX mlx5_ - #include <linux/kmod.h> #include <linux/module.h> #include <linux/errno.h> @@ -57,17 +55,19 @@ MODULE_DEPEND(mlx5, linuxkpi, 1, 1, 1); #endif MODULE_VERSION(mlx5, 1); +SYSCTL_NODE(_hw, OID_AUTO, mlx5, CTLFLAG_RW, 0, "mlx5 hardware controls"); + int mlx5_core_debug_mask; -module_param_named(debug_mask, mlx5_core_debug_mask, int, 0644); -MODULE_PARM_DESC(debug_mask, "debug mask: 1 = dump cmd data, 2 = dump cmd exec time, 3 = both. Default=0"); +SYSCTL_INT(_hw_mlx5, OID_AUTO, debug_mask, CTLFLAG_RWTUN, + &mlx5_core_debug_mask, 0, + "debug mask: 1 = dump cmd data, 2 = dump cmd exec time, 3 = both. Default=0"); #define MLX5_DEFAULT_PROF 2 -static int prof_sel = MLX5_DEFAULT_PROF; -module_param_named(prof_sel, prof_sel, int, 0444); -MODULE_PARM_DESC(prof_sel, "profile selector. Valid range 0 - 2"); +static int mlx5_prof_sel = MLX5_DEFAULT_PROF; +SYSCTL_INT(_hw_mlx5, OID_AUTO, prof_sel, CTLFLAG_RWTUN, + &mlx5_prof_sel, 0, + "profile selector. Valid range 0 - 2"); -SYSCTL_NODE(_hw, OID_AUTO, mlx5, CTLFLAG_RW, 0, "mlx5 HW controls"); - static int mlx5_fast_unload_enabled = 1; SYSCTL_INT(_hw_mlx5, OID_AUTO, fast_unload_enabled, CTLFLAG_RWTUN, &mlx5_fast_unload_enabled, 0, @@ -1217,11 +1217,11 @@ static int init_one(struct pci_dev *pdev, if (id) priv->pci_dev_data = id->driver_data; - if (prof_sel < 0 || prof_sel >= ARRAY_SIZE(profiles)) { + if (mlx5_prof_sel < 0 || mlx5_prof_sel >= ARRAY_SIZE(profiles)) { device_printf(bsddev, "WARN: selected profile out of range, selecting default (%d)\n", MLX5_DEFAULT_PROF); - prof_sel = MLX5_DEFAULT_PROF; + mlx5_prof_sel = MLX5_DEFAULT_PROF; } - dev->profile = &profiles[prof_sel]; + dev->profile = &profiles[mlx5_prof_sel]; dev->pdev = pdev; dev->event = mlx5_core_event;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905161738.x4GHcxNc011543>