diff --git a/sys/dev/mlx5/mlx5_core/mlx5_main.c b/sys/dev/mlx5/mlx5_core/mlx5_main.c --- a/sys/dev/mlx5/mlx5_core/mlx5_main.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_main.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2020, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2013-2021, Mellanox Technologies, Ltd. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -55,8 +55,7 @@ static const char mlx5_version[] = "Mellanox Core driver " DRIVER_VERSION " (" DRIVER_RELDATE ")"; -MODULE_AUTHOR("Eli Cohen "); -MODULE_DESCRIPTION("Mellanox Connect-IB, ConnectX-4 core driver"); +MODULE_DESCRIPTION("Mellanox ConnectX-4 and onwards core driver"); MODULE_LICENSE("Dual BSD/GPL"); #if (__FreeBSD_version >= 1100000) MODULE_DEPEND(mlx5, linuxkpi, 1, 1, 1); @@ -1326,6 +1325,8 @@ struct sysctl_oid *current_cap_sysctl_node; struct sysctl_oid *max_cap_sysctl_node; + printk_once("mlx5: %s", mlx5_version); + dev = kzalloc(sizeof(*dev), GFP_KERNEL); priv = &dev->priv; if (id) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -35,14 +35,6 @@ #include -#ifndef ETH_DRIVER_VERSION -#define ETH_DRIVER_VERSION "3.6.0" -#endif -#define DRIVER_RELDATE "December 2020" - -static const char mlx5e_version[] = "mlx5en: Mellanox Ethernet driver " - ETH_DRIVER_VERSION " (" DRIVER_RELDATE ")\n"; - static int mlx5e_get_wqe_sz(struct mlx5e_priv *priv, u32 *wqe_sz, u32 *nsegs); struct mlx5e_channel_param { @@ -4773,14 +4765,6 @@ mlx5_unregister_interface(&mlx5e_interface); } -static void -mlx5e_show_version(void __unused *arg) -{ - - printf("%s", mlx5e_version); -} -SYSINIT(mlx5e_show_version, SI_SUB_DRIVERS, SI_ORDER_ANY, mlx5e_show_version, NULL); - module_init_order(mlx5e_init, SI_ORDER_SIXTH); module_exit_order(mlx5e_cleanup, SI_ORDER_SIXTH); diff --git a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c --- a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c +++ b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c @@ -50,12 +50,6 @@ #include #include "mlx5_ib.h" -#define DRIVER_NAME "mlx5ib" -#ifndef DRIVER_VERSION -#define DRIVER_VERSION "3.6.0" -#endif -#define DRIVER_RELDATE "December 2020" - MODULE_DESCRIPTION("Mellanox Connect-IB HCA IB driver"); MODULE_LICENSE("Dual BSD/GPL"); MODULE_DEPEND(mlx5ib, linuxkpi, 1, 1, 1); @@ -63,10 +57,6 @@ MODULE_DEPEND(mlx5ib, ibcore, 1, 1, 1); MODULE_VERSION(mlx5ib, 1); -static const char mlx5_version[] = - DRIVER_NAME ": Mellanox Connect-IB Infiniband driver " - DRIVER_VERSION " (" DRIVER_RELDATE ")\n"; - enum { MLX5_ATOMIC_SIZE_QP_8BYTES = 1 << 3, }; @@ -3575,13 +3565,5 @@ mlx5_ib_odp_cleanup(); } -static void -mlx5_ib_show_version(void __unused *arg) -{ - - printf("%s", mlx5_version); -} -SYSINIT(mlx5_ib_show_version, SI_SUB_DRIVERS, SI_ORDER_ANY, mlx5_ib_show_version, NULL); - module_init_order(mlx5_ib_init, SI_ORDER_SEVENTH); module_exit_order(mlx5_ib_cleanup, SI_ORDER_SEVENTH);