Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1644152pxb; Fri, 22 Oct 2021 05:09:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwHrX9kI+/vbG/NY3zhjhWeaIet60H1yhtR7foohG9Nt3Yjbo7E7EkzM67ruECphaTCKIs X-Received: by 2002:aa7:ccc1:: with SMTP id y1mr17078715edt.177.1634904583849; Fri, 22 Oct 2021 05:09:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634904583; cv=none; d=google.com; s=arc-20160816; b=taefB/pal4IkgdDEXdhQlx89ZdmrMsqFe5ZSQedI8q6zBhqyQzJtRqQLiXJDNf8KI3 3bXg4fSXFxZN7RHfMxHzcSeyu58WN098Eqnz+zQgMgc+eon6CWL4fj8DqHWQSGFGxosG 8vTL1bHgJcBerUrTlFG2OR9ot6LfmwX4bPDw1u3FvYCSbn7KarMIaW+k7fGBJe8aIVPL NjZYYY0H2wH/J8w+rgj2lewfpRmwwPnF7dxyr5Sc0dDJyvbh0O37l/j9tO3RFL+3NTaq 4aqDM8ALvutmKARxX3DiW4oyTyT1wHuuYuT+zCmOfkycWFmWYxG2DRauPnIypIbvXcPg K/yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dmarc-filter:sender:dkim-signature; bh=ibFY1Z2pXY07PCnKrSdRH2XaZ96MTD3WtO5viDWQU4k=; b=PkdzHoyFKSbXNflfC2RuwFi4bG8NdM2KYlWcvwp9IDP2wRCrqxqpQp56CSvYSmRIcu P/q+PhP1MEa9GfTAOKVaArZ+SXUcYyGRcWz5ISUxBdX6QMgSyAcXZgilnqtJU3KPwSJb CVZIcScJLGDnIn7dZBPvcKfTjbYcSVGo4mPcpwHEezyoGDFNRMsFfKaj2y4/khVpvqwW mGfQijVDPf+zMAwHUbfq7OyFYgOxPyfctzbdNfwnS1eRMen+RpR6NLCZFW43+j0B3P6R h/SckU5NvKIqm6Gs1kxMItNRbf+qNVXrE8t7TdagGvjdSouXWxaNjH6PJQHQfxTviayI sVEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=ZdB2GYas; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q28si4611249edc.596.2021.10.22.05.09.20; Fri, 22 Oct 2021 05:09:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=ZdB2GYas; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231837AbhJVMJh (ORCPT + 99 others); Fri, 22 Oct 2021 08:09:37 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:25723 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231556AbhJVMJT (ORCPT ); Fri, 22 Oct 2021 08:09:19 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1634904422; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=ibFY1Z2pXY07PCnKrSdRH2XaZ96MTD3WtO5viDWQU4k=; b=ZdB2GYash2GDzcF6pykz1md4XmUeLM3LYoMNItvXuHiguiW9v6ZNsZjhL02f2Ou1WwoPNTH7 LwpvKGnZAcbgf46S82R4TxXKz1K9snluYs454dhaubDgaGOmMkCrzTB4OxOCYPiMoAoBAewB WzKLIt4YHtDTMLNuO/wlg7G41hc= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n07.prod.us-west-2.postgun.com with SMTP id 6172a9535ca800b6c18f090c (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 22 Oct 2021 12:06:43 GMT Sender: luoj=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 12B4DC43618; Fri, 22 Oct 2021 12:06:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from akronite-sh-dev02.qualcomm.com (unknown [180.166.53.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: luoj) by smtp.codeaurora.org (Postfix) with ESMTPSA id 51963C4360C; Fri, 22 Oct 2021 12:06:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org 51963C4360C Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=codeaurora.org From: Luo Jie To: andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, kuba@kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, sricharan@codeaurora.org, Luo Jie Subject: [PATCH v4 02/14] net: phy: at803x: use phy_modify() Date: Fri, 22 Oct 2021 20:06:12 +0800 Message-Id: <20211022120624.18069-3-luoj@codeaurora.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211022120624.18069-1-luoj@codeaurora.org> References: <20211022120624.18069-1-luoj@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert at803x_set_wol to use phy_modify. Signed-off-by: Luo Jie --- drivers/net/phy/at803x.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c index b04fb251bacb..19011c16a1da 100644 --- a/drivers/net/phy/at803x.c +++ b/drivers/net/phy/at803x.c @@ -349,16 +349,12 @@ static int at803x_set_wol(struct phy_device *phydev, phy_write_mmd(phydev, MDIO_MMD_PCS, offsets[i], mac[(i * 2) + 1] | (mac[(i * 2)] << 8)); - value = phy_read(phydev, AT803X_INTR_ENABLE); - value |= AT803X_INTR_ENABLE_WOL; - ret = phy_write(phydev, AT803X_INTR_ENABLE, value); + ret = phy_modify(phydev, AT803X_INTR_ENABLE, 0, AT803X_INTR_ENABLE_WOL); if (ret) return ret; value = phy_read(phydev, AT803X_INTR_STATUS); } else { - value = phy_read(phydev, AT803X_INTR_ENABLE); - value &= (~AT803X_INTR_ENABLE_WOL); - ret = phy_write(phydev, AT803X_INTR_ENABLE, value); + ret = phy_modify(phydev, AT803X_INTR_ENABLE, AT803X_INTR_ENABLE_WOL, 0); if (ret) return ret; value = phy_read(phydev, AT803X_INTR_STATUS); -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project