Skip to content

Commit a7ebcb8

Browse files
DimitriFedraugregkh
authored andcommitted
net: phy: dp83822: fix transmit amplitude if CONFIG_OF_MDIO not defined
commit 8fa649f upstream. When CONFIG_OF_MDIO is not defined the index for selecting the transmit amplitude voltage for 100BASE-TX is set to 0, but it should be -1, if there is no need to modify the transmit amplitude voltage. Move initialization of the index from dp83822_of_init to dp8382x_probe. Fixes: 4f3735e ("net: phy: dp83822: Add support for changing the transmit amplitude voltage") Reviewed-by: Gerhard Engleder <[email protected]> Signed-off-by: Dimitri Fedrau <[email protected]> Link: https://patch.msgid.link/20250317-dp83822-fix-transceiver-mdio-v2-1-fb09454099a4@liebherr.com Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent ae83115 commit a7ebcb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/phy/dp83822.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,6 @@ static int dp83822_of_init(struct phy_device *phydev)
833833
dp83822->set_gpio2_clk_out = true;
834834
}
835835

836-
dp83822->tx_amplitude_100base_tx_index = -1;
837836
ret = phy_get_tx_amplitude_gain(phydev, dev,
838837
ETHTOOL_LINK_MODE_100baseT_Full_BIT,
839838
&val);
@@ -931,6 +930,7 @@ static int dp8382x_probe(struct phy_device *phydev)
931930
if (!dp83822)
932931
return -ENOMEM;
933932

933+
dp83822->tx_amplitude_100base_tx_index = -1;
934934
phydev->priv = dp83822;
935935

936936
return 0;

0 commit comments

Comments
 (0)