Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH net-next] net: dsa: tag_sja1105: optionally build as module when switch driver is module if PTP is enabled
@ 2021-08-05 11:36 Vladimir Oltean
2021-08-05 12:40 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Oltean @ 2021-08-05 11:36 UTC (permalink / raw)
To: netdev, Jakub Kicinski, David S. Miller
Cc: Andrew Lunn, Florian Fainelli, Vivien Didelot, Arnd Bergmann
TX timestamps are sent by SJA1110 as Ethernet packets containing
metadata, so they are received by the tagging driver but must be
processed by the switch driver - the one that is stateful since it
keeps the TX timestamp queue.
This means that there is an sja1110_process_meta_tstamp() symbol
exported by the switch driver which is called by the tagging driver.
There is a shim definition for that function when the switch driver is
not compiled, which does nothing, but that shim is not effective when
the tagging protocol driver is built-in and the switch driver is a
module, because built-in code cannot call symbols exported by modules.
So add an optional dependency between the tagger and the switch driver,
if PTP support is enabled in the switch driver. If PTP is not enabled,
sja1110_process_meta_tstamp() will translate into the shim "do nothing
with these meta frames" function.
Fixes: 566b18c8b752 ("net: dsa: sja1105: implement TX timestamping for SJA1110")
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
net/dsa/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig
index bca1b5d66df2..970906eb5b2c 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_PTP) || !NET_DSA_SJA1105 || !NET_DSA_SJA1105_PTP
select PACKING
help
Say Y or M if you want to enable support for tagging frames with the
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: dsa: tag_sja1105: optionally build as module when switch driver is module if PTP is enabled
2021-08-05 11:36 [PATCH net-next] net: dsa: tag_sja1105: optionally build as module when switch driver is module if PTP is enabled Vladimir Oltean
@ 2021-08-05 12:40 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-08-05 12:40 UTC (permalink / raw)
To: Vladimir Oltean
Cc: netdev, kuba, davem, andrew, f.fainelli, vivien.didelot, arnd
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Thu, 5 Aug 2021 14:36:12 +0300 you wrote:
> TX timestamps are sent by SJA1110 as Ethernet packets containing
> metadata, so they are received by the tagging driver but must be
> processed by the switch driver - the one that is stateful since it
> keeps the TX timestamp queue.
>
> This means that there is an sja1110_process_meta_tstamp() symbol
> exported by the switch driver which is called by the tagging driver.
>
> [...]
Here is the summary with links:
- [net-next] net: dsa: tag_sja1105: optionally build as module when switch driver is module if PTP is enabled
https://git.kernel.org/netdev/net-next/c/f8b17a0bd960
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-05 12:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-05 11:36 [PATCH net-next] net: dsa: tag_sja1105: optionally build as module when switch driver is module if PTP is enabled Vladimir Oltean
2021-08-05 12:40 ` patchwork-bot+netdevbpf
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).