Skip to contentSkip to conversation

net: dsa: mt7530: fix incorrect test in mt753x_phylink_validate()

PATCH Applied Russell King (Oracle) 2 participants 2 messages Mar 7, 2022 – Mar 8, 2022

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: dsa: mt7530: fix incorrect test in mt753x_phylink_validate()

Discussing one of the tests in mt753x_phylink_validate() with Landen Chao confirms that the "||" should be "&&". Fix this.

Fixes c288575f7810 ("net: dsa: mt7530: Add the support of MT7531 switch")

---
As the mt7530 maintainers are not very responsive to my recent two patch series, but Landen Chao did state that this should be "&&" not "||", lets at least get this patch merged.

 drivers/net/dsa/mt7530.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/dsa/mt7530.c +1 -1
index ff3c267d0f26..a251bc55727f 100644
@@ -2936,7 +2936,7 @@ mt753x_phylink_validate(struct dsa_switch *ds, int port,
 
 	phylink_set_port_modes(mask);
 
-	if (state->interface != PHY_INTERFACE_MODE_TRGMII ||
+	if (state->interface != PHY_INTERFACE_MODE_TRGMII &&
 	    !phy_interface_mode_is_8023z(state->interface)) {
 		phylink_set(mask, 10baseT_Half);
 		phylink_set(mask, 10baseT_Full);
Signature · 1 line
2.30.2
#1 lore raw
This patch was applied to netdev/net.git (master) by Paolo Abeni <[email protected]>:

Hello:

This patch was applied to netdev/net.git (master)
by Paolo Abeni <[email protected]>:

Quoted 11 lines · On Mon, 07 Mar 2022 12:13:30 +0000 you wrote:

Discussing one of the tests in mt753x_phylink_validate() with Landen Chao confirms that the "||" should be "&&". Fix this.

Fixes c288575f7810 ("net: dsa: mt7530: Add the support of MT7531 switch")

---
As the mt7530 maintainers are not very responsive to my recent two patch series, but Landen Chao did state that this should be "&&" not "||", lets at least get this patch merged.

[...]

Here is the summary with links:
- [net] net: dsa: mt7530: fix incorrect test in mt753x_phylink_validate()

    https://git.kernel.org/netdev/net/c/e5417cbf7ab5

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html