From patchwork Thu Jan 26 16:36:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 48796 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp367655wrn; Thu, 26 Jan 2023 08:38:42 -0800 (PST) X-Google-Smtp-Source: AMrXdXt592rZLf29kj72aMUhC3wPTkyImq7FzcVGo3IiEEb38WqXXrCfi5poBSAG93+Lh1ytPhdV X-Received: by 2002:a17:907:6746:b0:84d:1c67:97d7 with SMTP id qm6-20020a170907674600b0084d1c6797d7mr45187056ejc.30.1674751121918; Thu, 26 Jan 2023 08:38:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674751121; cv=none; d=google.com; s=arc-20160816; b=gD9Shw+dY1gzXKQevnIwKe3VDuRwSHlWVZCxNCnP9ZDuX5ooqvEfOXNENPm7iXbR8q LgD0pWyY6lDwzwqwIm/BxnFm5/f8dlWI/K1NIkBQbEOP+Dk5rtY0HlDvVPYkOSKctqo+ cGY5VKJ6TtD81uYi+EOjOXaJFw0PlkxLtcrN9ESwnKbQVc67a7JXI1NBLunzFE6AczOY oz0mySyb/kYUZc5fKAtet7wWCCuujD3xMt0fRMvPd5cYw1F4t2OMMv7OOnePAtbw3CPw AYQaYDd9Pivm8ztKMm+TTlj6G/lA48iCGcVGFsgvwuAZ1cxkzxFozmWw7j66WS8+9tTV lSyQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=Pomv4vBn3GaLz+4yJTUsLT1ipUem19VZVSIQYNwari8=; b=LAIAjqyNbXaVLDh3BmR9rftooQmfR7Jlk/7/3KtMaFqjEz/K1SkUbskNK4eE4Oqzvb Oz2YrEIcCesUvxqf9wxufoKt+Zc9VjQAsL4k3j+XWty+TGrIMyp9dnbd052CptTLrYP3 vts3eRY5bK+v+PADTNF1GH9EMH2pPfn3n6XL9stLQ2/BcKeJOVK1gdUs9fVsGL53aNJi c9Yr80zkarZhYJg+rltsUXMozYEsx8oFh2tEUtJNlEPzRDzzIyG2tKim1YBollPCO7oj KDKx9nY5ze+qtXQ+kbe99MSi5bHGwHzt4xXWLz8OvEmKWeMkFy9FEItdub/8qFvcCC+2 1PZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DEv1NX1v; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fw36-20020a170907502400b0087859f7be43si1661814ejc.60.2023.01.26.08.38.18; Thu, 26 Jan 2023 08:38:41 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=DEv1NX1v; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231754AbjAZQhH (ORCPT + 99 others); Thu, 26 Jan 2023 11:37:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231485AbjAZQhC (ORCPT ); Thu, 26 Jan 2023 11:37:02 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D27363EC44; Thu, 26 Jan 2023 08:36:53 -0800 (PST) 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 6C644618B9; Thu, 26 Jan 2023 16:36:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0CBA2C4339B; Thu, 26 Jan 2023 16:36:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674751012; bh=Zc6e+eUqfPJO+05OsGiTtY0oTOxGFgAZIR3Yj5hlt0k=; h=From:To:Cc:Subject:Date:From; b=DEv1NX1vOiHrGyYE5IuvIc04fn6o0YlfYw0nAtVYJIQ9KeS8yzOUWq/+kLv1Dr0/2 t41gs0f0I8lNhQvThbzWggkY2wC8fv2UB0J+S3kSGplRk4DOe3KAiqQGqP1kyKjMEA dO1/LR0zCpVA6sIxgL8D53V+NH8NQmC0iNAMcJKBsCVoUb5eI1IsT5IFAlt0sGhkMY HEpu7ijgVmD8xBb4ga+2RBn2QfhfE8KkSizsnGptncBrIuAiJe8GTmGR/jB/7aJ2Ju PZGcSpesBH36VkOJn0LE+sG9y2/6kSFtBfw8wpDSGzBxxE4zAmW8IgrDOUMtnp1uJS lXAxjJlqvjufQ== From: Arnd Bergmann To: Vladimir Oltean Cc: Arnd Bergmann , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: mscc: ocelot: add ETHTOOL_NETLINK dependency Date: Thu, 26 Jan 2023 17:36:36 +0100 Message-Id: <20230126163647.3554883-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756103832064783655?= X-GMAIL-MSGID: =?utf-8?q?1756103832064783655?= From: Arnd Bergmann The driver now directly calls into ethtool code, which fails if ethtool is disabled: arm-linux-gnueabi-ld: drivers/net/ethernet/mscc/ocelot_stats.o: in function `ocelot_port_get_pause_stats': ocelot_stats.c:(.text+0xe54): undefined reference to `ethtool_aggregate_pause_stats' arm-linux-gnueabi-ld: drivers/net/ethernet/mscc/ocelot_stats.o: in function `ocelot_port_get_rmon_stats': ocelot_stats.c:(.text+0x1090): undefined reference to `ethtool_aggregate_rmon_stats' arm-linux-gnueabi-ld: drivers/net/ethernet/mscc/ocelot_stats.o: in function `ocelot_port_get_eth_ctrl_stats': ocelot_stats.c:(.text+0x1228): undefined reference to `ethtool_aggregate_ctrl_stats' arm-linux-gnueabi-ld: drivers/net/ethernet/mscc/ocelot_stats.o: in function `ocelot_port_get_eth_mac_stats': ocelot_stats.c:(.text+0x13a8): undefined reference to `ethtool_aggregate_mac_stats' arm-linux-gnueabi-ld: drivers/net/ethernet/mscc/ocelot_stats.o: in function `ocelot_port_get_eth_phy_stats': ocelot_stats.c:(.text+0x1540): undefined reference to `ethtool_aggregate_phy_stats' Add a dependency on ETHTOOL_NETLINK, since that controls the compilation of the ethtool stats code. It would probably be possible to have a more fine-grained symbol there, but in practice this is already required. Fixes: 6505b6805655 ("net: mscc: ocelot: add MAC Merge layer support for VSC9959") Signed-off-by: Arnd Bergmann --- drivers/net/dsa/ocelot/Kconfig | 2 ++ drivers/net/ethernet/mscc/Kconfig | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/net/dsa/ocelot/Kconfig b/drivers/net/dsa/ocelot/Kconfig index 08db9cf76818..9b0624a1837e 100644 --- a/drivers/net/dsa/ocelot/Kconfig +++ b/drivers/net/dsa/ocelot/Kconfig @@ -7,6 +7,7 @@ config NET_DSA_MSCC_FELIX depends on HAS_IOMEM depends on PTP_1588_CLOCK_OPTIONAL depends on NET_SCH_TAPRIO || NET_SCH_TAPRIO=n + depends on ETHTOOL_NETLINK select MSCC_OCELOT_SWITCH_LIB select NET_DSA_TAG_OCELOT_8021Q select NET_DSA_TAG_OCELOT @@ -22,6 +23,7 @@ config NET_DSA_MSCC_SEVILLE depends on NET_VENDOR_MICROSEMI depends on HAS_IOMEM depends on PTP_1588_CLOCK_OPTIONAL + depends on ETHTOOL_NETLINK select MDIO_MSCC_MIIM select MSCC_OCELOT_SWITCH_LIB select NET_DSA_TAG_OCELOT_8021Q diff --git a/drivers/net/ethernet/mscc/Kconfig b/drivers/net/ethernet/mscc/Kconfig index 8dd8c7f425d2..8b1a145971b2 100644 --- a/drivers/net/ethernet/mscc/Kconfig +++ b/drivers/net/ethernet/mscc/Kconfig @@ -13,6 +13,7 @@ if NET_VENDOR_MICROSEMI # Users should depend on NET_SWITCHDEV, HAS_IOMEM, BRIDGE config MSCC_OCELOT_SWITCH_LIB + depends on ETHTOOL_NETLINK select NET_DEVLINK select REGMAP_MMIO select PACKING @@ -25,6 +26,7 @@ config MSCC_OCELOT_SWITCH_LIB config MSCC_OCELOT_SWITCH tristate "Ocelot switch driver" depends on PTP_1588_CLOCK_OPTIONAL + depends on ETHTOOL_NETLINK depends on BRIDGE || BRIDGE=n depends on NET_SWITCHDEV depends on HAS_IOMEM