Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp824759pxb; Tue, 3 Nov 2020 13:36:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJzniKOlMg+9XgY59cF2YAoJtJRs8+c59eDQsi75rw8Mw/7RU9A2tb+Vyb62i/B2AY6Nhe9q X-Received: by 2002:a17:906:c206:: with SMTP id d6mr21346407ejz.239.1604439366398; Tue, 03 Nov 2020 13:36:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604439366; cv=none; d=google.com; s=arc-20160816; b=Ke/zy9eetOrv/MqgfuUIYJ2yFGYTH1ESPu2MLuYj46Gk2OK3rBoCHHPOfQo2qGDNW0 8T0OO80Xhsn+7MlSYYs/0TQfTmtN7h7sP/2DUONjg3Z/PHs2ikwLdIJEIs12zujFg4zp Sk7nifI4YHmFZOb1m1u7RFQhjxEEk7hwow0VvFePnnNBQVd/bKN/1ECPYrUviUKCHDM9 kcgQWtJ3uL2lRjqaL1EcwNryeew1A8s3yFvFZLL6HqkUcW3QQI8LAIQaumoY3jh2Cpme vFuptPo+c2chC/5+hzRPRc7UmlBuMILIx1bU7H4vHD17oREI3Sb9VaqNSH6qPw2sQNu2 gD/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8PA5VD50S6uHMQQ+Lfk5Jn6r9LJBog3d10TAFBkMTqc=; b=HfmcswdQRgzmb0k/h82M+K1rvzG7h2tlo5BJJO77LR61EsgnTFYu8IE1zUPAKVgfRm exOb8ln/KSSOc3GtZtglVRQMyJOu4Rxd7DsOfTi5udmZsNVf91zfXQGMUplAETaMpUbv CHIMbTt4ySBSRnVrCglIKplyCz5hpqsKd54mE+iq+5ObvWzvSMtMy2kxWvmsOaz7TOT7 iK7BBkd39JWTTFQev3ccLbTkMSXKKEF0Sa0eZV+RwfPjcA66xTaj1wZoXfMnawAk2mbG VWOXd+bhE3fK2+IKruhT3GRXivc7+ddlJ4Htya0mvHnfA6dV/bR1raLpY/RyZRkADjFz d+3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bFD2vSgz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i24si46913ejc.643.2020.11.03.13.35.43; Tue, 03 Nov 2020 13:36:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bFD2vSgz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731977AbgKCVdW (ORCPT + 99 others); Tue, 3 Nov 2020 16:33:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:59138 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731408AbgKCU5B (ORCPT ); Tue, 3 Nov 2020 15:57:01 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 353F722226; Tue, 3 Nov 2020 20:57:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604437020; bh=3nX3E763hHhvO5dIERQqUTU36U90CcTMpG64OIu2L4Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bFD2vSgzSpiTYm7pSsi7UGhALQBPU4t6ATUEUQUDRr0yrwhlq27OW461XtF1nTUUA GR0cdafwg9nmtePBVg+MBs87nPF9OTs+YS3P/bH4fU+fBzzcs65fLG9gej6IAOu3Ar xbYWnUYSK51G6XE8txhBmiTGY0LzzuPX1B6S99wo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vasundhara Volam , Edwin Peer , Michael Chan , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.4 075/214] bnxt_en: Log unknown link speed appropriately. Date: Tue, 3 Nov 2020 21:35:23 +0100 Message-Id: <20201103203257.420606021@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201103203249.448706377@linuxfoundation.org> References: <20201103203249.448706377@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michael Chan [ Upstream commit 8eddb3e7ce124dd6375d3664f1aae13873318b0f ] If the VF virtual link is set to always enabled, the speed may be unknown when the physical link is down. The driver currently logs the link speed as 4294967295 Mbps which is SPEED_UNKNOWN. Modify the link up log message as "speed unknown" which makes more sense. Reviewed-by: Vasundhara Volam Reviewed-by: Edwin Peer Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/1602493854-29283-7-git-send-email-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index cdd3764760ed9..6f777e9b4b936 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -8375,6 +8375,11 @@ static void bnxt_report_link(struct bnxt *bp) u16 fec; netif_carrier_on(bp->dev); + speed = bnxt_fw_to_ethtool_speed(bp->link_info.link_speed); + if (speed == SPEED_UNKNOWN) { + netdev_info(bp->dev, "NIC Link is Up, speed unknown\n"); + return; + } if (bp->link_info.duplex == BNXT_LINK_DUPLEX_FULL) duplex = "full"; else @@ -8387,7 +8392,6 @@ static void bnxt_report_link(struct bnxt *bp) flow_ctrl = "ON - receive"; else flow_ctrl = "none"; - speed = bnxt_fw_to_ethtool_speed(bp->link_info.link_speed); netdev_info(bp->dev, "NIC Link is Up, %u Mbps %s duplex, Flow control: %s\n", speed, duplex, flow_ctrl); if (bp->flags & BNXT_FLAG_EEE_CAP) -- 2.27.0