All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net v2 RESEND 1/1] net: phy: dp83867: Fix SGMII FIFO depth for non OF devices
@ 2022-11-10  5:49 Michael Sit Wei Hong
  2022-11-10 13:09 ` Andrew Lunn
  2022-11-12  5:10 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Michael Sit Wei Hong @ 2022-11-10  5:49 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit, Russell King, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-kernel,
	Tan Tee Min
  Cc: Lay Kuan Loon, Ong Boon Leong, Looi Hong Aun, Voon Weifeng,
	Zulkifli Muhammad Husaini, Gan Yi Fang

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")
Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>
---
v1->v2:
- Add Fixes tag to commit message
---
 drivers/net/phy/dp83867.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c
index 6939563d3b7c..fb7df4baaf6f 100644
--- a/drivers/net/phy/dp83867.c
+++ b/drivers/net/phy/dp83867.c
@@ -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 */
-- 
2.34.1


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

* Re: [PATCH net v2 RESEND 1/1] net: phy: dp83867: Fix SGMII FIFO depth for non OF devices
  2022-11-10  5:49 [PATCH net v2 RESEND 1/1] net: phy: dp83867: Fix SGMII FIFO depth for non OF devices Michael Sit Wei Hong
@ 2022-11-10 13:09 ` Andrew Lunn
  2022-11-12  5:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2022-11-10 13:09 UTC (permalink / raw)
  To: Michael Sit Wei Hong
  Cc: Heiner Kallweit, Russell King, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, netdev, linux-kernel, Tan Tee Min,
	Lay Kuan Loon, Ong Boon Leong, Looi Hong Aun, Voon Weifeng,
	Zulkifli Muhammad Husaini, Gan Yi Fang

On Thu, Nov 10, 2022 at 01:49:38PM +0800, Michael Sit Wei Hong 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.
> 
> Fixes: 4dc08dcc9f6f ("net: phy: dp83867: introduce critical chip default init for non-of platform")
> Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>

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

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

* Re: [PATCH net v2 RESEND 1/1] net: phy: dp83867: Fix SGMII FIFO depth for non OF devices
  2022-11-10  5:49 [PATCH net v2 RESEND 1/1] net: phy: dp83867: Fix SGMII FIFO depth for non OF devices Michael Sit Wei Hong
  2022-11-10 13:09 ` Andrew Lunn
@ 2022-11-12  5:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-11-12  5:10 UTC (permalink / raw)
  To: Michael Sit Wei Hong
  Cc: andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni, netdev,
	linux-kernel, tee.min.tan, kuan.loon.lay, boon.leong.ong,
	hong.aun.looi, weifeng.voon, muhammad.husaini.zulkifli,
	yi.fang.gan

Hello:

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

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



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

end of thread, other threads:[~2022-11-12  5:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-10  5:49 [PATCH net v2 RESEND 1/1] net: phy: dp83867: Fix SGMII FIFO depth for non OF devices Michael Sit Wei Hong
2022-11-10 13:09 ` Andrew Lunn
2022-11-12  5:10 ` 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.