From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by dpdk.org (Postfix) with ESMTP id C67F52C8 for ; Tue, 20 Jun 2017 13:38:07 +0200 (CEST) Received: by mail-pf0-f195.google.com with SMTP id w12so22260538pfk.0 for ; Tue, 20 Jun 2017 04:38:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GA0j/JDzPuwea4OYeWRLBEY2ZAphRkWrEjPig22iWE4=; b=YKJ3MzN7U34/Yo1LmdtvCtW9DeY8yX+kybhzZCT2wQuMKWmrMPRFQfqFLbg1m3O1yM EBVMmQ2O/fvDhdzx8AYqvHBVVwkh4qyVICwGKYYc951gfw0TEDgLiNehtxPsNBfj+iQs VoaDgf2BxAqQNSe2oGqmqpt3eMyr6ZykfCFhLTfshFRg7n147Cq6wmJ60wJHCwM5xr9p Ny0NfA91fMcfkPANBHBUWzI1zOQ8v/99iFJcqN7z/1iu/4IF8tr7vm8ysd3bZQLs4STg 4+MEwUA4NIaoXKVGfoQ0vprI359QocHJIdSuvoQiSZ6jCiA6x28S+MUO3Evn6bomIHhD D63A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GA0j/JDzPuwea4OYeWRLBEY2ZAphRkWrEjPig22iWE4=; b=RyVF4QDpe2hJwE3evbsm7agihHUGy6JexTCtxuh4/kNF0Ar6ccX8HaDJKGSMBZLKoh WUbx6YoDLY9AhiNHBSwpkLE8vtUh58P0zR3YXkKHshNXhrAyfE7Ff3aNI9CbBU0vz8eR oEpXhX/J/L0CQHr3qY6RqxSBLvwRJmYo999LfHZOkxcPnJ2zyluHWEBbvnSdOAIc1ilb RHLOBRu2d5ZzXEkqOTSsozDMExqO5vYKRhvdpGR0ezN/HSckir0kc6QR8r9l5XiSgFMM l08DLuyhlN4ztl+Y0Ew6f1914mCYGxulzVaS5DgfB+iY9mh8WxR+9fGREr2/H7qpmkpj qAlw== X-Gm-Message-State: AKS2vOxxZKztPpCo7xrfEy6DmVSoWiDhZE6o3zj2KUafLYgW6q+ba7I7 kqLYiAeEHZsazdjA X-Received: by 10.98.52.66 with SMTP id b63mr30197556pfa.7.1497958687127; Tue, 20 Jun 2017 04:38:07 -0700 (PDT) Received: from yliu-home.localdomain ([45.63.61.64]) by smtp.gmail.com with ESMTPSA id 25sm6104783pfj.59.2017.06.20.04.38.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jun 2017 04:38:06 -0700 (PDT) From: Yuanhan Liu To: Ajit Khaparde Cc: Stephen Hurd , dpdk stable Date: Tue, 20 Jun 2017 19:35:42 +0800 Message-Id: <1497958550-13600-30-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497958550-13600-1-git-send-email-yliu@fridaylinux.org> References: <1497958550-13600-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/bnxt: fix reporting of link status' has been queued to stable release 17.05.1 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: Tue, 20 Jun 2017 11:38:08 -0000 Hi, FYI, your patch has been queued to stable release 17.05.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/22/17. So please shout if anyone has objections. Thanks. --yliu --- >>From 139f95b38cf6cc671f571da056e32d94b5ec6a20 Mon Sep 17 00:00:00 2001 From: Ajit Khaparde Date: Thu, 8 Jun 2017 23:24:48 -0500 Subject: [PATCH] net/bnxt: fix reporting of link status [ upstream commit bc8ee8572e8e5f82e4cd695c107f3fbcc42a5674 ] This patch fixes incorrect reporting of link status 1) When link is down, set speed to zero. Otherwise a wrong non-zero speed will be displayed. 2) DAC cables can detect there is a signal, but it necessarily does not mean link is up. Code previously treated this as link up. Fixes: 7bc8e9a227cc ("net/bnxt: support async link notification") Signed-off-by: Stephen Hurd Signed-off-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_hwrm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 3849d1a..d898723 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -536,7 +536,7 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp, HWRM_CHECK_RESULT; link_info->phy_link_status = resp->link; - if (link_info->phy_link_status != HWRM_PORT_PHY_QCFG_OUTPUT_LINK_NO_LINK) { + if (link_info->phy_link_status == HWRM_PORT_PHY_QCFG_OUTPUT_LINK_LINK) { link_info->link_up = 1; link_info->link_speed = rte_le_to_cpu_16(resp->link_speed); } else { @@ -1438,7 +1438,7 @@ int bnxt_get_hwrm_link_config(struct bnxt *bp, struct rte_eth_link *link) link->link_speed = bnxt_parse_hw_link_speed(link_info->link_speed); else - link->link_speed = ETH_LINK_SPEED_10M; + link->link_speed = ETH_SPEED_NUM_NONE; link->link_duplex = bnxt_parse_hw_link_duplex(link_info->duplex); link->link_status = link_info->link_up; link->link_autoneg = link_info->auto_mode == -- 2.7.4