Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp819453pxb; Tue, 3 Nov 2020 13:27:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJwGP8dnz5CxzQmCJ8jqD/5gBE3BRrmb/8kcfsbkFfC68rYpkq6+IGGPbAy3cHQxYK6kHZtr X-Received: by 2002:a05:6402:143a:: with SMTP id c26mr24404253edx.150.1604438828088; Tue, 03 Nov 2020 13:27:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604438828; cv=none; d=google.com; s=arc-20160816; b=jdi4JAEiOJ8dcUfg886y2Dga/ltSOmJGjdS6zdaZezN7uRGr+z0G0sPvE6RdYBVTJl SCGyXE6/bHj6NdWZk/Krm+Eiu6Lnx/G0CknVKSP6Se+N7033CgQowt+lPH+EWuBTKruL bk9gpXDV2Gd6fespDO7WeYjijq+Su06IoZrfzSnb+Ayda7tBdBPOb+JrUmwSMYjBwtKP XaH9gwM6nJhVdIBa6Xhst+kEsnIDw+Qbtx5wuIPvDSzxxVcABIVvnjy0WmlRLQcWPqiM E/A5NUSXLoczJkijFJse8bh3B8rb6DavD39tHPlEvHQLsRZ7jIObq+/jY7JJEfcQA9Qb hLdA== 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=/DdOz18Ng17HAXbG4s7TgNp7pj6cwm+ilc8uXT18EfQ=; b=mSgiZvD99sFlTr/Q5Bk7sj3O0zKVyc6tf7l9xrmgsQ0mPd1xJxqLcWBa0rvtM3EKws YqLPjFINdMbhxncFrAvN7f2DObaNmvh4FtgBfPOCvmHbJid/85RLNn+TxNC2b5nl8ihE jamGFQyUl18I6MLm2vX6MjbE/r9n3X0ssof7tGJxl2zV3qEBiGPzPw46cXBShzzS13jt zMWUGY7ow4QHd1omCN13XAvDjkjmQoyHBvpZiCvOxfaq/4xS1s3oCwJLoei+pdf7txdB e1TMutszkPQKlV1JSwGQd+bNJjYnNujUuwRFgJZ6+wZ9y1tRoZsrRqWyVWVgxMr5UFC9 HDxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=e6FMbPK6; 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 z10si14934615edp.346.2020.11.03.13.26.45; Tue, 03 Nov 2020 13:27:08 -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=e6FMbPK6; 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 S1730019AbgKCVXU (ORCPT + 99 others); Tue, 3 Nov 2020 16:23:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:42794 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388005AbgKCVEk (ORCPT ); Tue, 3 Nov 2020 16:04:40 -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 DC3A6205ED; Tue, 3 Nov 2020 21:04:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604437479; bh=6k3Rv2TFBDOhHAM997ZTHP+m9n50T5c3X0cKrYf5zxU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e6FMbPK6TdF2MdUiClgH2sY6Qb6Q9cB7vqLPUqDMwUmjD83PFP2MQw9uofRoG8EJU u79KO8WcqbaiVBWLMScwiMPcNsfp5sC2BodsjMAUDxR6GZcmzx1pHudfnCAHeyWFzK QTUMyl5E6DYA8+PxAVoc5tYK84o7/jUOR8v8T1A8= 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 4.19 095/191] bnxt_en: Log unknown link speed appropriately. Date: Tue, 3 Nov 2020 21:36:27 +0100 Message-Id: <20201103203242.741923616@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201103203232.656475008@linuxfoundation.org> References: <20201103203232.656475008@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 c3f04fb319556..01d28ede1fb20 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -6326,6 +6326,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 @@ -6338,7 +6343,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