diff mbox series

[net-next] net: dsa: Fix dependencies with HSR

Message ID 20210220051222.15672-1-f.fainelli@gmail.com (mailing list archive)
State Accepted
Commit 94ead4caa0615f4b0719ffcb4dbd0907fe2f9265
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: dsa: Fix dependencies with HSR | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net-next
netdev/subject_prefix success Link
netdev/cc_maintainers success CCed 8 of 8 maintainers
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link
netdev/stable success Stable not CCed

Commit Message

Florian Fainelli Feb. 20, 2021, 5:12 a.m. UTC
The core DSA framework uses hsr_is_master() which would not resolve to a
valid symbol if HSR is built-into the kernel and DSA is a module.

Fixes: 18596f504a3e ("net: dsa: add support for offloading HSR")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
David, Jakub,

This showed up in linux-next which means it will show up in Linus' tree
soon as well when your pull request gets sent out.

 net/dsa/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Florian Fainelli Feb. 20, 2021, 5:14 a.m. UTC | #1
On 2/19/2021 9:12 PM, Florian Fainelli wrote:
> The core DSA framework uses hsr_is_master() which would not resolve to a
> valid symbol if HSR is built-into the kernel and DSA is a module.
> 
> Fixes: 18596f504a3e ("net: dsa: add support for offloading HSR")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> David, Jakub,
> 
> This showed up in linux-next which means it will show up in Linus' tree
> soon as well when your pull request gets sent out.

I had initially considered making is_hsr_master() a static inline that
would compare dev->dev.type->name with "hsr" since the HSR master would
set a custom dev_type, however the xrs700x driver would still fail to
link because it calls hsr_get_version() and for that one there is no
easy solution.
George McCollister Feb. 20, 2021, 2:24 p.m. UTC | #2
On Fri, Feb 19, 2021 at 11:14 PM Florian Fainelli <f.fainelli@gmail.com> wrote:
>
>
>
> On 2/19/2021 9:12 PM, Florian Fainelli wrote:
> > The core DSA framework uses hsr_is_master() which would not resolve to a
> > valid symbol if HSR is built-into the kernel and DSA is a module.
> >
> > Fixes: 18596f504a3e ("net: dsa: add support for offloading HSR")
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> > ---
> > David, Jakub,
> >
> > This showed up in linux-next which means it will show up in Linus' tree
> > soon as well when your pull request gets sent out.
>
> I had initially considered making is_hsr_master() a static inline that
> would compare dev->dev.type->name with "hsr" since the HSR master would
> set a custom dev_type, however the xrs700x driver would still fail to
> link because it calls hsr_get_version() and for that one there is no
> easy solution.

Thanks for looking into this. It's not something I've run into before.
It didn't occur to me what would happen if HSR was a module. I'll look
out for this in the future.

Sorry for the inconvenience.

Reviewed-by: George McCollister <george.mccollister@gmail.com>

-George

> --
> Florian
Vladimir Oltean Feb. 20, 2021, 3:36 p.m. UTC | #3
On Fri, Feb 19, 2021 at 09:12:21PM -0800, Florian Fainelli wrote:
> The core DSA framework uses hsr_is_master() which would not resolve to a
> valid symbol if HSR is built-into the kernel and DSA is a module.
> 
> Fixes: 18596f504a3e ("net: dsa: add support for offloading HSR")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---

Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Tested-by: Vladimir Oltean <olteanv@gmail.com>
patchwork-bot+netdevbpf@kernel.org Feb. 23, 2021, 3 a.m. UTC | #4
Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Fri, 19 Feb 2021 21:12:21 -0800 you wrote:
> The core DSA framework uses hsr_is_master() which would not resolve to a
> valid symbol if HSR is built-into the kernel and DSA is a module.
> 
> Fixes: 18596f504a3e ("net: dsa: add support for offloading HSR")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> 
> [...]

Here is the summary with links:
  - [net-next] net: dsa: Fix dependencies with HSR
    https://git.kernel.org/netdev/net/c/94ead4caa061

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig
index a45572cfb71a..3589224c8da9 100644
--- a/net/dsa/Kconfig
+++ b/net/dsa/Kconfig
@@ -9,6 +9,7 @@  menuconfig NET_DSA
 	tristate "Distributed Switch Architecture"
 	depends on HAVE_NET_DSA
 	depends on BRIDGE || BRIDGE=n
+	depends on HSR || HSR=n
 	select GRO_CELLS
 	select NET_SWITCHDEV
 	select PHYLINK