Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp582230iog; Mon, 13 Jun 2022 08:33:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfvxJZJRWr+8NMa4mrQAkf2XG6LYInElpMuCVHFU4rZXYcOsuiXdw/E21kTiKcGLL2E8ci X-Received: by 2002:a17:906:9b86:b0:6fe:d37f:b29d with SMTP id dd6-20020a1709069b8600b006fed37fb29dmr351848ejc.327.1655134409174; Mon, 13 Jun 2022 08:33:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655134409; cv=none; d=google.com; s=arc-20160816; b=q1x/l1sCN65ykoR7djoP4CUBYKq8ShFHdGAQlp27mZ1WyJiksr72TMmWM7YHNw/BTw IdRgSjVW+fl5DNclzKpT0JBfRjaRCb7uw3wTH64Sl7H+fPrztsJ2UVSJ2J9lbuubfYMm EqRCIta8HJapSTl8CDVeaopCeb/jjAvfPuBxZUK6PraqqpH6aioNDzFaOEMrK/mjYMAv VjRn46JAR7WolqJJjRQcX9hGQNG4ZoJGcTdMXglPPZbtW6Kx+ngeP0dH0WNzO0o+I5cH UIdmBOqb4XANOPTn5eZ69GpvHzjeMJJPvUlEgixj0RFWYB9MFy9bqp4e1mXnqzp4lyST D63Q== 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=grBf1LIsJ/BJma0mSsM2jtfzOF2hLE82Pw4bl/X3XDw=; b=ZGAEfR40MBd7DeW8SnIqkxwLh28e1hX9W1LaVW05J92ebb6comvD4mB8aEQFn1TZDW g7+VVYlbgFmxXRhDzUfRMPJMnT1P5S6jezeXU1v6TBIZl/NIH2CqVwvrNh5ixjPEPO9A cQq611u9SWCvWDh64CLD39FzDFoExfqay16izaHrqQCQSoeeJgpnyVeJf4aqGqg26vMQ Nq679wZpYauvBkFOZVxIcn399CbBJQuL32vkdXYpdTmH4uJkb75rrJsEPh6vjdsqOQP/ gZcG++UlMaU8TW+BBqd0sc9L99xj7y7Aw55XXrLt5RFeL24uoWNRs/2Y+QTDAs+ooB/F vNuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=A4y45ZKV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m9-20020a056402510900b0042b5724a3bcsi9674684edd.21.2022.06.13.08.33.02; Mon, 13 Jun 2022 08:33:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=A4y45ZKV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355725AbiFMLlA (ORCPT + 99 others); Mon, 13 Jun 2022 07:41:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354380AbiFMLcZ (ORCPT ); Mon, 13 Jun 2022 07:32:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAE0CB8A; Mon, 13 Jun 2022 03:47:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 59CD36112A; Mon, 13 Jun 2022 10:47:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 63F01C34114; Mon, 13 Jun 2022 10:47:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655117237; bh=ZvBvAv7kjVo49vs4eozwkRMvE0oHu/7YyhCnQ65kPVE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A4y45ZKV5Nk4m4/Aemz4/TD1TGV1Je7jghublVcLs6sbatnrInp8Bk9csPhVUEoKN 7az8vyAl8GjgpErUScWI4a0dhu2qYrTD6jyXrzMpv4BJ2KfXAckstjI00jCKwwL6jD WLFwdA8GrG3yfHdVAocOs8chT6A1Am9oeR0LnhUI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yu Xiao , Simon Horman , "David S. Miller" , Sasha Levin Subject: [PATCH 5.4 329/411] nfp: only report pause frame configuration for physical device Date: Mon, 13 Jun 2022 12:10:02 +0200 Message-Id: <20220613094938.592298822@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094928.482772422@linuxfoundation.org> References: <20220613094928.482772422@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yu Xiao [ Upstream commit 0649e4d63420ebc8cbebef3e9d39e12ffc5eb9fa ] Only report pause frame configuration for physical device. Logical port of both PCI PF and PCI VF do not support it. Fixes: 9fdc5d85a8fe ("nfp: update ethtool reporting of pauseframe control") Signed-off-by: Yu Xiao Signed-off-by: Simon Horman Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c b/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c index 89e578e25ff8..10857914c552 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c @@ -266,8 +266,6 @@ nfp_net_get_link_ksettings(struct net_device *netdev, /* Init to unknowns */ ethtool_link_ksettings_add_link_mode(cmd, supported, FIBRE); - ethtool_link_ksettings_add_link_mode(cmd, supported, Pause); - ethtool_link_ksettings_add_link_mode(cmd, advertising, Pause); cmd->base.port = PORT_OTHER; cmd->base.speed = SPEED_UNKNOWN; cmd->base.duplex = DUPLEX_UNKNOWN; @@ -275,6 +273,8 @@ nfp_net_get_link_ksettings(struct net_device *netdev, port = nfp_port_from_netdev(netdev); eth_port = nfp_port_get_eth_port(port); if (eth_port) { + ethtool_link_ksettings_add_link_mode(cmd, supported, Pause); + ethtool_link_ksettings_add_link_mode(cmd, advertising, Pause); cmd->base.autoneg = eth_port->aneg != NFP_ANEG_DISABLED ? AUTONEG_ENABLE : AUTONEG_DISABLE; nfp_net_set_fec_link_mode(eth_port, cmd); -- 2.35.1