Message ID | 20250303-dp83826-fixes-v1-1-6901a04f262d@yoseli.org (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: phy: dp83826: Enable strap reading and fix TX data voltage support | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Guessing tree name failed - patch did not apply |
diff --git a/drivers/net/phy/dp83822.c b/drivers/net/phy/dp83822.c index 6599feca1967d705331d6e354205a2485ea962f2..88c49e8fe13e20e97191cddcd0885a6e075ae326 100644 --- a/drivers/net/phy/dp83822.c +++ b/drivers/net/phy/dp83822.c @@ -854,6 +854,10 @@ static int dp83822_of_init(struct phy_device *phydev) static void dp83826_of_init(struct phy_device *phydev) { + struct dp83822_private *dp83822 = phydev->priv; + + dp83822->cfg_dac_minus = DP83826_CFG_DAC_MINUS_DEFAULT; + dp83822->cfg_dac_plus = DP83826_CFG_DAC_PLUS_DEFAULT; } #endif /* CONFIG_OF_MDIO */
When CONFIG_OF_MDIO is not set, the cfg_dac_minus and cfg_dac_plus are not set in dp83826_of_init(). This leads to a bad behavior in dp83826_config_init: the phy initialization fails, after MII_DP83826_VOD_CFG1 and MII_DP83826_VOD_CFG2 are set. Fix it by setting the default value for both variables. Fixes: d1d77120bc28 ("net: phy: dp83826: support TX data voltage tuning") Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org> --- drivers/net/phy/dp83822.c | 4 ++++ 1 file changed, 4 insertions(+)