svn commit: r347762 - stable/12/sys/dev/mlx5/mlx5_core
Hans Petter Selasky
hselasky at FreeBSD.org
Thu May 16 16:24:36 UTC 2019
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);
More information about the svn-src-stable
mailing list