diff mbox series

[net-next] net: dsa: rtl8365mb: add GMII as user port mode

Message ID 20211215034128.18199-1-luizluca@gmail.com (mailing list archive)
State Accepted
Commit a5dba0f207e59dfe7a985e52ca4ce2ca9a33750a
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: dsa: rtl8365mb: add GMII as user port mode | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 6 maintainers not CCed: vivien.didelot@gmail.com andrew@lunn.ch f.fainelli@gmail.com olteanv@gmail.com kuba@kernel.org davem@davemloft.net
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Luiz Angelo Daros de Luca Dec. 15, 2021, 3:41 a.m. UTC
From: Luiz Angelo Daros de Luca <luizluca@gmail.com>

Recent net-next fails to initialize ports with:

 realtek-smi switch: phy mode gmii is unsupported on port 0
 realtek-smi switch lan5 (uninitialized): validation of gmii with
 support 0000000,00000000,000062ef and advertisement
 0000000,00000000,000062ef failed: -22
 realtek-smi switch lan5 (uninitialized): failed to connect to PHY:
 -EINVAL
 realtek-smi switch lan5 (uninitialized): error -22 setting up PHY
 for tree 1, switch 0, port 0

Current net branch(3dd7d40b43663f58d11ee7a3d3798813b26a48f1) is not
affected.

I also noticed the same issue before with older versions but using
a MDIO interface driver, not realtek-smi.

Tested-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
---
 drivers/net/dsa/rtl8365mb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org Dec. 16, 2021, 11 a.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Wed, 15 Dec 2021 00:41:28 -0300 you wrote:
> From: Luiz Angelo Daros de Luca <luizluca@gmail.com>
> 
> Recent net-next fails to initialize ports with:
> 
>  realtek-smi switch: phy mode gmii is unsupported on port 0
>  realtek-smi switch lan5 (uninitialized): validation of gmii with
>  support 0000000,00000000,000062ef and advertisement
>  0000000,00000000,000062ef failed: -22
>  realtek-smi switch lan5 (uninitialized): failed to connect to PHY:
>  -EINVAL
>  realtek-smi switch lan5 (uninitialized): error -22 setting up PHY
>  for tree 1, switch 0, port 0
> 
> [...]

Here is the summary with links:
  - [net-next] net: dsa: rtl8365mb: add GMII as user port mode
    https://git.kernel.org/netdev/net-next/c/a5dba0f207e5

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/dsa/rtl8365mb.c b/drivers/net/dsa/rtl8365mb.c
index 2ac68c867636..3b729544798b 100644
--- a/drivers/net/dsa/rtl8365mb.c
+++ b/drivers/net/dsa/rtl8365mb.c
@@ -900,7 +900,8 @@  static bool rtl8365mb_phy_mode_supported(struct dsa_switch *ds, int port,
 {
 	if (dsa_is_user_port(ds, port) &&
 	    (interface == PHY_INTERFACE_MODE_NA ||
-	     interface == PHY_INTERFACE_MODE_INTERNAL))
+	     interface == PHY_INTERFACE_MODE_INTERNAL ||
+	     interface == PHY_INTERFACE_MODE_GMII))
 		/* Internal PHY */
 		return true;
 	else if (dsa_is_cpu_port(ds, port) &&