All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: phy: marvell: Fix invalid comparison in marvell_{suspend,resume}()
@ 2022-03-11 15:55 Kurt Cancemi
  2022-03-11 18:40 ` Andrew Lunn
  0 siblings, 1 reply; 2+ messages in thread
From: Kurt Cancemi @ 2022-03-11 15:55 UTC (permalink / raw)
  To: netdev; +Cc: andrew, linux, Kurt Cancemi

This bug resulted in not resuming and suspending both the fiber and copper
modes. Only the current mode would be suspended.

Signed-off-by: Kurt Cancemi <kurt@x64architecture.com>
---
 drivers/net/phy/marvell.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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)
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: phy: marvell: Fix invalid comparison in marvell_{suspend,resume}()
  2022-03-11 15:55 [PATCH] net: phy: marvell: Fix invalid comparison in marvell_{suspend,resume}() Kurt Cancemi
@ 2022-03-11 18:40 ` Andrew Lunn
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2022-03-11 18:40 UTC (permalink / raw)
  To: Kurt Cancemi; +Cc: netdev, linux

On Fri, Mar 11, 2022 at 10:55:42AM -0500, Kurt Cancemi wrote:
> This bug resulted in not resuming and suspending both the fiber and copper
> modes. Only the current mode would be suspended.
> 
> Signed-off-by: Kurt Cancemi <kurt@x64architecture.com>

Hi Kurt

Please take a look at the netdev FAQ. You should put the tree where
this should be merged into in the subject line.

Since this is a fix, you should also include a Fixes: tag indicating
where the bug was introduces. That helps with backporting.

Fixes: 3758be3dc162 ("Marvell phy: add functions to suspend and resume both interfaces: fiber and copper links.")

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

    Andrew

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-11 18:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-11 15:55 [PATCH] net: phy: marvell: Fix invalid comparison in marvell_{suspend,resume}() Kurt Cancemi
2022-03-11 18:40 ` Andrew Lunn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.