Date: Thu, 16 May 2019 16:24:35 +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-12@freebsd.org Subject: svn commit: r347762 - stable/12/sys/dev/mlx5/mlx5_core Message-ID: <201905161624.x4GGOZQ8070015@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Thu May 16 16:24:34 2019 New Revision: 347762 URL: https://svnweb.freebsd.org/changeset/base/347762 Log: MFC r347297: Control automatic update of firmware on driver load with a tunable in mlx5core. Submitted by: kib@ Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c Thu May 16 16:23:58 2019 (r347761) +++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c Thu May 16 16:24:34 2019 (r347762) @@ -821,12 +821,19 @@ void *mlx5_get_protocol_dev(struct mlx5_core_dev *mdev } EXPORT_SYMBOL(mlx5_get_protocol_dev); +static int mlx5_auto_fw_update; +SYSCTL_INT(_hw_mlx5, OID_AUTO, auto_fw_update, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, + &mlx5_auto_fw_update, 0, + "Allow automatic firmware update on driver start"); static int mlx5_firmware_update(struct mlx5_core_dev *dev) { const struct firmware *fw; int err; + TUNABLE_INT_FETCH("hw.mlx5.auto_fw_update", &mlx5_auto_fw_update); + if (!mlx5_auto_fw_update) + return (0); fw = firmware_get("mlx5fw_mfa"); if (fw) { err = mlx5_firmware_flash(dev, fw);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905161624.x4GGOZQ8070015>