Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net/amazon: Ensure that driver version is aligned to the linux kernel

Upstream drivers are managed inside global repository and released all
together, this ensure that driver version is the same as linux kernel,
so update amazon drivers to properly reflect it.

Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Leon Romanovsky and committed by
David S. Miller
1a63443a f724dfc5

+2 -27
-1
drivers/net/ethernet/amazon/ena/ena_ethtool.c
··· 404 404 struct ena_adapter *adapter = netdev_priv(dev); 405 405 406 406 strlcpy(info->driver, DRV_MODULE_NAME, sizeof(info->driver)); 407 - strlcpy(info->version, DRV_MODULE_VERSION, sizeof(info->version)); 408 407 strlcpy(info->bus_info, pci_name(adapter->pdev), 409 408 sizeof(info->bus_info)); 410 409 }
+2 -15
drivers/net/ethernet/amazon/ena/ena_netdev.c
··· 49 49 #include <linux/bpf_trace.h> 50 50 #include "ena_pci_id_tbl.h" 51 51 52 - static char version[] = DEVICE_NAME " v" DRV_MODULE_VERSION "\n"; 53 - 54 52 MODULE_AUTHOR("Amazon.com, Inc. or its affiliates"); 55 53 MODULE_DESCRIPTION(DEVICE_NAME); 56 54 MODULE_LICENSE("GPL"); 57 - MODULE_VERSION(DRV_MODULE_VERSION); 58 55 59 56 /* Time in jiffies before concluding the transmitter is hung. */ 60 57 #define TX_TIMEOUT (5 * HZ) ··· 3090 3093 host_info->os_dist = 0; 3091 3094 strncpy(host_info->os_dist_str, utsname()->release, 3092 3095 sizeof(host_info->os_dist_str) - 1); 3093 - host_info->driver_version = 3094 - (DRV_MODULE_VER_MAJOR) | 3095 - (DRV_MODULE_VER_MINOR << ENA_ADMIN_HOST_INFO_MINOR_SHIFT) | 3096 - (DRV_MODULE_VER_SUBMINOR << ENA_ADMIN_HOST_INFO_SUB_MINOR_SHIFT) | 3097 - ("K"[0] << ENA_ADMIN_HOST_INFO_MODULE_TYPE_SHIFT); 3096 + host_info->driver_version = LINUX_VERSION_CODE; 3098 3097 host_info->num_cpus = num_online_cpus(); 3099 3098 3100 3099 host_info->driver_supported_features = ··· 3469 3476 netif_carrier_on(adapter->netdev); 3470 3477 3471 3478 mod_timer(&adapter->timer_service, round_jiffies(jiffies + HZ)); 3472 - dev_err(&pdev->dev, 3473 - "Device reset completed successfully, Driver info: %s\n", 3474 - version); 3479 + dev_err(&pdev->dev, "Device reset completed successfully\n"); 3475 3480 3476 3481 return rc; 3477 3482 err_disable_msix: ··· 4107 4116 4108 4117 dev_dbg(&pdev->dev, "%s\n", __func__); 4109 4118 4110 - dev_info_once(&pdev->dev, "%s", version); 4111 - 4112 4119 rc = pci_enable_device_mem(pdev); 4113 4120 if (rc) { 4114 4121 dev_err(&pdev->dev, "pci_enable_device_mem() failed!\n"); ··· 4418 4429 4419 4430 static int __init ena_init(void) 4420 4431 { 4421 - pr_info("%s", version); 4422 - 4423 4432 ena_wq = create_singlethread_workqueue(DRV_MODULE_NAME); 4424 4433 if (!ena_wq) { 4425 4434 pr_err("Failed to create workqueue\n");
-11
drivers/net/ethernet/amazon/ena/ena_netdev.h
··· 45 45 #include "ena_com.h" 46 46 #include "ena_eth_com.h" 47 47 48 - #define DRV_MODULE_VER_MAJOR 2 49 - #define DRV_MODULE_VER_MINOR 1 50 - #define DRV_MODULE_VER_SUBMINOR 0 51 - 52 48 #define DRV_MODULE_NAME "ena" 53 - #ifndef DRV_MODULE_VERSION 54 - #define DRV_MODULE_VERSION \ 55 - __stringify(DRV_MODULE_VER_MAJOR) "." \ 56 - __stringify(DRV_MODULE_VER_MINOR) "." \ 57 - __stringify(DRV_MODULE_VER_SUBMINOR) "K" 58 - #endif 59 - 60 49 #define DEVICE_NAME "Elastic Network Adapter (ENA)" 61 50 62 51 /* 1 for AENQ + ADMIN */