Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2624176pxb; Sun, 17 Oct 2021 20:49:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrGFp26jynK92VRcgZ84TPh5VXHLIHeSZ3WFy4Zmmq+uweuy72l8A17eNHbSFT+C8wy+Bs X-Received: by 2002:a17:90b:388c:: with SMTP id mu12mr30816847pjb.146.1634528986832; Sun, 17 Oct 2021 20:49:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634528986; cv=none; d=google.com; s=arc-20160816; b=XAydcYYaBVtplssJ+5thWwZG/SjypL0I0YXuSnhA2Xt6diGQxcGPbkR/96uMyNMjMw EN5S8x2JeEdkel1KoupAWul12xpLWuSmcYFuRihH9HkaqkwTkxQ05UPF1VxDQVhusIf8 roB7M3cexdJNfSq6hx9Yvk9jq50QtVGV8AYf14ANzK2jUgDiiQKK+ZczdGwK3YtHW9T8 Wh9CEIqQdcMEdRdULanh4ojZyBhWBxVthK+nOJDIbWpEoTZG3thDridgqOmUAs4HDlvo jkFgZaY2NnAucpYtFxGqZTJZhMbhLvWxJKlUearRVTamssstsFESt0J6CpjJe5i7iWQV 6qAQ== 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=kAntNQHuXNNYiMl1eS0qX1uZ1jRQgpLgR9OVNPkS2Hg=; b=iq29sCxTPcMlXT+DzMKOf2UCsLUhqZnn0IgWP20+oGzlveWwAjxrqXpO9fptEPPtwq jKtyZil/cq5h0aJx262sszcuQwFdkquwQMbVzQiVQOKqBf+9nr6WV1r2MOwZvJeftyWx EsLTJ9ebEKv42qHDY1Ln+KWz9Fqfj2uO5SqrBN8/BrXyomHpZH9CrpNaRmcQoepU9yKQ hNraU4Q2ynhEIotHNoOyH+3d+Az7e+i3WlXx8TyONT/PTUnVQZ6uOMM5xOqBcOEiH6Q5 LcLE91KNCiwx2m+sm9M7v0lwmgrZNbOTuXrIofJuhp67/7mOmetVyXW6Y4OgWCWA07ue gnbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=hBO+labP; 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 il9si31691467pjb.170.2021.10.17.20.49.34; Sun, 17 Oct 2021 20:49:46 -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=hBO+labP; 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 S232020AbhJRDgd (ORCPT + 99 others); Sun, 17 Oct 2021 23:36:33 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:47026 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231674AbhJRDgY (ORCPT ); Sun, 17 Oct 2021 23:36:24 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1634528054; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=kAntNQHuXNNYiMl1eS0qX1uZ1jRQgpLgR9OVNPkS2Hg=; b=hBO+labPFCYrTAw4vCVlhdcpRvQlDvmqqULPqwAayh3vE4XbS/EeKjrx5MBE0jjqVnvF3Scq 24abiLE6RfLGXH8FPdvLgd8jbvZsHXBYO0HtcKtTnAMtuXLbYt7gB4yJnOiWrOoNKvYILrRE tpyZqK8Aw9Yw6aUokKJJDb4U5FU= X-Mailgun-Sending-Ip: 69.72.43.7 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-n06.prod.us-west-2.postgun.com with SMTP id 616ceb2430ce13d2b4e6155e (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Mon, 18 Oct 2021 03:33:56 GMT Sender: luoj=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 2B745C4338F; Mon, 18 Oct 2021 03:33:56 +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 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 88BBCC43616; Mon, 18 Oct 2021 03:33:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org 88BBCC43616 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 v3 02/13] net: phy: at803x: use phy_modify() Date: Mon, 18 Oct 2021 11:33:22 +0800 Message-Id: <20211018033333.17677-3-luoj@codeaurora.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211018033333.17677-1-luoj@codeaurora.org> References: <20211018033333.17677-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 5843b5b742f8..c5e145ff5ec8 100644 --- a/drivers/net/phy/at803x.c +++ b/drivers/net/phy/at803x.c @@ -348,16 +348,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