From nobody Wed Oct 8 00:44:37 2025 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 39DF82E3AFF; Thu, 3 Jul 2025 12:14:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751544899; cv=none; b=i5zeX9KEAmkVwRobq60F8fYG4QMj0NtuKzT1kJVXIIKThbhGiPNo+oC3Tcxozg6XqKxZ67wBaLFTB8q8MubyBie2fdSuHE0n1M0hAoUaBKZpOSx1XTzrhH4ZRVjbIvf+Bn7X1qpwqYsC3fv5xAAEQzLUd2uuIZcEcIaIxfT3VzE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751544899; c=relaxed/simple; bh=Wry0WOWGUuKjqxJHJc64nYIagLBcxZ+O8R0+ylovNQU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=dQEfAydqZ597w8NaeoPWGH7BoeloPql6dWF2peV+wLv17g7YG0OTxsvzos/qLpoM6rEjRzW68lqsJuyndfcZR7kP/m7+K4cPToz16rL9gsA9rRyxSzh9OxA4aPxYPmMt6rj+zStZ7T/SEW1izfcSYVNR63knStRzqwg6xqaKWcQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=IKdwTdvu; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="IKdwTdvu" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 563B8sVp025180; Thu, 3 Jul 2025 12:14:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 2uqyRLg0iW69d7i3Rn1FEm6miIh83Z7StHixR42+gHI=; b=IKdwTdvuEqmxZIWm mjKosBZ59hy4ik7Rcl5TDXQ7DXAqQp6xCuehNPj89rBHY2OKRT3yJE9IkfaAhYwK dBALElIffJ7IPATftNJxZlYbZy9+6OSqCygwtwLHmsEVTw/n9sFrWf2wmPT+tOGv 1ASzjUdTTeVklsiLdpfL3h/Nq/C2/4Xcyr5OFWc6KjaPEM7H8x+y3haKSPt/2typ z4gPDXprZsoyiKx7/Y2ByEkzs6aAE8iZy2L8o+vFhuXcHEZO94uG0BbUwijD2yyD /fibo1C4Se3iuVUXv8BxDwqEQMLTFOH50AGMepdvlK01KedIrQzYu2OZl7Au5/qI tgmBYA== Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47kd64wg9j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 03 Jul 2025 12:14:45 +0000 (GMT) Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA03.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 563CEidg031556 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 3 Jul 2025 12:14:44 GMT Received: from nsssdc-sh01-lnx.ap.qualcomm.com (10.80.80.8) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Thu, 3 Jul 2025 05:14:40 -0700 From: Luo Jie Date: Thu, 3 Jul 2025 20:14:28 +0800 Subject: [PATCH net-next 1/3] net: phy: qcom: move the WoL function to shared library Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20250703-qcom_phy_wol_support-v1-1-83e9f985b30a@qti.qualcomm.com> References: <20250703-qcom_phy_wol_support-v1-0-83e9f985b30a@qti.qualcomm.com> In-Reply-To: <20250703-qcom_phy_wol_support-v1-0-83e9f985b30a@qti.qualcomm.com> To: Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "Russell King (Oracle)" , Viorel Suman , Li Yang , Wei Fang CC: , , , Luo Jie , Luo Jie X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1751544877; l=3766; i=luoj@qti.qualcomm.com; s=20250209; h=from:subject:message-id; bh=Wry0WOWGUuKjqxJHJc64nYIagLBcxZ+O8R0+ylovNQU=; b=nDy/pEt5EK/t2SzDVUTKsNdtMMxeBRCCnxn7PC3gYNW+e0C+NT1HxjA/A4MgjaBOK8OiEnoEV rx06DDwHv6qDEzH6tD+UttrTeVry+MyRWdb1o4PmhpDHd+Ysh0PxZv2 X-Developer-Key: i=luoj@qti.qualcomm.com; a=ed25519; pk=pzwy8bU5tJZ5UKGTv28n+QOuktaWuriznGmriA9Qkfc= X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Authority-Analysis: v=2.4 cv=Z+PsHGRA c=1 sm=1 tr=0 ts=68667435 cx=c_pps a=JYp8KDb2vCoCEuGobkYCKw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=GEpy-HfZoHoA:10 a=IkcTkHD0fZMA:10 a=Wb1JkmetP80A:10 a=COk6AnOGAAAA:8 a=_nt0bXS9cE6sRtUw5vwA:9 a=QEXdDO2ut3YA:10 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNzAzMDEwMSBTYWx0ZWRfX/pSvrK9qb+T9 TzpPQxWphE/bp4TMJRAgFe9iBreE7DaAxQUm7/2tTbfGPsQBS1WkDIIkDei46qlkFem3N+gt4c5 S+ckkG7Dqi1poThYAvZv3DvnAUq994igNWOPJRCgQ/tGnqtdDvg+94nUwSyQj4LbM/B8Bk+J4xH U9O13gMVdw1qucbhIin2Atbh75A+3HFeND++9JD7/lb8Tpi52+efgMt3d+aH4Io+Gn2m9/G3o6y 4Ipz1SnOGnOOmxo+XTVxK2KEnPWkz5UUVNGRuor0yYsWxdRX0AMIDoW6DOCTdceTfguApuwesJm +AZclrrnhnqt400mv7j/MeSOQyB2oaTl98neotUAt2ILgUr7/uGY1oJc98SqLOuKXYwiT2zAsrN +I5g4g97j8VaCrxsYsbXl3hZBEBT5yepFSLFZ4GDbOBovlUcZBBrUxiC9VPjV7DRG4aH8W+a X-Proofpoint-GUID: xXVD1tePrIhgNGm_8BvgNnQ9OfW0sOaz X-Proofpoint-ORIG-GUID: xXVD1tePrIhgNGm_8BvgNnQ9OfW0sOaz X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.7,FMLib:17.12.80.40 definitions=2025-07-03_03,2025-07-02_04,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 clxscore=1011 malwarescore=0 mlxlogscore=999 spamscore=0 adultscore=0 mlxscore=0 priorityscore=1501 bulkscore=0 impostorscore=0 suspectscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2507030101 Move the WoL (Wake-on-LAN) functionality to a shared library to enable its reuse by the QCA808X PHY driver, incorporating support for WoL functionality similar to the implementation in at8031_set_wol(). Signed-off-by: Luo Jie Reviewed-by: Maxime Chevallier --- drivers/net/phy/qcom/at803x.c | 27 --------------------------- drivers/net/phy/qcom/qcom-phy-lib.c | 25 +++++++++++++++++++++++++ drivers/net/phy/qcom/qcom.h | 5 +++++ 3 files changed, 30 insertions(+), 27 deletions(-) diff --git a/drivers/net/phy/qcom/at803x.c b/drivers/net/phy/qcom/at803x.c index 43e604171828..51a132242462 100644 --- a/drivers/net/phy/qcom/at803x.c +++ b/drivers/net/phy/qcom/at803x.c @@ -27,9 +27,6 @@ =20 #define AT803X_LED_CONTROL 0x18 =20 -#define AT803X_PHY_MMD3_WOL_CTRL 0x8012 -#define AT803X_WOL_EN BIT(5) - #define AT803X_REG_CHIP_CONFIG 0x1f #define AT803X_BT_BX_REG_SEL 0x8000 =20 @@ -916,30 +913,6 @@ static int at8031_config_init(struct phy_device *phyde= v) return at803x_config_init(phydev); } =20 -static int at8031_set_wol(struct phy_device *phydev, - struct ethtool_wolinfo *wol) -{ - int ret; - - /* First setup MAC address and enable WOL interrupt */ - ret =3D at803x_set_wol(phydev, wol); - if (ret) - return ret; - - if (wol->wolopts & WAKE_MAGIC) - /* Enable WOL function for 1588 */ - ret =3D phy_modify_mmd(phydev, MDIO_MMD_PCS, - AT803X_PHY_MMD3_WOL_CTRL, - 0, AT803X_WOL_EN); - else - /* Disable WoL function for 1588 */ - ret =3D phy_modify_mmd(phydev, MDIO_MMD_PCS, - AT803X_PHY_MMD3_WOL_CTRL, - AT803X_WOL_EN, 0); - - return ret; -} - static int at8031_config_intr(struct phy_device *phydev) { struct at803x_priv *priv =3D phydev->priv; diff --git a/drivers/net/phy/qcom/qcom-phy-lib.c b/drivers/net/phy/qcom/qco= m-phy-lib.c index d28815ef56bb..af7d0d8e81be 100644 --- a/drivers/net/phy/qcom/qcom-phy-lib.c +++ b/drivers/net/phy/qcom/qcom-phy-lib.c @@ -115,6 +115,31 @@ int at803x_set_wol(struct phy_device *phydev, } EXPORT_SYMBOL_GPL(at803x_set_wol); =20 +int at8031_set_wol(struct phy_device *phydev, + struct ethtool_wolinfo *wol) +{ + int ret; + + /* First setup MAC address and enable WOL interrupt */ + ret =3D at803x_set_wol(phydev, wol); + if (ret) + return ret; + + if (wol->wolopts & WAKE_MAGIC) + /* Enable WOL function for 1588 */ + ret =3D phy_modify_mmd(phydev, MDIO_MMD_PCS, + AT803X_PHY_MMD3_WOL_CTRL, + 0, AT803X_WOL_EN); + else + /* Disable WoL function for 1588 */ + ret =3D phy_modify_mmd(phydev, MDIO_MMD_PCS, + AT803X_PHY_MMD3_WOL_CTRL, + AT803X_WOL_EN, 0); + + return ret; +} +EXPORT_SYMBOL_GPL(at8031_set_wol); + void at803x_get_wol(struct phy_device *phydev, struct ethtool_wolinfo *wol) { diff --git a/drivers/net/phy/qcom/qcom.h b/drivers/net/phy/qcom/qcom.h index 4bb541728846..7f7151c8baca 100644 --- a/drivers/net/phy/qcom/qcom.h +++ b/drivers/net/phy/qcom/qcom.h @@ -172,6 +172,9 @@ #define AT803X_LOC_MAC_ADDR_16_31_OFFSET 0x804B #define AT803X_LOC_MAC_ADDR_32_47_OFFSET 0x804A =20 +#define AT803X_PHY_MMD3_WOL_CTRL 0x8012 +#define AT803X_WOL_EN BIT(5) + #define AT803X_DEBUG_ADDR 0x1D #define AT803X_DEBUG_DATA 0x1E =20 @@ -215,6 +218,8 @@ int at803x_debug_reg_mask(struct phy_device *phydev, u1= 6 reg, int at803x_debug_reg_write(struct phy_device *phydev, u16 reg, u16 data); int at803x_set_wol(struct phy_device *phydev, struct ethtool_wolinfo *wol); +int at8031_set_wol(struct phy_device *phydev, + struct ethtool_wolinfo *wol); void at803x_get_wol(struct phy_device *phydev, struct ethtool_wolinfo *wol); int at803x_ack_interrupt(struct phy_device *phydev); --=20 2.34.1 From nobody Wed Oct 8 00:44:37 2025 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 031C52E6D0D; Thu, 3 Jul 2025 12:15:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751544903; cv=none; b=GurSPxWpWOjanma0E1MAwjnSBDyNg/DqikA/UTTipH4OuUIzgwyerUFnoeU12GS+LUqClz1fxtRWrPHT/uI8x19wQ9ToAvHqU5mGhV2bQTgc1SL40I1Z2OHJBBdRKZcUR87BGIa2l2OAGHzS0zPt8tN8ifYKGRvxHF3FDvoGp7U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751544903; c=relaxed/simple; bh=uCJ+CKNkcMrdBKA6492L65E5VwkreHxED9nsiuxODzU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=nMimuo77L2LBvWAPcd2JBrgAIfYMZFMT7QSLbyc+5StggiPyu3fbxlGnsvZimFsiAc6R7RtjI65Ilud2bZLKgG06a6Fm5K5FdFQBY5wdzq0k07rOQ1SrHUXl5h25zA8Z4t6hHES6YjfFMYk/+zDLHJj4onMazJP/2x+P+AqBM/0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=ihX6FDtZ; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="ihX6FDtZ" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 563AsexZ032762; Thu, 3 Jul 2025 12:14:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= L6Z8OKqeZuaOwvi35dbacGVDIyKHA6hEBwyM876w3RU=; b=ihX6FDtZQlEW29ti KS4tBjaDLn0ai5lbNuAbO5uuyPigodP+wwgEuBY5nlXGImW/Yjqtm4ZxzjEqcFRo KObffwls4muJ6VMwSgzlESeWjFgyNn2NCcjW/68Eqh/++g/3hmd5cDcc0vax1y5t QKwCDR3L9wHmsa3kGweLfwEO+DGaH7lkClxwDfFWW12Csh2BnkGWa5lbVLLfaNsL oBlh5fqnhxaw1Spc+Mht4tST8XPBnyKvh4E8NDfZm8Loy9Xl74uXACsNBjS8hhbo mP+QIFU0tBkhiB8p3mg4u2StOwQBk0dUBXwOHtBBznuMByp++Metn013xZn7Huly lyiVfQ== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47j7qmg9f2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 03 Jul 2025 12:14:49 +0000 (GMT) Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA01.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 563CEmTq002557 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 3 Jul 2025 12:14:48 GMT Received: from nsssdc-sh01-lnx.ap.qualcomm.com (10.80.80.8) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Thu, 3 Jul 2025 05:14:44 -0700 From: Luo Jie Date: Thu, 3 Jul 2025 20:14:29 +0800 Subject: [PATCH net-next 2/3] net: phy: qcom: qca808x: Fix WoL issue by utilizing at8031_set_wol() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20250703-qcom_phy_wol_support-v1-2-83e9f985b30a@qti.qualcomm.com> References: <20250703-qcom_phy_wol_support-v1-0-83e9f985b30a@qti.qualcomm.com> In-Reply-To: <20250703-qcom_phy_wol_support-v1-0-83e9f985b30a@qti.qualcomm.com> To: Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "Russell King (Oracle)" , Viorel Suman , Li Yang , Wei Fang CC: , , , Luo Jie , Luo Jie X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1751544877; l=1169; i=luoj@qti.qualcomm.com; s=20250209; h=from:subject:message-id; bh=uCJ+CKNkcMrdBKA6492L65E5VwkreHxED9nsiuxODzU=; b=a0WabVbzbP5kK9grTrlkGLzVIJXDyF/KIuszHB1rQ3S0HAhbwrMSUYqToOfoAoVfAvDfy7fId WvoEpw5+o6sBAbEOwiKUMCwzj9pcUfsuei++60htjCpapvU4OURIZFe X-Developer-Key: i=luoj@qti.qualcomm.com; a=ed25519; pk=pzwy8bU5tJZ5UKGTv28n+QOuktaWuriznGmriA9Qkfc= X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Authority-Analysis: v=2.4 cv=C4TpyRP+ c=1 sm=1 tr=0 ts=68667439 cx=c_pps a=JYp8KDb2vCoCEuGobkYCKw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=GEpy-HfZoHoA:10 a=IkcTkHD0fZMA:10 a=Wb1JkmetP80A:10 a=COk6AnOGAAAA:8 a=ETsMY3Suay4yqmZ1JtkA:9 a=QEXdDO2ut3YA:10 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-ORIG-GUID: QEgxGHWFmFDXn3ZNAJmwseB8Av7_ZX56 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNzAzMDEwMSBTYWx0ZWRfX6FbF2tjpT6Lg +q6iuCQFGHBl1eODJBX0nfKEioclZVvSEdmnW5+UH2/lhdgn75EfemZUDrJ7+CP0KygMvS1KYXN 5ouWwf7FHeeqPTQ1o7bxa/hsNbPqqvUDRgASlafipRmB1y4VJYSNc6S68wQZpZMlqYd01EVk599 60xM3y+4WXGYs7/LXfIE84e1etqR9he2rdlOSlpVhWexGMzg9g5hllk17dBmUXBM4kEYIfPaWNW xzL01iHUBSwdEGj7dQ9Lr7l3cckJRASxU15EvwkHUD0Cq1d40BwtdNDAWyz966fFUTKG+JckQdF OdycLbCAPabzCPLIsKVbgpV5ts/6kpCd7bI4lJKja48L9nf9t7aZHZVBGCp6jNI5Io1MEjL13BZ nr8NLBB1Bh4Gkt3Nu09iY278R3908Y4gl2zjQwyZnDS0aSD3VjgHPe0odKlqeC5+XMhcmS2i X-Proofpoint-GUID: QEgxGHWFmFDXn3ZNAJmwseB8Av7_ZX56 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.7,FMLib:17.12.80.40 definitions=2025-07-03_03,2025-07-02_04,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 suspectscore=0 bulkscore=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 spamscore=0 mlxscore=0 mlxlogscore=843 adultscore=0 malwarescore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2507030101 The previous commit unintentionally removed the code responsible for enabling WoL via MMD3 register 0x8012 BIT5. As a result, Wake-on-LAN (WoL) support for the QCA808X PHY is no longer functional. The WoL (Wake-on-LAN) feature for the QCA808X PHY is enabled via MMD3 register 0x8012, BIT5. This implementation is aligned with the approach used in at8031_set_wol(). Fixes: e58f30246c35 ("net: phy: at803x: fix the wol setting functions") Signed-off-by: Luo Jie --- drivers/net/phy/qcom/qca808x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/qcom/qca808x.c b/drivers/net/phy/qcom/qca808x.c index 71498c518f0f..6de16c0eaa08 100644 --- a/drivers/net/phy/qcom/qca808x.c +++ b/drivers/net/phy/qcom/qca808x.c @@ -633,7 +633,7 @@ static struct phy_driver qca808x_driver[] =3D { .handle_interrupt =3D at803x_handle_interrupt, .get_tunable =3D at803x_get_tunable, .set_tunable =3D at803x_set_tunable, - .set_wol =3D at803x_set_wol, + .set_wol =3D at8031_set_wol, .get_wol =3D at803x_get_wol, .get_features =3D qca808x_get_features, .config_aneg =3D qca808x_config_aneg, --=20 2.34.1 From nobody Wed Oct 8 00:44:37 2025 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CEFBE267B12; Thu, 3 Jul 2025 12:15:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751544906; cv=none; b=otRr6cl69efoA/IeLcjAKVNtL2AH1eaY1Z3BofFnPbVlAONONGyEzj+S7aNNB+BD/dCIKsMemGCLQS1GmBxqunt7Y/z/g5bz+ruXNFFyM1n7cDbfqpkoXjilpf/X2VYrduiAzDwPg9sjHHp4smS9GwVdGgCmT4ie7OEzp4eNOYw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751544906; c=relaxed/simple; bh=znkiTjJY1Wna6CHiSz2nbiBHjc8XbxCkETx4Bdz4AgA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=jf5iJTfwRdnaFgH+W24QAVnrDzuvKbRkUcPwG6P/6kykR+QYz7hxk/ZTxfJ7/01423rj7Z25DNFRR8kfqMsHFmq0X4RYzbT5p4ifkvsPKUmywBjjGeCIM/O4yVF7ma2iQ+no9Y/Tf43RiVQENuhfBG134NwWlGWre28rD0KHJM0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=i3QMsxOZ; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="i3QMsxOZ" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5639rPua025364; Thu, 3 Jul 2025 12:14:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= RcmifybW7d9qXd6ESCZbzawnMpxG9vDurMtNEO1cMLY=; b=i3QMsxOZghQOieTq CSXrRJAQ3uTzBg9NCCVbe7pFg33SNSbA+btpkW38dZV4VIZS0rjFqNlTvl0jFX7d mC18CMDQD9t0UJ92HxN7yqZ8PhdZBlSNtEArd3dGAzzP4bdJGyly2VtHATJkFHie zHgE/qDzekZQRz2iid1grDEPGqV+f/TjCTahsvYVFOnHt7VhAR4iWpNL/dKdx4zQ zvMNx6ic8189KjPLw6qv8L1PDLfT2X22eUucL25lR+/w7YpjPt8GSxol3d4gsZ6D R6HlvzujMFpyknVhugRFmIDPTlnPcU3RLR4RxykL04YU/tg90kV0k4J4gj6KhYmW eV3Hlw== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47kd64wga5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 03 Jul 2025 12:14:52 +0000 (GMT) Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA04.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 563CEpIE016453 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 3 Jul 2025 12:14:51 GMT Received: from nsssdc-sh01-lnx.ap.qualcomm.com (10.80.80.8) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Thu, 3 Jul 2025 05:14:48 -0700 From: Luo Jie Date: Thu, 3 Jul 2025 20:14:30 +0800 Subject: [PATCH net-next 3/3] net: phy: qcom: qca807x: Enable WoL support using shared library Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20250703-qcom_phy_wol_support-v1-3-83e9f985b30a@qti.qualcomm.com> References: <20250703-qcom_phy_wol_support-v1-0-83e9f985b30a@qti.qualcomm.com> In-Reply-To: <20250703-qcom_phy_wol_support-v1-0-83e9f985b30a@qti.qualcomm.com> To: Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "Russell King (Oracle)" , Viorel Suman , Li Yang , Wei Fang CC: , , , Luo Jie X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1751544877; l=1220; i=luoj@qti.qualcomm.com; s=20250209; h=from:subject:message-id; bh=5PXRA/G1MHktsR7fiCtdAeiJUZmo8zISN6T6laArEwM=; b=vcTaXLb8f/7HoPq0mHHCL1fCSjwbWOZAM3csFY0+kASEDggK2hy6j/AgeXBQtEzRb7hok6Hqt mkRsvBQJGXoDPwfC0PPoX+yQdrVGEtspD3MEErVoNal3+g9SkeHdTkk X-Developer-Key: i=luoj@qti.qualcomm.com; a=ed25519; pk=pzwy8bU5tJZ5UKGTv28n+QOuktaWuriznGmriA9Qkfc= X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Authority-Analysis: v=2.4 cv=Z+PsHGRA c=1 sm=1 tr=0 ts=6866743c cx=c_pps a=JYp8KDb2vCoCEuGobkYCKw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=GEpy-HfZoHoA:10 a=IkcTkHD0fZMA:10 a=Wb1JkmetP80A:10 a=EUspDBNiAAAA:8 a=yGB2eTQ9lww0Q2wdzLUA:9 a=QEXdDO2ut3YA:10 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNzAzMDEwMSBTYWx0ZWRfX+eUyKGZ/e4D1 Z/gK+C1I+B5+kZD7kFC+r4Vp5uZPu4Ggc6d02uC0jj9YGpSKzeO8OVM1KucInGlUItEL/grGYPS clF18XWwfmKBJrqV0MKKTMJ+/Wa47Mt9jfAzU/GczoVg4PI2g9zc9MgT/YFbScOBrUTiA6mERwR R1brv6IN7zPnGhdYyKssWf3bXuvq6eWQl3c5LFroehXMoTmRHm2NaOkIjmGhnxIfBAzCJTrdY3E B0ffQ1LoDOVteT/TNaDdCAjTM1GOUiTYhx4S/+Dv2TfMsUCJrDLHvpnevgU2ZfeONNZmssIaDCr XS0YDRzdL59pBHU7a9/IXyNm2rLJhCqpCvqQnPrXLh5ApOUG5oBtIsVGqLFpI2PIJjaEaLmX96Z tx7CnMvTdCdy1CIPaoBzXeWCkBQuiOCCt3p1lMcpK/Yty08QnzSDUWF+rqMycAluKmbPgBef X-Proofpoint-GUID: Q-UhrGkY8BmpHCBfSvLM1kOnEy8O63Vk X-Proofpoint-ORIG-GUID: Q-UhrGkY8BmpHCBfSvLM1kOnEy8O63Vk X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.7,FMLib:17.12.80.40 definitions=2025-07-03_03,2025-07-02_04,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 clxscore=1015 malwarescore=0 mlxlogscore=897 spamscore=0 adultscore=0 mlxscore=0 priorityscore=1501 bulkscore=0 impostorscore=0 suspectscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2507030101 From: Luo Jie The Wake-on-LAN (WoL) functionality for the QCA807x series is identical to that of the AT8031. WoL support for QCA807x is enabled by utilizing the at8031_set_wol() function provided in the shared library. Signed-off-by: Luo Jie --- drivers/net/phy/qcom/qca807x.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/phy/qcom/qca807x.c b/drivers/net/phy/qcom/qca807x.c index 6d10ef7e9a8a..40064d820821 100644 --- a/drivers/net/phy/qcom/qca807x.c +++ b/drivers/net/phy/qcom/qca807x.c @@ -800,6 +800,8 @@ static struct phy_driver qca807x_drivers[] =3D { .suspend =3D genphy_suspend, .cable_test_start =3D qca807x_cable_test_start, .cable_test_get_status =3D qca808x_cable_test_get_status, + .set_wol =3D at8031_set_wol, + .get_wol =3D at803x_get_wol, }, { PHY_ID_MATCH_EXACT(PHY_ID_QCA8075), @@ -823,6 +825,8 @@ static struct phy_driver qca807x_drivers[] =3D { .led_hw_is_supported =3D qca807x_led_hw_is_supported, .led_hw_control_set =3D qca807x_led_hw_control_set, .led_hw_control_get =3D qca807x_led_hw_control_get, + .set_wol =3D at8031_set_wol, + .get_wol =3D at803x_get_wol, }, }; module_phy_driver(qca807x_drivers); --=20 2.34.1