Netdev List
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Kurt Kanzenbach <kurt@linutronix.de>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, Randy Dunlap <rdunlap@infradead.org>,
	Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH net-next] net: dsa: hellcreek: Add missing TAPRIO dependency
Date: Thu, 28 Jan 2021 18:37:24 +0200	[thread overview]
Message-ID: <20210128163724.q7d2j57phwbmbh7w@skbuf> (raw)
In-Reply-To: <20210128163338.22665-1-kurt@linutronix.de>

On Thu, Jan 28, 2021 at 05:33:38PM +0100, Kurt Kanzenbach wrote:
> Add missing dependency to TAPRIO to avoid build failures such as:
>
> |ERROR: modpost: "taprio_offload_get" [drivers/net/dsa/hirschmann/hellcreek_sw.ko] undefined!
> |ERROR: modpost: "taprio_offload_free" [drivers/net/dsa/hirschmann/hellcreek_sw.ko] undefined!
>
> Fixes: 24dfc6eb39b2 ("net: dsa: hellcreek: Add TAPRIO offloading support")
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
> ---
>  drivers/net/dsa/hirschmann/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> Note: It's not against net, because the fixed commit is not in net tree, yet.
>
> diff --git a/drivers/net/dsa/hirschmann/Kconfig b/drivers/net/dsa/hirschmann/Kconfig
> index e01191107a4b..9ea2c643f8f8 100644
> --- a/drivers/net/dsa/hirschmann/Kconfig
> +++ b/drivers/net/dsa/hirschmann/Kconfig
> @@ -5,6 +5,7 @@ config NET_DSA_HIRSCHMANN_HELLCREEK
>  	depends on NET_DSA
>  	depends on PTP_1588_CLOCK
>  	depends on LEDS_CLASS
> +	depends on NET_SCH_TAPRIO
>  	select NET_DSA_TAG_HELLCREEK
>  	help
>  	  This driver adds support for Hirschmann Hellcreek TSN switches.
> --
> 2.20.1
>

Note that for sja1105, Arnd solved it this way. I am still not sure why.

commit 5d294fc483405de9c0913ab744a31e6fa7cb0f40
Author: Arnd Bergmann <arnd@arndb.de>
Date:   Fri Oct 25 09:26:35 2019 +0200

    net: dsa: sja1105: improve NET_DSA_SJA1105_TAS dependency

    An earlier bugfix introduced a dependency on CONFIG_NET_SCH_TAPRIO,
    but this missed the case of NET_SCH_TAPRIO=m and NET_DSA_SJA1105=y,
    which still causes a link error:

    drivers/net/dsa/sja1105/sja1105_tas.o: In function `sja1105_setup_tc_taprio':
    sja1105_tas.c:(.text+0x5c): undefined reference to `taprio_offload_free'
    sja1105_tas.c:(.text+0x3b4): undefined reference to `taprio_offload_get'
    drivers/net/dsa/sja1105/sja1105_tas.o: In function `sja1105_tas_teardown':
    sja1105_tas.c:(.text+0x6ec): undefined reference to `taprio_offload_free'

    Change the dependency to only allow selecting the TAS code when it
    can link against the taprio code.

    Fixes: a8d570de0cc6 ("net: dsa: sja1105: Add dependency for NET_DSA_SJA1105_TAS")
    Fixes: 317ab5b86c8e ("net: dsa: sja1105: Configure the Time-Aware Scheduler via tc-taprio offload")
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: David S. Miller <davem@davemloft.net>

diff --git a/drivers/net/dsa/sja1105/Kconfig b/drivers/net/dsa/sja1105/Kconfig
index f40b248f0b23..ffac0ea4e8d5 100644
--- a/drivers/net/dsa/sja1105/Kconfig
+++ b/drivers/net/dsa/sja1105/Kconfig
@@ -26,8 +26,8 @@ config NET_DSA_SJA1105_PTP

 config NET_DSA_SJA1105_TAS
        bool "Support for the Time-Aware Scheduler on NXP SJA1105"
-       depends on NET_DSA_SJA1105
-       depends on NET_SCH_TAPRIO
+       depends on NET_DSA_SJA1105 && NET_SCH_TAPRIO
+       depends on NET_SCH_TAPRIO=y || NET_DSA_SJA1105=m
        help
          This enables support for the TTEthernet-based egress scheduling
          engine in the SJA1105 DSA driver, which is controlled using a

  reply	other threads:[~2021-01-28 16:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-28 16:33 [PATCH net-next] net: dsa: hellcreek: Add missing TAPRIO dependency Kurt Kanzenbach
2021-01-28 16:37 ` Vladimir Oltean [this message]
2021-01-28 17:02   ` Arnd Bergmann
2021-01-28 20:00 ` Randy Dunlap
     [not found]   ` <87im7frf8p.fsf@kurt>
2021-01-29 16:41     ` Randy Dunlap
2021-01-30  5:04   ` Jakub Kicinski
2021-01-30  5:10 ` patchwork-bot+netdevbpf

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20210128163724.q7d2j57phwbmbh7w@skbuf \
    --to=olteanv@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=kurt@linutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=vivien.didelot@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox