From patchwork Thu Feb 25 14:38:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 387218 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp364903jap; Thu, 25 Feb 2021 06:40:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJz6f7hRvnlRcnx2owG4PYEm78LbLDMgUnc6e4v3/3xEqhVlUaFX8Z9PP/FyT2IZ/5GHWFhl X-Received: by 2002:a05:6402:b2d:: with SMTP id bo13mr3196736edb.120.1614264007397; Thu, 25 Feb 2021 06:40:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614264007; cv=none; d=google.com; s=arc-20160816; b=sGTQQH5e0miYPFkuefPDAGo8A3hHf2zzyEypOWC/O7W46D/6SrtPYcBjwe6N0RHYSb kbR1T88cWJCEnCiY8F9I8BwmCRHLeLXa3UpWo30lr3n+RCoMKfYWUSTwJNSbkEMV0Dfx fcIF2fB76TnYyVVUG3KpYsIZvH4V/eWcsPR5ru0PqZb7sBFy3QDZiQmicctyc2KU/4UY fJNc13Gu3sewq0R/ceKQ3M0wsLxacb+DLrxtc4o1k9WF+QwiLPmwsWKxQVwMAs0W9g5F HuU/+XD9xApNYg7bfa58KMEpfX3mBB0N0PtBcqBHEsuvD8DkBY+qmRkddRpwvD7iHhPU hzVg== 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=qohU7kPDqeVMP4ZiM0GLvlT3OxWvpRinpytghmNSef0=; b=oRyOUiVL/DZZHOUo1UOJVYGRvRGKatpVtxZpvjNNnK0by7bETOaoZbDvTR8sAV3hxI 6zZLJB0jPuzhD/UVsphd1A+4IEF9wDoXmAZ6v9GfRq8G8zEjJJCLep70e358xOnqRctr CeS0b5gR68r5EvOxzGIqk3zFhMRHAdsQ4J+zwrceBqewW9eluliuHazYkwfvM/eIdCxM W/Rl4N99GsnmczfAig4rsf7mKydw8XlVys3sqNMuf7WCZoLijKnwx/1/lUpM0P2Y9hYP nwkQtPfnDrPOUUsXZiZPXKPlSPB8CxQWrxLCTqC8HxkOtElC2FBuplP3qXQDAw6kfDDB DSug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=h3HE6oYt; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dk7si3543705ejb.570.2021.02.25.06.40.07; Thu, 25 Feb 2021 06:40:07 -0800 (PST) Received-SPF: pass (google.com: domain of netdev-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=k20201202 header.b=h3HE6oYt; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-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 S232139AbhBYOkE (ORCPT + 9 others); Thu, 25 Feb 2021 09:40:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:57886 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229954AbhBYOj5 (ORCPT ); Thu, 25 Feb 2021 09:39:57 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1879364EC3; Thu, 25 Feb 2021 14:39:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614263956; bh=Qq8jqEoh+azun2jK73XZzJMU37OcfRZrN7R9i+zYwUo=; h=From:To:Cc:Subject:Date:From; b=h3HE6oYtJcCq9fIpq9tXgUMqk+xtwGeeqeTOgd3IknWR9r1tzBOqxNbQRqF0xPYZk 3qN2f91McxFiBFDmuoHD34MylKmKZnMJdZO7WO8rFLng53j3722BRJSj6OMAqxSh6x KDWeEpfNL7TkuPjewwrYmpfC+Y2D9xT0iCFoO53FNFtpCJRIWC6X8Mc3fffAO5ixVV 8NDKnia+T5/X1MxPaX/Wo6P1L2qrXsqUzhCbF/I/g8pH82O/fl6FLJ7GHlmCc3tAPZ QiyXC2ccdVo8TyB3tET4f8QAIWGiLXS+LR/rpwyhlnohG3XL5nTPXSKpMcBiwcwiMC 6WzSp/oySZJTw== From: Arnd Bergmann To: Vladimir Oltean , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, "David S. Miller" , Jakub Kicinski Cc: Arnd Bergmann , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] net: mscc: ocelot: select NET_DEVLINK Date: Thu, 25 Feb 2021 15:38:31 +0100 Message-Id: <20210225143910.3964364-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann Without this option, the driver fails to link: ld.lld: error: undefined symbol: devlink_sb_register >>> referenced by ocelot_devlink.c >>> net/ethernet/mscc/ocelot_devlink.o:(ocelot_devlink_sb_register) in archive drivers/built-in.a >>> referenced by ocelot_devlink.c >>> net/ethernet/mscc/ocelot_devlink.o:(ocelot_devlink_sb_register) in archive drivers/built-in.a Fixes: f59fd9cab730 ("net: mscc: ocelot: configure watermarks using devlink-sb") Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/mscc/Kconfig | 1 + 1 file changed, 1 insertion(+) -- 2.29.2 diff --git a/drivers/net/ethernet/mscc/Kconfig b/drivers/net/ethernet/mscc/Kconfig index c0ede0ca7115..05cb040c2677 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 config MSCC_OCELOT_SWITCH_LIB + select NET_DEVLINK select REGMAP_MMIO select PACKING select PHYLIB From patchwork Thu Feb 25 14:38:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 387219 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp365830jap; Thu, 25 Feb 2021 06:41:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJyPT3ta8e03zpTUmtK96rlJXswvqsWirxcooOB3uVfBM9aR/iOKGtLlaE/ynmp12ZCRmi/h X-Received: by 2002:a05:6402:22f3:: with SMTP id dn19mr3285142edb.238.1614264086297; Thu, 25 Feb 2021 06:41:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614264086; cv=none; d=google.com; s=arc-20160816; b=k27AhbM0oAb2BfzQkpR2+vRu4kKhOnEet3e8azrp6qW2CWZJWo/iTOsgKQpVcpTbBD u2wrev532CUlYsr5Np9cIXtvilPG/DHU22/DXlOoWOsmmXxVe2zuRXMLdWBUGddMog3V PG4VrDnWFJNsNRBi5/hAL3oEOnCH4U8tgwr1dy6DPcKF1aoYasFBP4brXd0f+vpYEqYu 5/OEdWw8KOBK+pHI3Xz/NqCMxoQsigN3xDL+MuUEm7GBqH1xDoQxAGfkDKDw+iGFMFE8 LJyy9JBlK3f58OuQcPdUG4Ga+CCVeus8+nIKHFLp99khXrcmISf4rtTDTE5q/WxQl4/T EiFg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=X14KsJdHBaJUQDUSRsb0GEbY90Osu80l0nPE5NyeIbw=; b=YkzWvcYKkmxUMtGIFLP4jV7lsvG18MqA6t1J7SI32L1fbxxw8K0c66HHo7C9vWq+j3 J9Qbv5K0JgM1dGVUKzySFgilIo2QeZ1da8WqXTx6uxFB1EiVqyKveUX3D6/D5E8KzLr0 r+OBZf1zpOu7A0FdS9Qb34Qh3ShcX/IupGn+zIbpdiAuyj69w1IKmf6GFF6REAFCpmmQ ncSwzaOXmYXLro+H+qJi0YVXMMzDFzQramYzbSjJOsXYHj7N7k7iD2Qpa1IzgAA3nE7q S/uOuXmkM6X8SqOs6Jjp0mrEQqvlF68XO3Jz0o69v/V9Jqn9QpRYFVXYLujH0bwlguXX 03uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dlkMMQoA; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id di21si3551551edb.597.2021.02.25.06.41.26; Thu, 25 Feb 2021 06:41:26 -0800 (PST) Received-SPF: pass (google.com: domain of netdev-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=k20201202 header.b=dlkMMQoA; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-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 S232394AbhBYOkY (ORCPT + 9 others); Thu, 25 Feb 2021 09:40:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:57972 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232557AbhBYOkS (ORCPT ); Thu, 25 Feb 2021 09:40:18 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2043064EB7; Thu, 25 Feb 2021 14:39:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614263977; bh=STZDJx0qp9i6/i1NooOs3H6OwuabG+VJzumPODCTw5E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dlkMMQoA8p2tKnGs7/wS/B53kyT6XbPRjaeaJxDr0nBnAdIrFpGNQDzAZkDWnJvA8 lG/0uWNz9ucSJPKx7jKdRJwSlawk18v0IZ3f/TX1WebMYyFWQ+CSMxqzruPDPBKU24 Aw3MMbo3qKXMoReXDCwtshYnUxoN9ZRtLm460K/gVkp+Jn1iIJnq0m2N06V90FZzwJ nBIJ2ie/ap5TMzlCYeKPkwTuVmwRINYy0LJhzy3wMn4HM80/Ppn3BWsBj1AyImvatt E97OvQmuOUte7zPas3z1uFk1O02/KXubHcpByrnAf0Uag1uP4wmRpbiirD9F7Ar3s4 yI4TCAkxyELAg== From: Arnd Bergmann To: Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski Cc: Arnd Bergmann , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] net: dsa: tag_ocelot_8021q: fix driver dependency Date: Thu, 25 Feb 2021 15:38:32 +0100 Message-Id: <20210225143910.3964364-2-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210225143910.3964364-1-arnd@kernel.org> References: <20210225143910.3964364-1-arnd@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann When the ocelot driver code is in a library, the dsa tag code cannot be built-in: ld.lld: error: undefined symbol: ocelot_can_inject >>> referenced by tag_ocelot_8021q.c >>> dsa/tag_ocelot_8021q.o:(ocelot_xmit) in archive net/built-in.a ld.lld: error: undefined symbol: ocelot_port_inject_frame >>> referenced by tag_ocelot_8021q.c >>> dsa/tag_ocelot_8021q.o:(ocelot_xmit) in archive net/built-in.a Building the tag support only really makes sense for compile-testing when the driver is available, so add a Kconfig dependency that prevents the broken configuration while allowing COMPILE_TEST alternative when MSCC_OCELOT_SWITCH_LIB is disabled entirely. This case is handled through the #ifdef check in include/soc/mscc/ocelot.h. Fixes: 0a6f17c6ae21 ("net: dsa: tag_ocelot_8021q: add support for PTP timestamping") Signed-off-by: Arnd Bergmann --- net/dsa/Kconfig | 2 ++ 1 file changed, 2 insertions(+) -- 2.29.2 Acked-by: Vladimir Oltean diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig index 3589224c8da9..58b8fc82cd3c 100644 --- a/net/dsa/Kconfig +++ b/net/dsa/Kconfig @@ -118,6 +118,8 @@ config NET_DSA_TAG_OCELOT config NET_DSA_TAG_OCELOT_8021Q tristate "Tag driver for Ocelot family of switches, using VLAN" + depends on MSCC_OCELOT_SWITCH_LIB || \ + (MSCC_OCELOT_SWITCH_LIB=n && COMPILE_TEST) select NET_DSA_TAG_8021Q help Say Y or M if you want to enable support for tagging frames with a From patchwork Thu Feb 25 14:38:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 387220 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp365848jap; Thu, 25 Feb 2021 06:41:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJwLCNj/xcDpvFC+0XxbDCAS5apJLsDUKrTU+/Bu9JXYXZSfPiDyKUk+5APkci4DM47zSZY3 X-Received: by 2002:a17:906:9bd2:: with SMTP id de18mr3071345ejc.191.1614264087195; Thu, 25 Feb 2021 06:41:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614264087; cv=none; d=google.com; s=arc-20160816; b=qCSRVEprkupiUX2KtlBK2H6JDGpjTGQyRFAi/wJatXIQTwQgI07ZHY37GBcfeWJeRt e+fnvNMVAjLUqqGijyIqdnt/VfYq7J9UAupOkY5AkRQr4IDI2M76AbSwLgkYhWqOnesj 3IUcrccY7lBdkfdOeTe1kFV/oqZcoIkI8KH6XdXS5+3ZkTxak9fGvluGqMFV62ZE3Srg 0OzhZ5+sWIXQ234KUpW4WfNdWo3C7ac5NbQVJycEaJdTDyWLrBCKcC7XgyM7u2fqEvVc CsGQLrU92yNsxPrN5v2v5d8vO8+39+WgYpXYc5ZVBAE0qA0QTve2PW6ce89TZgiT/foT mI1g== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Wp0+TGTGt0iMCBulFQ5XIY2OnK4S8HxlZzELF4TjqxY=; b=UugASUzRPf/pd+QDVHR7ROcmHNlOP1pcE1MmUevHKZnsHlxKOVBT2dx5YBSc0VyVYs 5EUP1yafB4qPXp3+20JHS+q4C3REILKUP+xL8dj3FzTdEpXmuRYKy74hb5810KCXFuEp g4Y4Rhn6bed9GcHsal9g2/dJ6gqeuZyFfxtpnkPqDlKu8Z2Imnn4WCcmzfK43NfizIrz dvJhfAwcr/G2SQcbbavst3O/Y06GOVwMBFMfP/g3HGz5RH8ikV7AKixULiJFWg/0roHZ 0H0KEQILGnkbKiOdvQXNhYVxRwvx9sPGucVxbX/6Ow92qIsRzqP37UhZK+fzl/Nm64W/ UCHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aJ24KEJD; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id di21si3551551edb.597.2021.02.25.06.41.27; Thu, 25 Feb 2021 06:41:27 -0800 (PST) Received-SPF: pass (google.com: domain of netdev-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=k20201202 header.b=aJ24KEJD; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-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 S232767AbhBYOkv (ORCPT + 9 others); Thu, 25 Feb 2021 09:40:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:58116 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232557AbhBYOkm (ORCPT ); Thu, 25 Feb 2021 09:40:42 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 350D164F0C; Thu, 25 Feb 2021 14:39:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614264001; bh=dz3Sbgg/xpmcniXZjEqhsxwzzTzHt6BhgNO7KsulOfg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aJ24KEJDU2rGKJpM8gePQBoRP7Mv8Pe3VKYaNyt9rbqNM9nvLrMQlB6FkIW8tmFCA MXM1hp2x/81XTPWOy2AZA14qDMm3dZQZOYom0Rpep446fX7x766fsbPbCFqvf0e2jn XZNx5t5HoFWnhGpJp14Oez0+LA498NAPkQn4Z6PiMztxj61Dy4qtCVbCCZYKPCc86K cs75pzgmRfK724Uiy7et45+RYn6/cbpmJssTP0yQgXOCNENvCxSX2ZtTcy1D0fM3WI q46BSHHkgSnKzhnNJLyDR06UcuDb5fUyc3hGaRWoAOrwbQYy+6Us7PS/0JacJHqfwe 8rwMo31ByPxuQ== From: Arnd Bergmann To: Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , Linus Walleij , DENG Qingfang Cc: Arnd Bergmann , Landen Chao , Sean Wang , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] net: dsa: mt7530: add GPIOLIB dependency Date: Thu, 25 Feb 2021 15:38:33 +0100 Message-Id: <20210225143910.3964364-3-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210225143910.3964364-1-arnd@kernel.org> References: <20210225143910.3964364-1-arnd@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann The new gpio support may be optional at runtime, but it requires building against gpiolib: ERROR: modpost: "gpiochip_get_data" [drivers/net/dsa/mt7530.ko] undefined! ERROR: modpost: "devm_gpiochip_add_data_with_key" [drivers/net/dsa/mt7530.ko] undefined! Add a Kconfig dependency to enforce this. Fixes: 429a0edeefd8 ("net: dsa: mt7530: MT7530 optional GPIO support") Signed-off-by: Arnd Bergmann --- drivers/net/dsa/Kconfig | 1 + 1 file changed, 1 insertion(+) -- 2.29.2 Reported-by: Arnd Bergmann diff --git a/drivers/net/dsa/Kconfig b/drivers/net/dsa/Kconfig index 3af373e90806..07fc2a732597 100644 --- a/drivers/net/dsa/Kconfig +++ b/drivers/net/dsa/Kconfig @@ -37,6 +37,7 @@ config NET_DSA_LANTIQ_GSWIP config NET_DSA_MT7530 tristate "MediaTek MT753x and MT7621 Ethernet switch support" depends on NET_DSA + depends on GPIOLIB select NET_DSA_TAG_MTK help This enables support for the MediaTek MT7530, MT7531, and MT7621