All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 net] net: phy: marvell: Fix invalid comparison in the resume and suspend functions.
@ 2022-03-12  0:20 Kurt Cancemi
  2022-03-12 15:15 ` Andrew Lunn
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Kurt Cancemi @ 2022-03-12  0:20 UTC (permalink / raw)
  To: netdev; +Cc: andrew, linux, Kurt Cancemi

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>
---
 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] 8+ messages in thread

* Re: [PATCH v2 net] net: phy: marvell: Fix invalid comparison in the resume and suspend functions.
  2022-03-12  0:20 [PATCH v2 net] net: phy: marvell: Fix invalid comparison in the resume and suspend functions Kurt Cancemi
@ 2022-03-12 15:15 ` Andrew Lunn
  2022-03-12 19:30 ` Marek Behún
  2022-03-12 20:15 ` [PATCH net v3] " Kurt Cancemi
  2 siblings, 0 replies; 8+ messages in thread
From: Andrew Lunn @ 2022-03-12 15:15 UTC (permalink / raw)
  To: Kurt Cancemi; +Cc: netdev, linux

On Fri, Mar 11, 2022 at 07:20:19PM -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>

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

    Andrew

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

* Re: [PATCH v2 net] net: phy: marvell: Fix invalid comparison in the resume and suspend functions.
  2022-03-12  0:20 [PATCH v2 net] net: phy: marvell: Fix invalid comparison in the resume and suspend functions Kurt Cancemi
  2022-03-12 15:15 ` Andrew Lunn
@ 2022-03-12 19:30 ` Marek Behún
  2022-03-12 20:16   ` Russell King (Oracle)
  2022-03-12 20:15 ` [PATCH net v3] " Kurt Cancemi
  2 siblings, 1 reply; 8+ messages in thread
From: Marek Behún @ 2022-03-12 19:30 UTC (permalink / raw)
  To: Kurt Cancemi; +Cc: netdev, andrew, linux

On Fri, 11 Mar 2022 19:20:19 -0500
Kurt Cancemi <kurt@x64architecture.com> 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>

Nitpick: We don't use dots to end subject lines.

Marek

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

* [PATCH net v3] net: phy: marvell: Fix invalid comparison in the resume and suspend functions
  2022-03-12  0:20 [PATCH v2 net] net: phy: marvell: Fix invalid comparison in the resume and suspend functions Kurt Cancemi
  2022-03-12 15:15 ` Andrew Lunn
  2022-03-12 19:30 ` Marek Behún
@ 2022-03-12 20:15 ` Kurt Cancemi
  2022-03-12 20:25   ` Andrew Lunn
                     ` (2 more replies)
  2 siblings, 3 replies; 8+ messages in thread
From: Kurt Cancemi @ 2022-03-12 20:15 UTC (permalink / raw)
  To: netdev
  Cc: kurt, kabel, Andrew Lunn, Heiner Kallweit, Russell King,
	David S. Miller, Jakub Kicinski, Charles-Antoine Couret,
	linux-kernel

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

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] 8+ messages in thread

* Re: [PATCH v2 net] net: phy: marvell: Fix invalid comparison in the resume and suspend functions.
  2022-03-12 19:30 ` Marek Behún
@ 2022-03-12 20:16   ` Russell King (Oracle)
  0 siblings, 0 replies; 8+ messages in thread
From: Russell King (Oracle) @ 2022-03-12 20:16 UTC (permalink / raw)
  To: Marek Behún; +Cc: Kurt Cancemi, netdev, andrew

On Sat, Mar 12, 2022 at 08:30:38PM +0100, Marek Behún wrote:
> On Fri, 11 Mar 2022 19:20:19 -0500
> Kurt Cancemi <kurt@x64architecture.com> 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>
> 
> Nitpick: We don't use dots to end subject lines.

However, the commit in question has, and the Fixes: quoted summary line
needs to exactly match the summary line from the commit in question. So,
the fixes line is unfortunately correct in this instance.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

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

* Re: [PATCH net v3] net: phy: marvell: Fix invalid comparison in the resume and suspend functions
  2022-03-12 20:15 ` [PATCH net v3] " Kurt Cancemi
@ 2022-03-12 20:25   ` Andrew Lunn
  2022-03-14 22:07   ` Jakub Kicinski
  2022-03-14 22:20   ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 8+ messages in thread
From: Andrew Lunn @ 2022-03-12 20:25 UTC (permalink / raw)
  To: Kurt Cancemi
  Cc: netdev, kabel, Heiner Kallweit, Russell King, David S. Miller,
	Jakub Kicinski, Charles-Antoine Couret, linux-kernel

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

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

* Re: [PATCH net v3] net: phy: marvell: Fix invalid comparison in the resume and suspend functions
  2022-03-12 20:15 ` [PATCH net v3] " Kurt Cancemi
  2022-03-12 20:25   ` Andrew Lunn
@ 2022-03-14 22:07   ` Jakub Kicinski
  2022-03-14 22:20   ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 8+ messages in thread
From: Jakub Kicinski @ 2022-03-14 22:07 UTC (permalink / raw)
  To: Kurt Cancemi
  Cc: netdev, kabel, Andrew Lunn, Heiner Kallweit, Russell King,
	David S. Miller, Charles-Antoine Couret, linux-kernel

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!

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

* Re: [PATCH net v3] net: phy: marvell: Fix invalid comparison in the resume and suspend functions
  2022-03-12 20:15 ` [PATCH net v3] " Kurt Cancemi
  2022-03-12 20:25   ` Andrew Lunn
  2022-03-14 22:07   ` Jakub Kicinski
@ 2022-03-14 22:20   ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 8+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-03-14 22:20 UTC (permalink / raw)
  To: Kurt Cancemi
  Cc: netdev, kabel, andrew, hkallweit1, linux, davem, kuba,
	charles-antoine.couret, linux-kernel

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2022-03-14 22:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-12  0:20 [PATCH v2 net] net: phy: marvell: Fix invalid comparison in the resume and suspend functions Kurt Cancemi
2022-03-12 15:15 ` Andrew Lunn
2022-03-12 19:30 ` Marek Behún
2022-03-12 20:16   ` Russell King (Oracle)
2022-03-12 20:15 ` [PATCH net v3] " Kurt Cancemi
2022-03-12 20:25   ` Andrew Lunn
2022-03-14 22:07   ` Jakub Kicinski
2022-03-14 22:20   ` patchwork-bot+netdevbpf

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.