Netdev List
 help / color / mirror / Atom feed
* net: phy: dp83822: Fix reset pin definitions
@ 2024-10-16  9:56 Michel Alex
  2024-10-16 11:29 ` Maxime Chevallier
  0 siblings, 1 reply; 6+ messages in thread
From: Michel Alex @ 2024-10-16  9:56 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Michel Alex, Waibel Georg, Appelt Andreas, Russell King,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org

The SW_RESET definition was incorrectly assigned to bit 14, which is the
Digital Restart bit according to the datasheet. This commit corrects
SW_RESET to bit 15 and assigns DIG_RESTART to bit 14 as per the
datasheet specifications.

The SW_RESET define is only used in the phy_reset function, which fully
re-initializes the PHY after the reset is performed. The change in the
bit definitions should not have any negative impact on the functionality
of the PHY.

Cc: mailto:stable@vger.kernel.org
Signed-off-by: Alex Michel <mailto:alex.michel@wiedemann-group.com>
---
 drivers/net/phy/dp83822.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/phy/dp83822.c b/drivers/net/phy/dp83822.c
index fc247f479257..3ab64e04a01c 100644
--- a/drivers/net/phy/dp83822.c
+++ b/drivers/net/phy/dp83822.c
@@ -45,8 +45,8 @@
 /* Control Register 2 bits */
 #define DP83822_FX_ENABLE	BIT(14)
 
-#define DP83822_HW_RESET	BIT(15)
-#define DP83822_SW_RESET	BIT(14)
+#define DP83822_SW_RESET	BIT(15)
+#define DP83822_DIG_RESTART	BIT(14)
 
 /* PHY STS bits */
 #define DP83822_PHYSTS_DUPLEX			BIT(2)
-- 
2.43.0


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

* Re: net: phy: dp83822: Fix reset pin definitions
  2024-10-16  9:56 net: phy: dp83822: Fix reset pin definitions Michel Alex
@ 2024-10-16 11:29 ` Maxime Chevallier
  2024-10-16 12:11   ` [PATCH net v2] " Michel Alex
  0 siblings, 1 reply; 6+ messages in thread
From: Maxime Chevallier @ 2024-10-16 11:29 UTC (permalink / raw)
  To: Michel Alex
  Cc: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Waibel Georg,
	Appelt Andreas, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org

Hi,

On Wed, 16 Oct 2024 09:56:34 +0000
Michel Alex <Alex.Michel@wiedemann-group.com> wrote:

> The SW_RESET definition was incorrectly assigned to bit 14, which is the
> Digital Restart bit according to the datasheet. This commit corrects
> SW_RESET to bit 15 and assigns DIG_RESTART to bit 14 as per the
> datasheet specifications.
> 
> The SW_RESET define is only used in the phy_reset function, which fully
> re-initializes the PHY after the reset is performed. The change in the
> bit definitions should not have any negative impact on the functionality
> of the PHY.
> 
> Cc: mailto:stable@vger.kernel.org
> Signed-off-by: Alex Michel <mailto:alex.michel@wiedemann-group.com>

Thanks for the patch ! When submitting a patch for inclusion through
the net subsystem, you need to format your patch so that you indicate
whether the patch is aimed towards net-next (new features) or net
(bugfixes). More information can be found here :

https://www.kernel.org/doc/Documentation/process/maintainer-netdev.rst

You can use the --subject-prefix="PATCH net" option to git format-patch
when generating the patch.

It seems to me that this is indeed a bug, which has been reported
before :

https://lore.kernel.org/netdev/CAHvQdo2yzJC89K74c_CZFjPydDQ5i22w36XPR5tKVv_W8a2vcg@mail.gmail.com/

You would therefore need a Fixes tag pinpointing the commit that
introduced the issue :

Fixes: 5dc39fd5ef35 ("net: phy: DP83822: Add ability to advertise Fiber connection")

I don't have a board with that PHY to test it, it seems that issue of
the wrong bit being set during reset was introduced when Fiber support
for this PHY was added, it's unclear if the change was on purpose or
not and if changing this would break the boards that relies on straps
to detect that they are using Fiber :/

Best regards,

Maxime


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

* [PATCH net v2] net: phy: dp83822: Fix reset pin definitions
  2024-10-16 11:29 ` Maxime Chevallier
@ 2024-10-16 12:11   ` Michel Alex
  2024-10-16 21:31     ` Andrew Lunn
                       ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Michel Alex @ 2024-10-16 12:11 UTC (permalink / raw)
  To: Maxime Chevallier, Andrew Lunn, Heiner Kallweit, Russell King,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Dan Murphy
  Cc: Michel Alex, Waibel Georg, Appelt Andreas, Russell King,
	David S. Miller, Dan Murphy, Andrew Lunn, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org

This change fixes a rare issue where the PHY fails to detect a link
due to incorrect reset behavior.

The SW_RESET definition was incorrectly assigned to bit 14, which is the
Digital Restart bit according to the datasheet. This commit corrects
SW_RESET to bit 15 and assigns DIG_RESTART to bit 14 as per the
datasheet specifications.

The SW_RESET define is only used in the phy_reset function, which fully
re-initializes the PHY after the reset is performed. The change in the
bit definitions should not have any negative impact on the functionality
of the PHY.

v2:
- added Fixes tag
- improved commit message

Cc: stable@vger.kernel.org
Fixes: 5dc39fd5ef35 ("net: phy: DP83822: Add ability to advertise Fiber connection")
Signed-off-by: Alex Michel <alex.michel@wiedemann-group.com>
---
 drivers/net/phy/dp83822.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/phy/dp83822.c b/drivers/net/phy/dp83822.c
index fc247f479257..3ab64e04a01c 100644
--- a/drivers/net/phy/dp83822.c
+++ b/drivers/net/phy/dp83822.c
@@ -45,8 +45,8 @@
 /* Control Register 2 bits */
 #define DP83822_FX_ENABLE	BIT(14)
 
-#define DP83822_HW_RESET	BIT(15)
-#define DP83822_SW_RESET	BIT(14)
+#define DP83822_SW_RESET	BIT(15)
+#define DP83822_DIG_RESTART	BIT(14)
 
 /* PHY STS bits */
 #define DP83822_PHYSTS_DUPLEX			BIT(2)
-- 
2.43.0

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

* Re: [PATCH net v2] net: phy: dp83822: Fix reset pin definitions
  2024-10-16 12:11   ` [PATCH net v2] " Michel Alex
@ 2024-10-16 21:31     ` Andrew Lunn
  2024-10-18  2:45     ` Andrew Lunn
  2024-10-20 14:50     ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 6+ messages in thread
From: Andrew Lunn @ 2024-10-16 21:31 UTC (permalink / raw)
  To: Michel Alex
  Cc: Maxime Chevallier, Heiner Kallweit, Russell King, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Dan Murphy,
	Waibel Georg, Appelt Andreas, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org

On Wed, Oct 16, 2024 at 12:11:15PM +0000, Michel Alex wrote:
> This change fixes a rare issue where the PHY fails to detect a link
> due to incorrect reset behavior.
> 
> The SW_RESET definition was incorrectly assigned to bit 14, which is the
> Digital Restart bit according to the datasheet. This commit corrects
> SW_RESET to bit 15 and assigns DIG_RESTART to bit 14 as per the
> datasheet specifications.
> 
> The SW_RESET define is only used in the phy_reset function, which fully
> re-initializes the PHY after the reset is performed. The change in the
> bit definitions should not have any negative impact on the functionality
> of the PHY.
> 
> v2:
> - added Fixes tag
> - improved commit message
> 
> Cc: stable@vger.kernel.org
> Fixes: 5dc39fd5ef35 ("net: phy: DP83822: Add ability to advertise Fiber connection")
> Signed-off-by: Alex Michel <alex.michel@wiedemann-group.com>

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

    Andrew

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

* Re: [PATCH net v2] net: phy: dp83822: Fix reset pin definitions
  2024-10-16 12:11   ` [PATCH net v2] " Michel Alex
  2024-10-16 21:31     ` Andrew Lunn
@ 2024-10-18  2:45     ` Andrew Lunn
  2024-10-20 14:50     ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 6+ messages in thread
From: Andrew Lunn @ 2024-10-18  2:45 UTC (permalink / raw)
  To: Michel Alex
  Cc: Maxime Chevallier, Heiner Kallweit, Russell King, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Dan Murphy,
	Waibel Georg, Appelt Andreas, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org

On Wed, Oct 16, 2024 at 12:11:15PM +0000, Michel Alex wrote:
> This change fixes a rare issue where the PHY fails to detect a link
> due to incorrect reset behavior.
> 
> The SW_RESET definition was incorrectly assigned to bit 14, which is the
> Digital Restart bit according to the datasheet. This commit corrects
> SW_RESET to bit 15 and assigns DIG_RESTART to bit 14 as per the
> datasheet specifications.
> 
> The SW_RESET define is only used in the phy_reset function, which fully
> re-initializes the PHY after the reset is performed. The change in the
> bit definitions should not have any negative impact on the functionality
> of the PHY.
> 
> v2:
> - added Fixes tag
> - improved commit message

> 
> Cc: stable@vger.kernel.org
> Fixes: 5dc39fd5ef35 ("net: phy: DP83822: Add ability to advertise Fiber connection")
> Signed-off-by: Alex Michel <alex.michel@wiedemann-group.com>

Please create a new thread for each new patch submission. The
machinary testing patches does not understand it when you just add a
new version to an existing thread.


    Andrew

---
pw-bot: cr

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

* Re: [PATCH net v2] net: phy: dp83822: Fix reset pin definitions
  2024-10-16 12:11   ` [PATCH net v2] " Michel Alex
  2024-10-16 21:31     ` Andrew Lunn
  2024-10-18  2:45     ` Andrew Lunn
@ 2024-10-20 14:50     ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-10-20 14:50 UTC (permalink / raw)
  To: Michel Alex
  Cc: maxime.chevallier, andrew, hkallweit1, linux, davem, edumazet,
	kuba, pabeni, dmurphy, Georg.Waibel, Andreas.Appelt, netdev,
	linux-kernel

Hello:

This patch was applied to netdev/net.git (main)
by Andrew Lunn <andrew@lunn.ch>:

On Wed, 16 Oct 2024 12:11:15 +0000 you wrote:
> This change fixes a rare issue where the PHY fails to detect a link
> due to incorrect reset behavior.
> 
> The SW_RESET definition was incorrectly assigned to bit 14, which is the
> Digital Restart bit according to the datasheet. This commit corrects
> SW_RESET to bit 15 and assigns DIG_RESTART to bit 14 as per the
> datasheet specifications.
> 
> [...]

Here is the summary with links:
  - [net,v2] net: phy: dp83822: Fix reset pin definitions
    https://git.kernel.org/netdev/net/c/de96f6a30035

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

end of thread, other threads:[~2024-10-20 14:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-16  9:56 net: phy: dp83822: Fix reset pin definitions Michel Alex
2024-10-16 11:29 ` Maxime Chevallier
2024-10-16 12:11   ` [PATCH net v2] " Michel Alex
2024-10-16 21:31     ` Andrew Lunn
2024-10-18  2:45     ` Andrew Lunn
2024-10-20 14:50     ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox