diff mbox series

[net-next,1/2] net: dsa: mv88e6xxx: don't error out cmode set on missing lane

Message ID cd95cf3422ae8daf297a01fa9ec3931b203cdf45.1646050203.git.baruch@tkos.co.il (mailing list archive)
State Accepted
Commit 13b0bd2e62e7b16f273eb681174c842567015a39
Delegated to: Netdev Maintainers
Headers show
Series [net-next,1/2] net: dsa: mv88e6xxx: don't error out cmode set on missing lane | 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 4 maintainers not CCed: olteanv@gmail.com f.fainelli@gmail.com davem@davemloft.net kuba@kernel.org
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, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Baruch Siach Feb. 28, 2022, 12:10 p.m. UTC
From: Baruch Siach <baruch.siach@siklu.com>

When the given cmode has no serdes, mv88e6xxx_serdes_get_lane() returns
-NODEV. Earlier in the same function the code skips serdes handing in
this case. Do the same after cmode set.

Signed-off-by: Baruch Siach <baruch.siach@siklu.com>
---
 drivers/net/dsa/mv88e6xxx/port.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

patchwork-bot+netdevbpf@kernel.org March 3, 2022, 6:50 a.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 28 Feb 2022 14:10:02 +0200 you wrote:
> From: Baruch Siach <baruch.siach@siklu.com>
> 
> When the given cmode has no serdes, mv88e6xxx_serdes_get_lane() returns
> -NODEV. Earlier in the same function the code skips serdes handing in
> this case. Do the same after cmode set.
> 
> Signed-off-by: Baruch Siach <baruch.siach@siklu.com>
> 
> [...]

Here is the summary with links:
  - [net-next,1/2] net: dsa: mv88e6xxx: don't error out cmode set on missing lane
    https://git.kernel.org/netdev/net-next/c/13b0bd2e62e7
  - [net-next,2/2] net: dsa: mv88e6xxx: support RMII cmode
    https://git.kernel.org/netdev/net-next/c/002028857384

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/dsa/mv88e6xxx/port.c b/drivers/net/dsa/mv88e6xxx/port.c
index d08e3ec2b042..a58997f1fd69 100644
--- a/drivers/net/dsa/mv88e6xxx/port.c
+++ b/drivers/net/dsa/mv88e6xxx/port.c
@@ -610,6 +610,8 @@  static int mv88e6xxx_port_set_cmode(struct mv88e6xxx_chip *chip, int port,
 		chip->ports[port].cmode = cmode;
 
 		lane = mv88e6xxx_serdes_get_lane(chip, port);
+		if (lane == -ENODEV)
+			return 0;
 		if (lane < 0)
 			return lane;