From nobody Tue Oct 7 23:15:00 2025 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 6C46011CA9; Fri, 4 Jul 2025 05:31:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751607106; cv=none; b=CcO4+K96yhijSVHm9SQL/gK4x8rkHhkgcQgxI3GBBtGyiB85bhjkzlOvnZSTWj73G0CWRwBjyTiUhQQg0WSWWUuoEu53HbHyoV8QYsexDailkox9DHLuSU12rEEC1pHxqLRF1KCpJMbs8g2H4SjZPZma+rjgWD7I9FYwYQfSPJk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751607106; c=relaxed/simple; bh=PuuAbc8gvzLohHlv8nZClwELwGilHUwLqbnwmvoRMq0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=Wwi2586Slnv2Q9fX2XUyfa7r10Q7MN1/Pwjp33C+OMB+IeGpHesylUSZRmkeoEMn2tnacJelNkwKMMfTHuEXMQZtEXRMSqr22gCh7/SxRO75sFs1sX9HC8edmXjrPm0mP9v/q8xSwAJMDB2tk/XCLNi5bLv5fV46MzeGAxcBerI= 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=lzMgWM2R; arc=none smtp.client-ip=205.220.168.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="lzMgWM2R" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5644Pp1m010383; Fri, 4 Jul 2025 05:31:26 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= COu1AYCYj+BPzIVaYF1rOKTqUQEObh2cMgSVeEtLJMY=; b=lzMgWM2RtC4CRKxV +L78ReWn5GTfvwJLcQuAcAb1L7h1o9cOWDMphk49cRmK2dZMgIe2rk+kKuOvsH/a yPx2VHkIJ8dE9u9XAlFtr2+g70SEI4jUE8CWR20y9vFdF9xeO3VstGFye94c4yt1 d3QwD9fiEn5IAOYN5p2F5fJIpUf4lGjovPbMD15Ug2UE2FzCTlcZsC5Qj9YWU4Kl iwSftAcfMC22kS/xinoyO9yLQv6v3xSsJ/C7xxzsWcfFNAiEt4TGu2BOUHwev4Vz 0BCF/zJTuDUC+dzNZN5sUGcg0ybjP8VTFlgqJpXGoSnYUfDEq8MwomIxuEakYoFC 5p+MaA== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47mw30fpt4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Jul 2025 05:31:26 +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 5645VP9B028770 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 4 Jul 2025 05:31:25 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 22:31:22 -0700 From: Luo Jie Date: Fri, 4 Jul 2025 13:31:13 +0800 Subject: [PATCH RESEND net 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: <20250704-qcom_phy_wol_support-v1-1-053342b1538d@quicinc.com> References: <20250704-qcom_phy_wol_support-v1-0-053342b1538d@quicinc.com> In-Reply-To: <20250704-qcom_phy_wol_support-v1-0-053342b1538d@quicinc.com> To: Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Viorel Suman , Li Yang , "Russell King (Oracle)" , Wei Fang CC: , , , , Luo Jie X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1751607078; l=3830; i=quic_luoj@quicinc.com; s=20250209; h=from:subject:message-id; bh=PuuAbc8gvzLohHlv8nZClwELwGilHUwLqbnwmvoRMq0=; b=OE0IbzfOlbfARcj68vtl9QPYjXX9WmrPtAKyy4Rk1OL8U4QQjKDA/qwa6ZFiscwpKsxMbIp3J TGfcZ08SVOyACHEiZ0EzLl/GWOyU6s4CtqmywJgI9k7AaGso0dNsd6G X-Developer-Key: i=quic_luoj@quicinc.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=CY4I5Krl c=1 sm=1 tr=0 ts=6867672e cx=c_pps a=JYp8KDb2vCoCEuGobkYCKw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=GEpy-HfZoHoA:10 a=IkcTkHD0fZMA:10 a=Wb1JkmetP80A:10 a=P-IC7800AAAA:8 a=COk6AnOGAAAA:8 a=_nt0bXS9cE6sRtUw5vwA:9 a=QEXdDO2ut3YA:10 a=d3PnA9EDa4IxuAV0gXij:22 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-ORIG-GUID: UxuBq9P2zGuqWF3cKWYNIk9epnKtzil2 X-Proofpoint-GUID: UxuBq9P2zGuqWF3cKWYNIk9epnKtzil2 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNzA0MDA0MCBTYWx0ZWRfXy2O0oBdhqk0G 6AjV+z8yJw6ab24YG6og/JmJr5YQwFVLazPtjcDxfbMAT2N7WexDtXiZyhQtWzLBtlXTU9+/KlB 9tB3i1totRI58SCFVOED+BO1NtBtd4wk9/7H2xEyRxhFNu83u8dyVPmm0/+5wNbm4UdG4aAY4a6 cH07IxzznXAPJVWhTZTRh8pntRaVgArjFaenj1Tipj8T3WozczTuDJrt+lRbVQXEalbPqOaM26R NqOVifiNw0/r25na8n9VTYufa2zCyLOdvunxlW7ytOmFl03SWEpvwvUB9H9MDu/xjcQrx7pm0QO iOtY591DuKZrL7S4cjZLaA6OguRqOCFT235SVt5k6Xkfecmv7zifwWD6iy5SMYiVGf+PouCHnbB iivmt4NaepqBok8UtF+g95rRARMSI+cchTyCclgpBTBYH2ziD+FhS7hhLYF9/Eew2McoWith 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-04_02,2025-07-02_04,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxlogscore=999 priorityscore=1501 clxscore=1015 lowpriorityscore=0 mlxscore=0 phishscore=0 suspectscore=0 bulkscore=0 malwarescore=0 impostorscore=0 spamscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2507040040 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(). Reviewed-by: Maxime Chevallier Signed-off-by: Luo Jie --- 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 26350b962890..8f26e395e39f 100644 --- a/drivers/net/phy/qcom/at803x.c +++ b/drivers/net/phy/qcom/at803x.c @@ -26,9 +26,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 @@ -866,30 +863,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 Tue Oct 7 23:15:00 2025 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 5CE2620CCE5; Fri, 4 Jul 2025 05:31:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751607108; cv=none; b=hQUXwfGo26JgRXkpfDuAcuVQ08AJodslDkq5mGzY4t5Kx2eKsvUfyjVm0yOO91idq/5gO4gRPLNuXfgCN/UDMTPNaB1PgSm+Q0JQEdfIps0MUaOIGNdzqG34mNLhZK/dGXqxNxLz2GbiLk0a3kAd7Ln+6V+vVOsI0r8ZdXuNdpk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751607108; c=relaxed/simple; bh=uCJ+CKNkcMrdBKA6492L65E5VwkreHxED9nsiuxODzU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=YNK4d4pzD1cOLZzA2hqHmKgwADDG95UxUFEGdUeYHsKQ+UJjtNzjf7L00Iq+61G6/c1SwqRkx0JDi9Rh91lgTHMd1++C+0Ari1IMhBEQWZtx4s9eXcXpCsJ1e7JYM5MXSMnPDL2Q9JJ1teiNOqJQZzS5kRW5ZSkN5q5e6P5BZVc= 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=VDhnzXqk; arc=none smtp.client-ip=205.220.168.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="VDhnzXqk" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 563MwiVZ022207; Fri, 4 Jul 2025 05:31:30 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=VDhnzXqkBcZjHtG1 q5tm3Y8aqyyRX0arxga3bGbWlGOHYkr6aObmUGp7VXIlI/DPFO1k1Jf+EJ7auJYm ZnAbAkL43xpw44pB77EmLmbFXeKlJ+ca0uTjEFZa/LlXK6h1DKyNpFjKEQKSslWV 9oxhALwYyk1q1DDzvltPBwSWKMUDClvrJK4l+Rp7yCbXRFaKlniW1TjwVyXz0uC5 Eti2suJL+KParkoaapmjG6BBgfBqL9zgwLaZjsQwWbYr6p2N9ivkHPVO3YNsIu5m KRRpWMlTQPCfBJGzPd8ZDaKCH9Ap16QflRw/W0WJu7t2A9ByB9Mb+Fu+2lK4q8CW ywUcew== Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47j7bw2rjh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Jul 2025 05:31:30 +0000 (GMT) Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 5645VTu8027355 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 4 Jul 2025 05:31:29 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 22:31:26 -0700 From: Luo Jie Date: Fri, 4 Jul 2025 13:31:14 +0800 Subject: [PATCH RESEND net 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: <20250704-qcom_phy_wol_support-v1-2-053342b1538d@quicinc.com> References: <20250704-qcom_phy_wol_support-v1-0-053342b1538d@quicinc.com> In-Reply-To: <20250704-qcom_phy_wol_support-v1-0-053342b1538d@quicinc.com> To: Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Viorel Suman , Li Yang , "Russell King (Oracle)" , Wei Fang CC: , , , , Luo Jie X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1751607078; l=1169; i=quic_luoj@quicinc.com; s=20250209; h=from:subject:message-id; bh=uCJ+CKNkcMrdBKA6492L65E5VwkreHxED9nsiuxODzU=; b=EQFrV/1emsqtHWYgNZewLlrssVReA6iqXInix5aDal+bW1cAzxDGjtQIy2sIT4WsdCIz1ZApj W0QSSTZmjteDwKBXSyV8wud5meawfCNN7kGVx4H3ZMog0cJ7Q1dP1SF X-Developer-Key: i=quic_luoj@quicinc.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-Proofpoint-GUID: pI03g9vWKZfctMS8sGhUkcTLPJYEDmZq X-Authority-Analysis: v=2.4 cv=RJCzH5i+ c=1 sm=1 tr=0 ts=68676732 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: pI03g9vWKZfctMS8sGhUkcTLPJYEDmZq X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNzA0MDA0MCBTYWx0ZWRfX5WNQkCmypv1O 1X9v5h1vlh2QKWhWDK0O7HYRjljME69JbX5Q8wgsiOhiC6n6/U1EqIawQ5n3C8C8zs5N0cADmGq ofXONd41woCYSsypyS6tCLMcqYhS+a3+81offtFd+PMLL1CL8HyZSp9B9gVFdAlWqjDSF0R3/NL +qzv7NJEjJm8xI/b0eNVQdOEf8mIEL/rQD7gS0UqUMLVL/n52AJ0R/T472uHpqCo6nIrhotOZVz fDXmasLetF8BlVm3UZvz2viDL6kj5C1FFSztq/pP2Za50hBm36mgWPNxnPktPIoDszZQoNHXn0g gXUi89mEn3wM5PEydhUmIW3yo1iMbUXUXjBviRBegQHP9xhi2Dn/sQOua8TlwHdedLe5YQW18lf iNlAtvTcJAlnpLaMdEj3mGzYw46PphItcg7KuQ2LTAMpjAeNtg8pK/5qsiAPidC0H8fxRcRH 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-04_02,2025-07-02_04,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 impostorscore=0 priorityscore=1501 mlxlogscore=848 adultscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 phishscore=0 bulkscore=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-2507040040 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 Reviewed-by: Maxime Chevallier --- 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 Tue Oct 7 23:15:00 2025 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 66EFE218AAD; Fri, 4 Jul 2025 05:31:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751607111; cv=none; b=Ym2l4f4q6W4kc6s1F+HZZ2HQs71b9VrLfv8Wja0dqfXxPkn4uMOl8Tg0W869lAMyrWSWuyAqFV/atXJAOKXuSfCtcGX694Tsrphk7U4bgOJ8tQxLBAOVlhu8awvXDWwBDU1AQVRluYg757k+bgAWNu2PCzlUm9iLqkd4zot6NdQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751607111; c=relaxed/simple; bh=p57Arrg/ytvCIG/QGXz+S5ndqRcPSjPIJz6EPCT03zg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=OjeU6CQRqpPVaGYTKt+The7HFRc7WCTTj3d4xo0XnrvuA9gJg9bwJKmIOapNGzVnXYJdFN2HYN5HM8SjfLxUsS9/RYdRWlBIlzbWQH6hX3XO1OH6Y0hRsx+VszRPOURN2mONkEJ76kAlD5nrjedStcKISFqlmoSA6so/kZ+mfAY= 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=LUTtABhV; arc=none smtp.client-ip=205.220.168.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="LUTtABhV" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5644NNAS003315; Fri, 4 Jul 2025 05:31:34 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= GTWLOLbKSx1OSGDbXz/uuwviBVxE6OYJ5/9D+yBWLl8=; b=LUTtABhVlCadVMHE aErEXR+HZ0xzHZA2Ih+F3ChJT50opRHTB01iWlFp+hUu07Q+NJrh6nqesQgotVUw lFo81MO924dHB61v2f6ixuXvkbZEcb/l5LeVIQS1IZAOuj3EBINVztfJxiwKolsZ uXCLARzYj4YRqtfbHm9WHKbfN5m8YrZJCkn2Z+IqEakETh19I8LLkQ9jmr5HFPsb ukG//gQnfJ4jUc6lNZJ6QoBQI1g6GRBDz6lReD0wKC2Nqoag4VDK50gKp+Tjzu18 7wieauL0rOLCi5/N4oTrXaJmSnp/KZ6Nb2K8am13XyGRura8ISz+q5hk+D6FoCSb tmvl6w== Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47p7ut03x3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Jul 2025 05:31:33 +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 5645VXOl012707 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 4 Jul 2025 05:31:33 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 22:31:29 -0700 From: Luo Jie Date: Fri, 4 Jul 2025 13:31:15 +0800 Subject: [PATCH RESEND net 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: <20250704-qcom_phy_wol_support-v1-3-053342b1538d@quicinc.com> References: <20250704-qcom_phy_wol_support-v1-0-053342b1538d@quicinc.com> In-Reply-To: <20250704-qcom_phy_wol_support-v1-0-053342b1538d@quicinc.com> To: Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Viorel Suman , Li Yang , "Russell King (Oracle)" , Wei Fang CC: , , , , Luo Jie X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1751607078; l=1220; i=quic_luoj@quicinc.com; s=20250209; h=from:subject:message-id; bh=p57Arrg/ytvCIG/QGXz+S5ndqRcPSjPIJz6EPCT03zg=; b=G/sVnR02VL8gVnomoNMuffAptvEycEbPYpuaJvScL1YR7O1LUc/T1VamclvE77Ylo2MQfu9kn GrQOxEoogEXBY//Y9nEYvmC0mMGTvtVgcdUlORbKZJQEiF04U/Prk98 X-Developer-Key: i=quic_luoj@quicinc.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-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNzA0MDA0MCBTYWx0ZWRfXyfP1o1NqzE+t LnicO3HtLJOdaESoS80P1LF/sue9f3vMJw+SZRvQYbl1BEihKJi9zPBfzr5ztn37HcRfSG9F617 EhLtD4jcYWqCrMWExoB8W6e793Lr+GEysHL4RcHCMuzpsCPIirf6dF1/siJs/h6qVsV4xh4AuJv tq0vVp6CZPeJb+h3+PR4KG3CHauno6VvBotRqcxg+xqh1BDG1v4Rvr0CyHeaMS67xpPoZHoEiXW ajzpm1Ujcubi8Ky83uh0uyTFK5p03j3ReVaNcr+NK296T8mE7ORPuuTpjtJFzUWUOcDrQK3/lNl kWDoNEzGdAEBWk36VxJH087t4V7b1SvIF7EKWp+9yeJICKNYkwYq+WVmLJBZr4OniC18fI7lnd0 3hrI4N6y+FKXmRdQ8YS3whCxbCgr9ylOGvtCN3lejZtHdR1mJNoZjP+6qzrvTYpsm3FbzqfN X-Proofpoint-GUID: sPyUFoCPlIppj0OluhSOinq6yEJzQkth X-Authority-Analysis: v=2.4 cv=Ncfm13D4 c=1 sm=1 tr=0 ts=68676735 cx=c_pps a=JYp8KDb2vCoCEuGobkYCKw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=GEpy-HfZoHoA:10 a=IkcTkHD0fZMA:10 a=Wb1JkmetP80A:10 a=COk6AnOGAAAA:8 a=yGB2eTQ9lww0Q2wdzLUA:9 a=QEXdDO2ut3YA:10 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-ORIG-GUID: sPyUFoCPlIppj0OluhSOinq6yEJzQkth 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-04_02,2025-07-02_04,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 bulkscore=0 clxscore=1015 impostorscore=0 lowpriorityscore=0 suspectscore=0 priorityscore=1501 mlxlogscore=933 spamscore=0 malwarescore=0 adultscore=0 mlxscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2507040040 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 Reviewed-by: Maxime Chevallier --- 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 1af6b5ead74b..f946aa8e92ee 100644 --- a/drivers/net/phy/qcom/qca807x.c +++ b/drivers/net/phy/qcom/qca807x.c @@ -799,6 +799,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), @@ -822,6 +824,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