Netdev Archive on
help / color / mirror / Atom feed
From: Arnd Bergmann <>
To: Andrew Lunn <>,
	Vivien Didelot <>,
	Florian Fainelli <>,
	Vladimir Oltean <>,
	"David S. Miller" <>,
	Jakub Kicinski <>
Cc: Arnd Bergmann <>,
	Oleksij Rempel <>,
	Yangbo Lu <>,,
Subject: [PATCH net-next] dsa: sja1105: fix reverse dependency
Date: Thu,  5 Aug 2021 13:00:28 +0200	[thread overview]
Message-ID: <> (raw)

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(+)

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
 	  Say Y or M if you want to enable support for tagging frames with the

             reply	other threads:[~2021-08-05 11:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-05 11:00 Arnd Bergmann [this message]
2021-08-05 11:25 ` Vladimir Oltean
2021-08-05 11:39   ` Arnd Bergmann
2021-08-05 11:49     ` Vladimir Oltean
2021-08-05 12:05       ` Arnd Bergmann
2021-08-05 12:17     ` Vladimir Oltean
2021-08-05 12:22       ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH net-next] dsa: sja1105: fix reverse dependency' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).