From patchwork Wed Mar 29 01:30:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 13191821 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 15890C76196 for ; Wed, 29 Mar 2023 01:30:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229780AbjC2Bag (ORCPT ); Tue, 28 Mar 2023 21:30:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbjC2Baf (ORCPT ); Tue, 28 Mar 2023 21:30:35 -0400 Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85C0210CE for ; Tue, 28 Mar 2023 18:30:34 -0700 (PDT) Received: by mail-qv1-xf29.google.com with SMTP id 59so10557254qva.11 for ; Tue, 28 Mar 2023 18:30:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1680053433; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=GPZ4DRLXgCe2fCIsUnM5NKh52x4WNSwBcSVU2f5xzr4=; b=KCdX7aKs9Cu4W3XoOzVJw/yb3NgyTMgFPOonjnXVM5wdq4rPrHAOW3k0IbLzcDq9c4 MmXShwVDpL1zcS2wGdSpV69M0xuJ/WWCU5YJqg5ayRoGA8rFeHQfm7NyJVZdF5gNZNDF eXsxpsdE8lwyos0gHjYvKIDWptz3CTihRO804= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680053433; 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=GPZ4DRLXgCe2fCIsUnM5NKh52x4WNSwBcSVU2f5xzr4=; b=BxAp9fzFMHOUHwDRKFio2S4u0YidyLdfJ3hI3kfU4v9U0yarQJOHERrIDo+lBbU4+w ZVE3ALmXxtLtsijPsk6vrHROAFAx9ExneH4R10/qHHVFq2J6n4N1Sfj4u9JVqVmnd2Dj 1iEzLEk+EBYNVXoZhqKlH52JWzLdu/NY8rBhQVb64SqQf5wE4bC5hp8v7j9yXqGSjpe9 cfBCyJ1iLpYW3kekdkqArCh9epIxBkCRp5/APGTUJNNDVRIM3WZ0E9N3IILWjp3lH27A ovsA0sCvqnZ8gJh83RQOZPfBkf4RlQvkAueAhxu1ZNZQA+IOXDBDZF5AWGNDyYZJdiaU 4nbQ== X-Gm-Message-State: AAQBX9ep42/494sK2iwvaFCr92ej40Uv3O71tDI0UD+1S7V/X1QPNASs oVbUjniAc/azMa93XbVS5zYyHQ== X-Google-Smtp-Source: AKy350bz4R2euXD7wwBqM625ksg0PibzhAdDYyyo5MaOuQcIUkK/Mp69OogaSJcTO4vBSiYA4i7J7w== X-Received: by 2002:a05:6214:c6e:b0:5c2:a8b0:d71a with SMTP id t14-20020a0562140c6e00b005c2a8b0d71amr27809353qvj.43.1680053433478; Tue, 28 Mar 2023 18:30:33 -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.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Mar 2023 18:30:32 -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, Kalesh AP , Pavan Chebbi , Somnath Kotur Subject: [PATCH net 1/3] bnxt_en: Fix reporting of test result in ethtool selftest Date: Tue, 28 Mar 2023 18:30:19 -0700 Message-Id: <20230329013021.5205-2-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 From: Kalesh AP When the selftest command fails, driver is not reporting the failure by updating the "test->flags" when bnxt_close_nic() fails. Fixes: eb51365846bc ("bnxt_en: Add basic ethtool -t selftest support.") Reviewed-by: Pavan Chebbi Reviewed-by: Somnath Kotur Signed-off-by: Kalesh AP Signed-off-by: Michael Chan Reviewed-by: Simon Horman --- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c index ec573127b707..7658a06b8d05 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c @@ -3738,6 +3738,7 @@ static void bnxt_self_test(struct net_device *dev, struct ethtool_test *etest, bnxt_ulp_stop(bp); rc = bnxt_close_nic(bp, true, false); if (rc) { + etest->flags |= ETH_TEST_FL_FAILED; bnxt_ulp_start(bp, rc); return; } From patchwork Wed Mar 29 01:30:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 13191822 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 0B435C761AF for ; Wed, 29 Mar 2023 01:30:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229484AbjC2Bai (ORCPT ); Tue, 28 Mar 2023 21:30:38 -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 S229786AbjC2Bah (ORCPT ); Tue, 28 Mar 2023 21:30:37 -0400 Received: from mail-qv1-xf2c.google.com (mail-qv1-xf2c.google.com [IPv6:2607:f8b0:4864:20::f2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E38D2700 for ; Tue, 28 Mar 2023 18:30:36 -0700 (PDT) Received: by mail-qv1-xf2c.google.com with SMTP id x8so10585551qvr.9 for ; Tue, 28 Mar 2023 18:30:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1680053435; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=6DhcSilinZ1LtTGTCjdzprrAJKc/11NK/YGuLnTWbMU=; b=bOew8CLjV269QsAeSefvznnMUs7wwaZ/lfDrFZ2SUNGID0LjjEunhpPaNjg43WTyBf IVCjPbNWF9yS8Zfk+WqjPEoMmFa2xjbkkg0ikKYVOxw5EgMApCcHXGYMaej/e7SOK6Vg O06O0Rm33Vp48ap45ocmguT34WzK6Pw2DR8Cw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680053435; 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=6DhcSilinZ1LtTGTCjdzprrAJKc/11NK/YGuLnTWbMU=; b=BPOeL/9xjSGCwfMZfqKxARYwb7WJBsnEkiUJvPnlf1p1V37B95QzV0OY7y1Xig2zAO 62rSDhBWwsCKBe9vziARX8sm/mR5Nu+zKLAjOhhkAe+LiLOVieCqkvkkgsxv5PN0kqFk 4qPzlZ0hSTXEDjxJYJk9T2uCgUGHdSp0OB9HxBYMGoCO61veYeaCHTjRf4U/tGwi0aoW vdrxj1eohaLGMx5/nElxxvQZnnki4s4nktfoh8Yh5BkvddIot69z0D7PFg+KHUBam08e g/Uj53RxO5Sy5k5ERgVKy7Pr1uIA/6YOtuEzvsos+tpJj9dCScAUGBFXOSoEU0lnQ4d7 63Ew== X-Gm-Message-State: AAQBX9dWg/nToKAlzHrYC1c9dQvjmSvUb5uAG3H32fyfVqCBBEJSfCzq P/2eAcXmkJ9tV665/dw6aJSL9TbtpfVHdRpSoSY= X-Google-Smtp-Source: AKy350YnfAAULKZOPMG0lxdKBxcUOAGWzX/aS8IjZj/PKLw9ZGO09GB8/vZfqXu+cyZDQYFJe/iueg== X-Received: by 2002:ad4:5c4c:0:b0:5b2:fb2:4b1d with SMTP id a12-20020ad45c4c000000b005b20fb24b1dmr30893912qva.12.1680053434974; Tue, 28 Mar 2023 18:30:34 -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.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Mar 2023 18:30:34 -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, Kalesh AP , Pavan Chebbi Subject: [PATCH net 2/3] bnxt_en: Fix typo in PCI id to device description string mapping Date: Tue, 28 Mar 2023 18:30:20 -0700 Message-Id: <20230329013021.5205-3-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 From: Kalesh AP Fix 57502 and 57508 NPAR description string entries. The typos caused these devices to not match up with lspci output. Fixes: 49c98421e6ab ("bnxt_en: Add PCI IDs for 57500 series NPAR devices.") Reviewed-by: Pavan Chebbi Signed-off-by: Kalesh AP Signed-off-by: Michael Chan Reviewed-by: Simon Horman --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index e2e2c986c82b..c23e3b397bcf 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -175,12 +175,12 @@ static const struct pci_device_id bnxt_pci_tbl[] = { { PCI_VDEVICE(BROADCOM, 0x1750), .driver_data = BCM57508 }, { PCI_VDEVICE(BROADCOM, 0x1751), .driver_data = BCM57504 }, { PCI_VDEVICE(BROADCOM, 0x1752), .driver_data = BCM57502 }, - { PCI_VDEVICE(BROADCOM, 0x1800), .driver_data = BCM57508_NPAR }, + { PCI_VDEVICE(BROADCOM, 0x1800), .driver_data = BCM57502_NPAR }, { PCI_VDEVICE(BROADCOM, 0x1801), .driver_data = BCM57504_NPAR }, - { PCI_VDEVICE(BROADCOM, 0x1802), .driver_data = BCM57502_NPAR }, - { PCI_VDEVICE(BROADCOM, 0x1803), .driver_data = BCM57508_NPAR }, + { PCI_VDEVICE(BROADCOM, 0x1802), .driver_data = BCM57508_NPAR }, + { PCI_VDEVICE(BROADCOM, 0x1803), .driver_data = BCM57502_NPAR }, { PCI_VDEVICE(BROADCOM, 0x1804), .driver_data = BCM57504_NPAR }, - { PCI_VDEVICE(BROADCOM, 0x1805), .driver_data = BCM57502_NPAR }, + { PCI_VDEVICE(BROADCOM, 0x1805), .driver_data = BCM57508_NPAR }, { PCI_VDEVICE(BROADCOM, 0xd802), .driver_data = BCM58802 }, { PCI_VDEVICE(BROADCOM, 0xd804), .driver_data = BCM58804 }, #ifdef CONFIG_BNXT_SRIOV 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; }