From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 986941B70E for ; Wed, 9 May 2018 17:29:14 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from shahafs@mellanox.com) with ESMTPS (AES256-SHA encrypted); 9 May 2018 18:06:12 +0300 Received: from unicorn01.mtl.labs.mlnx. (unicorn01.mtl.labs.mlnx [10.7.12.62]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id w49F4SrS008373; Wed, 9 May 2018 18:04:29 +0300 From: Shahaf Shuler To: bluca@debian.org Cc: stable@dpdk.org, nelio.laranjeiro@6wind.com, adrien.mazarguil@6wind.com, yskoh@mellanox.com Date: Wed, 9 May 2018 18:04:03 +0300 Message-Id: <34d14f356f91582c1394a3c93805c6eea1e78777.1525878119.git.shahafs@mellanox.com> X-Mailer: git-send-email 2.12.0 MIME-Version: 1.0 In-Reply-To: References: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH v2 11/20] net/mlx5: remove kernel version check X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 May 2018 15:29:15 -0000 From: NĂ©lio Laranjeiro [ upstream commit f47ba80080ab81ad513f843407bec7178fed8857 ] 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 Acked-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_ethdev.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c index 31d500d5eb..8a9e00c3b7 100644 --- a/drivers/net/mlx5/mlx5_ethdev.c +++ b/drivers/net/mlx5/mlx5_ethdev.c @@ -18,11 +18,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -723,20 +721,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); -- 2.12.0