diff options
author | Michael Sit Wei Hong <michael.wei.hong.sit@intel.com> | 2022-11-10 08:49:38 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-11-12 06:58:44 +0300 |
commit | e2a54350dc9642e7dfc07335ca355581caa9dbfe (patch) | |
tree | 46cf4ff20c6eaadfd22eb9473503ab8741895ae1 /drivers/net/phy | |
parent | 8eab9be56cc6b702a445d2b6d0256aa0992316b3 (diff) | |
download | linux-e2a54350dc9642e7dfc07335ca355581caa9dbfe.tar.xz |
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")
Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20221110054938.925347-1-michael.wei.hong.sit@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r-- | drivers/net/phy/dp83867.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c index 417527f8bbf5..7446d5c6c714 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 */ |