Skip to contentSkip to conversation

net: phy: dp83867: Fix SGMII FIFO depth for non OF devices

PATCH RESEND Applied Michael Sit Wei Hong 3 participants 3 messages Nov 10, 2022 – Nov 12, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND v2 1/1 net: phy: dp83867: Fix SGMII FIFO depth for non OF devices

Current driver code will read device tree node information, and set default values if there is no info provided.

This is not done in non-OF devices leading to SGMII fifo depths being set to the smallest size.

This patch sets the value to the default value of the PHY as stated in the PHY datasheet.

Fixes 4dc08dcc9f6f ("net: phy: dp83867: introduce critical chip default init for non-of platform")

---
v1->v2:
- Add Fixes tag to commit message

---
 drivers/net/phy/dp83867.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/net/phy/dp83867.c +7 -0
index 6939563d3b7c..fb7df4baaf6f 100644
@@ -682,6 +682,13 @@ static int dp83867_of_init(struct phy_device *phydev)
 	 */
 	dp83867->io_impedance = DP83867_IO_MUX_CFG_IO_IMPEDANCE_MIN / 2;
 
+	/* For non-OF device, the RX and TX FIFO depths are taken from
+	 * default value. So, we init RX & TX FIFO depths here
+	 * so that it is configured correctly later in dp83867_config_init();
+	 */
+	dp83867->tx_fifo_depth = DP83867_PHYCR_FIFO_DEPTH_4_B_NIB;
+	dp83867->rx_fifo_depth = DP83867_PHYCR_FIFO_DEPTH_4_B_NIB;
+
 	return 0;
 }
 #endif /* CONFIG_OF_MDIO */
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 11 lines · Michael Sit Wei Hong

Current driver code will read device tree node information, and set default values if there is no info provided.

This is not done in non-OF devices leading to SGMII fifo depths being set to the smallest size.

This patch sets the value to the default value of the PHY as stated in the PHY datasheet.

Fixes 4dc08dcc9f6f ("net: phy: dp83867: introduce critical chip default init for non-of platform")

https://www.spinics.net/lists/netdev/msg858366.html

When sending a new version, please add any Acked-by, or Reviewed-by tags you have received. It helps get your patch merged if it can easily be seen is has been reviewed.

Andrew

#2 lore raw
In reply to Michael Sit Wei Hong
This patch was applied to netdev/net.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <[email protected]>:

Quoted 10 lines · On Thu, 10 Nov 2022 13:49:38 +0800 you wrote:

Current driver code will read device tree node information, and set default values if there is no info provided.

This is not done in non-OF devices leading to SGMII fifo depths being set to the smallest size.

This patch sets the value to the default value of the PHY as stated in the PHY datasheet.

[...]

Here is the summary with links:
- [net,v2,RESEND,1/1] net: phy: dp83867: Fix SGMII FIFO depth for non OF devices

    https://git.kernel.org/netdev/net/c/e2a54350dc96

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html