1 From 6a3b8c573b5a152a6aa7a0b54c5e18b84c6ba6f5 Mon Sep 17 00:00:00 2001
2 From: Christian Marangi <ansuelsmth@gmail.com>
3 Date: Fri, 8 Dec 2023 15:51:49 +0100
4 Subject: [PATCH 02/13] net: phy: at803x: move disable WOL to specific at8031
7 Move the WOL disable call to specific at8031 probe to make at803x_probe
8 more generic and drop extra check for PHY ID.
10 Keep the same previous behaviour by first calling at803x_probe and then
13 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
14 Reviewed-by: Andrew Lunn <andrew@lunn.ch>
15 Signed-off-by: David S. Miller <davem@davemloft.net>
17 drivers/net/phy/at803x.c | 27 +++++++++++++++++----------
18 1 file changed, 17 insertions(+), 10 deletions(-)
20 --- a/drivers/net/phy/at803x.c
21 +++ b/drivers/net/phy/at803x.c
22 @@ -886,15 +886,6 @@ static int at803x_probe(struct phy_devic
23 priv->is_fiber = true;
27 - /* Disable WoL in 1588 register which is enabled
30 - ret = phy_modify_mmd(phydev, MDIO_MMD_PCS,
31 - AT803X_PHY_MMD3_WOL_CTRL,
38 @@ -1591,6 +1582,22 @@ static int at803x_cable_test_start(struc
42 +static int at8031_probe(struct phy_device *phydev)
46 + ret = at803x_probe(phydev);
50 + /* Disable WoL in 1588 register which is enabled
53 + return phy_modify_mmd(phydev, MDIO_MMD_PCS,
54 + AT803X_PHY_MMD3_WOL_CTRL,
58 static int qca83xx_config_init(struct phy_device *phydev)
61 @@ -2092,7 +2099,7 @@ static struct phy_driver at803x_driver[]
62 PHY_ID_MATCH_EXACT(ATH8031_PHY_ID),
63 .name = "Qualcomm Atheros AR8031/AR8033",
64 .flags = PHY_POLL_CABLE_TEST,
65 - .probe = at803x_probe,
66 + .probe = at8031_probe,
67 .config_init = at803x_config_init,
68 .config_aneg = at803x_config_aneg,
69 .soft_reset = genphy_soft_reset,