All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 1/1] net: phy: dp83867: Fix SGMII FIFO depth for non OF devices
@ 2022-11-08 10:12 Michael Sit Wei Hong
  2022-11-08 20:43 ` Andrew Lunn
  2022-11-09  1:55 ` Jakub Kicinski
  0 siblings, 2 replies; 4+ messages in thread
From: Michael Sit Wei Hong @ 2022-11-08 10:12 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit, Russell King, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-kernel
  Cc: Looi Hong Aun, Voon Weifeng, Tan Tee Min,
	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.

Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>
---
 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] 4+ messages in thread

* Re: [PATCH net 1/1] net: phy: dp83867: Fix SGMII FIFO depth for non OF devices
  2022-11-08 10:12 [PATCH net 1/1] net: phy: dp83867: Fix SGMII FIFO depth for non OF devices Michael Sit Wei Hong
@ 2022-11-08 20:43 ` Andrew Lunn
  2022-11-09  1:55 ` Jakub Kicinski
  1 sibling, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2022-11-08 20:43 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, Looi Hong Aun,
	Voon Weifeng, Tan Tee Min, Zulkifli Muhammad Husaini,
	Gan Yi Fang

On Tue, Nov 08, 2022 at 06:12:18PM +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.
> 
> Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>

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

    Andrew

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

* Re: [PATCH net 1/1] net: phy: dp83867: Fix SGMII FIFO depth for non OF devices
  2022-11-08 10:12 [PATCH net 1/1] net: phy: dp83867: Fix SGMII FIFO depth for non OF devices Michael Sit Wei Hong
  2022-11-08 20:43 ` Andrew Lunn
@ 2022-11-09  1:55 ` Jakub Kicinski
  2022-11-09  2:18   ` Sit, Michael Wei Hong
  1 sibling, 1 reply; 4+ messages in thread
From: Jakub Kicinski @ 2022-11-09  1:55 UTC (permalink / raw)
  To: Michael Sit Wei Hong
  Cc: Andrew Lunn, Heiner Kallweit, Russell King, David S . Miller,
	Eric Dumazet, Paolo Abeni, netdev, linux-kernel, Looi Hong Aun,
	Voon Weifeng, Tan Tee Min, Zulkifli Muhammad Husaini,
	Gan Yi Fang

On Tue,  8 Nov 2022 18:12:18 +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.

We need a Fixes tag, which commit should have contained this code?

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

* RE: [PATCH net 1/1] net: phy: dp83867: Fix SGMII FIFO depth for non OF devices
  2022-11-09  1:55 ` Jakub Kicinski
@ 2022-11-09  2:18   ` Sit, Michael Wei Hong
  0 siblings, 0 replies; 4+ messages in thread
From: Sit, Michael Wei Hong @ 2022-11-09  2:18 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Andrew Lunn, Heiner Kallweit, Russell King, David S . Miller,
	Eric Dumazet, Paolo Abeni, netdev, linux-kernel, Looi, Hong Aun,
	Voon, Weifeng, Tan, Tee Min, Zulkifli, Muhammad Husaini, Gan,
	Yi Fang



> -----Original Message-----
> From: Jakub Kicinski <kuba@kernel.org>
> Sent: Wednesday, November 9, 2022 9:56 AM
> To: Sit, Michael Wei Hong <michael.wei.hong.sit@intel.com>
> Cc: Andrew Lunn <andrew@lunn.ch>; Heiner Kallweit
> <hkallweit1@gmail.com>; Russell King <linux@armlinux.org.uk>;
> David S . Miller <davem@davemloft.net>; Eric Dumazet
> <edumazet@google.com>; Paolo Abeni <pabeni@redhat.com>;
> netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Looi,
> Hong Aun <hong.aun.looi@intel.com>; Voon, Weifeng
> <weifeng.voon@intel.com>; Tan, Tee Min
> <tee.min.tan@intel.com>; Zulkifli, Muhammad Husaini
> <muhammad.husaini.zulkifli@intel.com>; Gan, Yi Fang
> <yi.fang.gan@intel.com>
> Subject: Re: [PATCH net 1/1] net: phy: dp83867: Fix SGMII FIFO
> depth for non OF devices
> 
> On Tue,  8 Nov 2022 18:12:18 +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.
> 
> We need a Fixes tag, which commit should have contained this
> code?

Will add the Fixes tag in the next revision.
Thanks.

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

end of thread, other threads:[~2022-11-09  2:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-08 10:12 [PATCH net 1/1] net: phy: dp83867: Fix SGMII FIFO depth for non OF devices Michael Sit Wei Hong
2022-11-08 20:43 ` Andrew Lunn
2022-11-09  1:55 ` Jakub Kicinski
2022-11-09  2:18   ` Sit, Michael Wei Hong

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.