diff mbox series

[net,v3] net: phy: marvell: Fix invalid comparison in the resume and suspend functions

Message ID 20220312201512.326047-1-kurt@x64architecture.com (mailing list archive)
State Accepted
Commit 837d9e49402eaf030db55a49f96fc51d73b4b441
Delegated to: Netdev Maintainers
Headers show
Series [net,v3] net: phy: marvell: Fix invalid comparison in the resume and suspend functions | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-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 success CCed 7 of 7 maintainers
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 Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch warning CHECK: Alignment should match open parenthesis
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Kurt Cancemi March 12, 2022, 8:15 p.m. UTC
This bug resulted in only the current mode being resumed and suspended when
the PHY supported both fiber and copper modes and when the PHY only supported
copper mode the fiber mode would incorrectly be attempted to be resumed and
suspended.

Fixes: 3758be3dc162 ("Marvell phy: add functions to suspend and resume both interfaces: fiber and copper links.")
Signed-off-by: Kurt Cancemi <kurt@x64architecture.com>
---

I removed the dot from the summary line.

 drivers/net/phy/marvell.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Andrew Lunn March 12, 2022, 8:25 p.m. UTC | #1
On Sat, Mar 12, 2022 at 03:15:13PM -0500, Kurt Cancemi wrote:
> This bug resulted in only the current mode being resumed and suspended when
> the PHY supported both fiber and copper modes and when the PHY only supported
> copper mode the fiber mode would incorrectly be attempted to be resumed and
> suspended.
> 
> Fixes: 3758be3dc162 ("Marvell phy: add functions to suspend and resume both interfaces: fiber and copper links.")
> Signed-off-by: Kurt Cancemi <kurt@x64architecture.com>

Hi Kurt

Best practice is to add any Reviewed-by or Tested-by to the patch
whenever you repost it, except when you make major changes. Otherwise
they can get lost.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Jakub Kicinski March 14, 2022, 10:07 p.m. UTC | #2
On Sat, 12 Mar 2022 15:15:13 -0500 Kurt Cancemi wrote:
> -	if (!linkmode_test_bit(ETHTOOL_LINK_MODE_FIBRE_BIT,
> +	if (linkmode_test_bit(ETHTOOL_LINK_MODE_FIBRE_BIT,
>  			       phydev->supported)) {

You should align the continuation lines so that the start matches 
the opening parenthesis. I'll fix it up when applying for you this 
time but please make sure to run checkpatch.pl --strict on patches
before submission. Thanks!
patchwork-bot+netdevbpf@kernel.org March 14, 2022, 10:20 p.m. UTC | #3
Hello:

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

On Sat, 12 Mar 2022 15:15:13 -0500 you wrote:
> This bug resulted in only the current mode being resumed and suspended when
> the PHY supported both fiber and copper modes and when the PHY only supported
> copper mode the fiber mode would incorrectly be attempted to be resumed and
> suspended.
> 
> Fixes: 3758be3dc162 ("Marvell phy: add functions to suspend and resume both interfaces: fiber and copper links.")
> Signed-off-by: Kurt Cancemi <kurt@x64architecture.com>
> 
> [...]

Here is the summary with links:
  - [net,v3] net: phy: marvell: Fix invalid comparison in the resume and suspend functions
    https://git.kernel.org/netdev/net/c/837d9e49402e

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 2429db614b59..80b888a88127 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -1687,7 +1687,7 @@  static int marvell_suspend(struct phy_device *phydev)
 	int err;
 
 	/* Suspend the fiber mode first */
-	if (!linkmode_test_bit(ETHTOOL_LINK_MODE_FIBRE_BIT,
+	if (linkmode_test_bit(ETHTOOL_LINK_MODE_FIBRE_BIT,
 			       phydev->supported)) {
 		err = marvell_set_page(phydev, MII_MARVELL_FIBER_PAGE);
 		if (err < 0)
@@ -1722,7 +1722,7 @@  static int marvell_resume(struct phy_device *phydev)
 	int err;
 
 	/* Resume the fiber mode first */
-	if (!linkmode_test_bit(ETHTOOL_LINK_MODE_FIBRE_BIT,
+	if (linkmode_test_bit(ETHTOOL_LINK_MODE_FIBRE_BIT,
 			       phydev->supported)) {
 		err = marvell_set_page(phydev, MII_MARVELL_FIBER_PAGE);
 		if (err < 0)