Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp444773pxb; Thu, 25 Feb 2021 06:43:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/YdNPXLV/M347dwag4FtCqYUzqmd8S/6X7EOxok0WBjPfn7e68oPIxTyOlOjcfLP1JCuK X-Received: by 2002:a17:906:4e57:: with SMTP id g23mr2912809ejw.47.1614264191192; Thu, 25 Feb 2021 06:43:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614264191; cv=none; d=google.com; s=arc-20160816; b=bBEgayEAzL29L9BnNrhwURFfh5EGn1l9PD0j9zeHoUTRT+irkibp6cL5Q5cAEVGkSq xDsjxmjqth3BnWpaln/ZuO1aTklt8ppH0GCv2Tt0t9BOnhgXwWhtwx8zb8vPjkAVLD9O vQlGOdzhqUN8MD52SycXV31zQsNgW/6UqJNIAFuhT/W20ELs2jNcvqNiYInTJV8gNW8A pzy/+BFD4VNqMkxp9y8dH8EwP7N0mR6fyIbbW1XKOXndz4sJZod1czRglCbq6kceVLjX CZAdOPBAl/1gnwHAlvu7iFiVUMQGbtZKvBtx2iCDHiBMPelnj2g4JMv7l0I+ZUFMXyUd BtfA== 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=cxsL1/w+fxvlgNHZDqzKac5z8zIbMrLYBKyd/dt6CgtjnA0Qdi60NjRG4/gNu58SmO gd2Got8ZzBi3VdtJbx2wKIIw/o7fpDQEXvEKDWpI+OypP4fU7R/Wuco8TGPxp81uDTNZ CyRDMOQlcC6df9iXoQb9/fmFhJ4ynUUodwzwLTbvLbvesnXAZNyKoz3CmxMwQvCZdFEF SSodxTQKCfW3Py1deAuiS4IiGdU8UHJH8D7WItgbtUe1Fneov05l/zch8lUKsoGmzvUs LrXPOMZo71hGjZ0uRF2Eosc2+Ey7Jzs6oDgij3LB8l7zJi0yr7vLNGC+zHtKiSfQnbyl uQ4A== 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 linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 qw16si910428ejb.673.2021.02.25.06.42.47; Thu, 25 Feb 2021 06:43:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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 linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S229954AbhBYOkW (ORCPT + 99 others); Thu, 25 Feb 2021 09:40:22 -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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(+) 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 -- 2.29.2