From patchwork Thu Aug 5 11:00:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 492254 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:396:0:0:0:0 with SMTP id y22csp166341jap; Thu, 5 Aug 2021 04:01:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrhS2TRAD6yVjqYyvKXm2quo5UkyBgHOzyfBVR+RXdmYlLc1BqEGy9+tRqK1shq7OXlDJj X-Received: by 2002:a17:906:5799:: with SMTP id k25mr4219733ejq.110.1628161260352; Thu, 05 Aug 2021 04:01:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628161260; cv=none; d=google.com; s=arc-20160816; b=Wice4UakjhY9Eg0YpLOKpT3h0AqAdmkhYMby703iRVebl/5ys7/ScFY+VnBw6ZQ473 Om6OfaTR+Qd92azGi0k0ISS7lxBFjxVn151q+wUVbWqwSx6XK+xYXsgay6bc+A4Otz7T ra5+9Tsi6yl5c8UoIGctoRXrdnhoUzP5MUKhVu7CUKlu0w/2RzT5Lt6d9bvWJ6CSjPP5 1Evnt9b9IgXnxp7yuv4SdtV3qbiDXgoZhp0TvdLSYuodTLoukNuxQmM6wCAFFBWUyj1k 2j7UHTfr4ff+s5VTtKCBrdPu0DunN9OBHHlKK0J0MJ4ZA/A16HFYldtMjZBNZNma8aC+ cMxA== 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=zYzwPLX71ZB739yleEqU1nmCB3VZ50IvgyfOc/YQzcM=; b=yGqkwP6HoGHhADZwig+HoUiUSXgtZUn3lFdIr/UV5fYmNBRebntPaKBdMOWxai/AN8 1uzQqyrxX+h3zTG0jfEzN7KU6rQKexKLT1Ibv6EEa/NUeE3iLXqdnX8FaLPx37L2ZRP0 atNTsWL95IXDUnAB0ph4IPDB0QCj9fUivroRc+2l5uFNZEibWPNhbd04rKcgVw9IhOh1 7Blcj0vM6IJly45xg7JQJuVjq3zYhDiAp1MTj5WCylRCu86FZb8W2ihBHe83bPYT50x1 9y4a8PXaQeQcel+8lbdA4/ynuI0AjtCIHuDd1n0yX69Mka1UEVa+giRuRg9Fl2SvuQgT LEmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="S/eppfAb"; 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 jr1si4989710ejb.574.2021.08.05.04.00.59; Thu, 05 Aug 2021 04:01:00 -0700 (PDT) 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="S/eppfAb"; 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 S240672AbhHELBI (ORCPT + 8 others); Thu, 5 Aug 2021 07:01:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:53450 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234312AbhHELBH (ORCPT ); Thu, 5 Aug 2021 07:01:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DDAFC61102; Thu, 5 Aug 2021 11:00:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628161253; bh=yH8H68IN0uHhEueXzY2e7BwneC0HdJ9wrBTXuosSek8=; h=From:To:Cc:Subject:Date:From; b=S/eppfAb1ZyhU/hZSNTRkgxhXy32G++cHHA3tWAw/DTKW4F8w8JgmONIXqj9KBd7F lC19RqX8JJLPmnMqtGIZYvd7Wn7qL6RqVzS6oYApWF9Vz1kx1v8DE+cy2KP9kwCA0Z vObDPpEbi1eH80fkzOh6a1Gxc/HYDV7B0WW53t9elZYmVX5QBmo4la7lNVIQXWEFAB oaYjEFGT32DweGO+4YzixJQ/l6KPlVxBpyfNMcY83Iqy/a0JbG/9s7AmJhP8Ac2t1E J99gsXAklsWPpOWcyeYDS9/guQzlCCYsu7bsPBipXcpPGGR/n7W6FMWBgfhMTWnmLF Dg0Mae3taVmyg== From: Arnd Bergmann To: Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski Cc: Arnd Bergmann , Oleksij Rempel , Yangbo Lu , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next] dsa: sja1105: fix reverse dependency Date: Thu, 5 Aug 2021 13:00:28 +0200 Message-Id: <20210805110048.1696362-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 The DSA driver and the tag driver for sja1105 are closely linked, and recently the dependency started becoming visible in the form of the sja1110_process_meta_tstamp() that gets exported by one and used by the other. This causes a rare build failure with CONFIG_NET_DSA_TAG_SJA1105=y and CONFIG_NET_DSA_SJA1105=m, as the 'select' statement only prevents the opposite configuration: aarch64-linux-ld: net/dsa/tag_sja1105.o: in function `sja1110_rcv': tag_sja1105.c:(.text.sja1110_rcv+0x164): undefined reference to `sja1110_process_meta_tstamp' Add a stricter dependency for the CONFIG_NET_DSA_TAG_SJA110y to prevent it from being built-in when the other one is not. Fixes: 566b18c8b752 ("net: dsa: sja1105: implement TX timestamping for SJA1110") Fixes: 227d07a07ef1 ("net: dsa: sja1105: Add support for traffic through standalone ports") Signed-off-by: Arnd Bergmann --- Not sure if there is a more logical way to deal with this, but the added dependency does help avoid the build failure. I found this one while verifying the PTP dependency patch, but it's really a separate issue. --- net/dsa/Kconfig | 1 + 1 file changed, 1 insertion(+) -- 2.29.2 diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig index bca1b5d66df2..548285539752 100644 --- a/net/dsa/Kconfig +++ b/net/dsa/Kconfig @@ -138,6 +138,7 @@ config NET_DSA_TAG_LAN9303 config NET_DSA_TAG_SJA1105 tristate "Tag driver for NXP SJA1105 switches" + depends on NET_DSA_SJA1105 || !NET_DSA_SJA1105 select PACKING help Say Y or M if you want to enable support for tagging frames with the