summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_ethdev.c
diff options
context:
space:
mode:
authorNĂ©lio Laranjeiro <nelio.laranjeiro@6wind.com>2018-03-12 14:43:17 +0100
committerFerruh Yigit <ferruh.yigit@intel.com>2018-03-30 14:08:44 +0200
commitf47ba80080ab81ad513f843407bec7178fed8857 (patch)
treee88bb3ebe2608f08df8971c3c7e6c48cc6c2173b /drivers/net/mlx5/mlx5_ethdev.c
parent264713ba1025e18436433a00fb14da8fc3f27101 (diff)
downloaddpdk-f47ba80080ab81ad513f843407bec7178fed8857.zip
dpdk-f47ba80080ab81ad513f843407bec7178fed8857.tar.gz
dpdk-f47ba80080ab81ad513f843407bec7178fed8857.tar.xz
net/mlx5: remove kernel version check
Kernel version check was introduced in commit 3a49ffe38a95 ("net/mlx5: fix link status query") due to a bug fixed by commit ef09a7fc7620 ("net/mlx5: fix inconsistent link status query") This patch restore the previous behavior as described in Linux API. Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_ethdev.c')
-rw-r--r--drivers/net/mlx5/mlx5_ethdev.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index dd46124..26f13fb 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -18,11 +18,9 @@
#include <net/if.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
-#include <sys/utsname.h>
#include <netinet/in.h>
#include <linux/ethtool.h>
#include <linux/sockios.h>
-#include <linux/version.h>
#include <fcntl.h>
#include <stdalign.h>
#include <sys/un.h>
@@ -734,20 +732,15 @@ mlx5_force_link_status_change(struct rte_eth_dev *dev, int status)
int
mlx5_link_update(struct rte_eth_dev *dev, int wait_to_complete __rte_unused)
{
- struct utsname utsname;
- int ver[3];
int ret;
struct rte_eth_link dev_link = dev->data->dev_link;
- if (uname(&utsname) == -1 ||
- sscanf(utsname.release, "%d.%d.%d",
- &ver[0], &ver[1], &ver[2]) != 3 ||
- KERNEL_VERSION(ver[0], ver[1], ver[2]) < KERNEL_VERSION(4, 9, 0))
- ret = mlx5_link_update_unlocked_gset(dev);
- else
+ ret = mlx5_link_update_unlocked_gset(dev);
+ if (ret) {
ret = mlx5_link_update_unlocked_gs(dev);
- if (ret)
- return ret;
+ if (ret)
+ return ret;
+ }
/* If lsc interrupt is disabled, should always be ready for traffic. */
if (!dev->data->dev_conf.intr_conf.lsc) {
mlx5_link_start(dev);