From patchwork Wed Mar 29 01:30:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 13191823 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA8ADC6FD18 for ; Wed, 29 Mar 2023 01:30:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229811AbjC2Ban (ORCPT ); Tue, 28 Mar 2023 21:30:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229795AbjC2Bai (ORCPT ); Tue, 28 Mar 2023 21:30:38 -0400 Received: from mail-qv1-xf31.google.com (mail-qv1-xf31.google.com [IPv6:2607:f8b0:4864:20::f31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A86730E4 for ; Tue, 28 Mar 2023 18:30:37 -0700 (PDT) Received: by mail-qv1-xf31.google.com with SMTP id cu4so10662070qvb.3 for ; Tue, 28 Mar 2023 18:30:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1680053436; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=LSOTsNA8s0zEJ5lw3OWTgtb5+NHpCMHUdkdh0kFhv0Q=; b=Lx+RAN5wkmqD6z5lcbacFAas/2lrn78a69l69AFkVYsOPSBCYht+2lAmBhQOAx24XM Mz5qNrK3UG1t/+0NGTYk+BNJmHJ4SbrsCUMW5VHUFpOUIUWrbF5sn6bRA+jj9aKqYrGo h1NyAeH3GPUIEdRhtyGPP3LUqcDei6AgSFYKI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680053436; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LSOTsNA8s0zEJ5lw3OWTgtb5+NHpCMHUdkdh0kFhv0Q=; b=l2RgJLbY9Y9f12LaL8kZHXy1GUYCrYwki2tByUXUYP1b2YCN1FXSP0K8acsQ9dHEIF kTOlB4EPMB3+3VlXBXQNEW6NZxvP/r1QU7OMlZ6ZkW5thgtcJQ28yxI6PBIh4I5aAyqB NY6rqmJD3k4UWHnamjSjciY38Sx0vZrhnQE4o57wTUeao1qBF6b2kHdE5uXyfiF2yzNd 0KUYthC9YmnExH2HAGYGHafZfm+aW2WKqw68jzBgyPQpjTUceo1FGjfpoLFAcCYFMiW7 uaH4Ike6SKD41R/nfXnBWVQetrBKkG7CJxjnTUptULvmbXHw8ev6ENo3cEIDa/6ClelK FTWQ== X-Gm-Message-State: AAQBX9furI548NAjSCDhTW7VbRaVWmYoOno+qf+keo/BcawvyVX4lKMx cqWkXC71xTAAvLMX86KylT6PCw== X-Google-Smtp-Source: AKy350ZZlHodklbVr5dQZtoIGsNF3Bf9oBiGXwQmzVPxSYiiwp8KAYkmFlVcicuQICPqccQk+gwAHw== X-Received: by 2002:a05:6214:402:b0:56e:a88f:70ef with SMTP id z2-20020a056214040200b0056ea88f70efmr34709149qvx.23.1680053436248; Tue, 28 Mar 2023 18:30:36 -0700 (PDT) Received: from lvnvda1597.lvn.broadcom.net ([192.19.161.250]) by smtp.gmail.com with ESMTPSA id l15-20020ad4408f000000b005dd8b9345b0sm4223402qvp.72.2023.03.28.18.30.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Mar 2023 18:30:35 -0700 (PDT) From: Michael Chan To: davem@davemloft.net Cc: netdev@vger.kernel.org, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, gospo@broadcom.com Subject: [PATCH net 3/3] bnxt_en: Add missing 200G link speed reporting Date: Tue, 28 Mar 2023 18:30:21 -0700 Message-Id: <20230329013021.5205-4-michael.chan@broadcom.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230329013021.5205-1-michael.chan@broadcom.com> References: <20230329013021.5205-1-michael.chan@broadcom.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org bnxt_fw_to_ethtool_speed() is missing the case statement for 200G link speed reported by firmware. As a result, ethtool will report unknown speed when the firmware reports 200G link speed. Fixes: 532262ba3b84 ("bnxt_en: ethtool: support PAM4 link speeds up to 200G") Signed-off-by: Michael Chan Reviewed-by: Simon Horman --- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 + drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.h b/drivers/net/ethernet/broadcom/bnxt/bnxt.h index c0628ac1b798..5928430f6f51 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.h +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.h @@ -1226,6 +1226,7 @@ struct bnxt_link_info { #define BNXT_LINK_SPEED_40GB PORT_PHY_QCFG_RESP_LINK_SPEED_40GB #define BNXT_LINK_SPEED_50GB PORT_PHY_QCFG_RESP_LINK_SPEED_50GB #define BNXT_LINK_SPEED_100GB PORT_PHY_QCFG_RESP_LINK_SPEED_100GB +#define BNXT_LINK_SPEED_200GB PORT_PHY_QCFG_RESP_LINK_SPEED_200GB u16 support_speeds; u16 support_pam4_speeds; u16 auto_link_speeds; /* fw adv setting */ diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c index 7658a06b8d05..6bd18eb5137f 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c @@ -1714,6 +1714,8 @@ u32 bnxt_fw_to_ethtool_speed(u16 fw_link_speed) return SPEED_50000; case BNXT_LINK_SPEED_100GB: return SPEED_100000; + case BNXT_LINK_SPEED_200GB: + return SPEED_200000; default: return SPEED_UNKNOWN; }