Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'fix-qca808x-wol-issue'

Luo Jie says:

====================
Fix QCA808X WoL Issue

Restore WoL (Wake-on-LAN) enablement via MMD3 register 0x8012 BIT5 for
the QCA808X PHY. This change resolves the issue where WoL functionality
was not working due to its unintended removal in a previous commit.

Refactor at8031_set_wol() into a shared library to enable reuse of the
Wake-on-LAN (WoL) functionality by the AT8031, QCA807X and QCA808X PHY
drivers.
====================

Link: https://patch.msgid.link/20250704-qcom_phy_wol_support-v1-0-053342b1538d@quicinc.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+31 -28
-27
drivers/net/phy/qcom/at803x.c
··· 26 26 27 27 #define AT803X_LED_CONTROL 0x18 28 28 29 - #define AT803X_PHY_MMD3_WOL_CTRL 0x8012 30 - #define AT803X_WOL_EN BIT(5) 31 - 32 29 #define AT803X_REG_CHIP_CONFIG 0x1f 33 30 #define AT803X_BT_BX_REG_SEL 0x8000 34 31 ··· 861 864 return ret; 862 865 863 866 return at803x_config_init(phydev); 864 - } 865 - 866 - static int at8031_set_wol(struct phy_device *phydev, 867 - struct ethtool_wolinfo *wol) 868 - { 869 - int ret; 870 - 871 - /* First setup MAC address and enable WOL interrupt */ 872 - ret = at803x_set_wol(phydev, wol); 873 - if (ret) 874 - return ret; 875 - 876 - if (wol->wolopts & WAKE_MAGIC) 877 - /* Enable WOL function for 1588 */ 878 - ret = phy_modify_mmd(phydev, MDIO_MMD_PCS, 879 - AT803X_PHY_MMD3_WOL_CTRL, 880 - 0, AT803X_WOL_EN); 881 - else 882 - /* Disable WoL function for 1588 */ 883 - ret = phy_modify_mmd(phydev, MDIO_MMD_PCS, 884 - AT803X_PHY_MMD3_WOL_CTRL, 885 - AT803X_WOL_EN, 0); 886 - 887 - return ret; 888 867 } 889 868 890 869 static int at8031_config_intr(struct phy_device *phydev)
+1 -1
drivers/net/phy/qcom/qca808x.c
··· 633 633 .handle_interrupt = at803x_handle_interrupt, 634 634 .get_tunable = at803x_get_tunable, 635 635 .set_tunable = at803x_set_tunable, 636 - .set_wol = at803x_set_wol, 636 + .set_wol = at8031_set_wol, 637 637 .get_wol = at803x_get_wol, 638 638 .get_features = qca808x_get_features, 639 639 .config_aneg = qca808x_config_aneg,
+25
drivers/net/phy/qcom/qcom-phy-lib.c
··· 115 115 } 116 116 EXPORT_SYMBOL_GPL(at803x_set_wol); 117 117 118 + int at8031_set_wol(struct phy_device *phydev, 119 + struct ethtool_wolinfo *wol) 120 + { 121 + int ret; 122 + 123 + /* First setup MAC address and enable WOL interrupt */ 124 + ret = at803x_set_wol(phydev, wol); 125 + if (ret) 126 + return ret; 127 + 128 + if (wol->wolopts & WAKE_MAGIC) 129 + /* Enable WOL function for 1588 */ 130 + ret = phy_modify_mmd(phydev, MDIO_MMD_PCS, 131 + AT803X_PHY_MMD3_WOL_CTRL, 132 + 0, AT803X_WOL_EN); 133 + else 134 + /* Disable WoL function for 1588 */ 135 + ret = phy_modify_mmd(phydev, MDIO_MMD_PCS, 136 + AT803X_PHY_MMD3_WOL_CTRL, 137 + AT803X_WOL_EN, 0); 138 + 139 + return ret; 140 + } 141 + EXPORT_SYMBOL_GPL(at8031_set_wol); 142 + 118 143 void at803x_get_wol(struct phy_device *phydev, 119 144 struct ethtool_wolinfo *wol) 120 145 {
+5
drivers/net/phy/qcom/qcom.h
··· 172 172 #define AT803X_LOC_MAC_ADDR_16_31_OFFSET 0x804B 173 173 #define AT803X_LOC_MAC_ADDR_32_47_OFFSET 0x804A 174 174 175 + #define AT803X_PHY_MMD3_WOL_CTRL 0x8012 176 + #define AT803X_WOL_EN BIT(5) 177 + 175 178 #define AT803X_DEBUG_ADDR 0x1D 176 179 #define AT803X_DEBUG_DATA 0x1E 177 180 ··· 217 214 u16 clear, u16 set); 218 215 int at803x_debug_reg_write(struct phy_device *phydev, u16 reg, u16 data); 219 216 int at803x_set_wol(struct phy_device *phydev, 217 + struct ethtool_wolinfo *wol); 218 + int at8031_set_wol(struct phy_device *phydev, 220 219 struct ethtool_wolinfo *wol); 221 220 void at803x_get_wol(struct phy_device *phydev, 222 221 struct ethtool_wolinfo *wol);