Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3415943pxb; Sun, 24 Oct 2021 01:29:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAhqgIiTcOWq5gyitLstVkIi3HxFYcUeMwGcHsQakwtN2b++z0qzYytfTD4pOAnkN2W0kp X-Received: by 2002:a17:902:a613:b0:13d:d95c:c892 with SMTP id u19-20020a170902a61300b0013dd95cc892mr10169151plq.35.1635064165903; Sun, 24 Oct 2021 01:29:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635064165; cv=none; d=google.com; s=arc-20160816; b=DPYI4KfjSj3maNzk/9UwiOx6E/DdMhsD9WGQyISC6etUSKVurBEIklJG9V3lBEv6VZ oiDy2SRNjFAP6Bpct3xaqN4zFxOd3weBb2T1r1/ZXUGvaMqMUohDucvPoH9foE3tOO+y QFLxOYyPuJUK+iXwApOW7as4pKxsOGSsNtJHjGGyX+3Pp5v+RhgK6odAucvOGcJKOnKr ZJY/tLuxxzZsqwYN6KlNDpJ/BzmH8KpAEke0xhGFlDuLDUURFjfH4VP+Zsw393cKKfSE cUZr5TExORCy1I8KErlt7Rj6SNNqrxeEdnA0Jnk3oGwGwF0/2DTycDBFW0jRFg+RT4Y2 5htA== 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=oYbLsTRecJ0O1lKyedzII7jkbAIfwZ3R8axUhZnETj4=; b=WNCId4QgbDKSJAZNA3uB/NKRQfpwq3MI/ezpM0TdPRH/U+fJKPL621ucrM3tIV7pnw qAc3h6gUGHUYfDMMyJgAulKid3H2JQ5jQ+mzRfIIRREqotqXsW4IrdaGs0BR5NZ4+Yd1 IOQOwg6ikUZSMx6nZhwoi8RY+CCtirJ55OeA/5i13CrLUCygUl7NhkVTnoGDS+v4R/I9 aTuJ3fSJATR9mJ7qrlDzaTzDXn6r2AXVBnAGcnaUUutpVD0mMIytIWpoTOx0MdGO+gE0 2UFyPkE/pFhWwnse7FXOeojTVBDyMgTYCYrL8+On8Fbno3i++Db711JkA/NmHiZTJT/u xauA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=anuMDexT; 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 n16si962245plf.362.2021.10.24.01.29.10; Sun, 24 Oct 2021 01:29:25 -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=anuMDexT; 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 S231511AbhJXIa2 (ORCPT + 99 others); Sun, 24 Oct 2021 04:30:28 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:29352 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231415AbhJXIa1 (ORCPT ); Sun, 24 Oct 2021 04:30:27 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1635064087; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=oYbLsTRecJ0O1lKyedzII7jkbAIfwZ3R8axUhZnETj4=; b=anuMDexTZYXlguKZimFh5td5l2gox8qTnEJJCZbCIfyNZET+PuTQKPDX/IQdqs7+Ue1dj+lt enVMIjb7bDJjAxR7YpeHjbK4qgLZctEvUs47GzaGBoAglQFXQ5ZVRUO0BwsPuXKOxjOafzE/ GYAGIUvlvnPzgjhWyUth40ilcGI= 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-n02.prod.us-west-2.postgun.com with SMTP id 6175190f5baa84c77bbb11ad (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Sun, 24 Oct 2021 08:27:58 GMT Sender: luoj=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id DD5EAC43635; Sun, 24 Oct 2021 08:27:58 +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 A597BC4338F; Sun, 24 Oct 2021 08:27:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org A597BC4338F 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 v7 02/14] net: phy: at803x: use phy_modify() Date: Sun, 24 Oct 2021 16:27:26 +0800 Message-Id: <20211024082738.849-3-luoj@codeaurora.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211024082738.849-1-luoj@codeaurora.org> References: <20211024082738.849-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 Reviewed-by: Andrew Lunn Reviewed-by: Russell King (Oracle) --- 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 d0f41cdaec75..cf25cd428ffa 100644 --- a/drivers/net/phy/at803x.c +++ b/drivers/net/phy/at803x.c @@ -357,16 +357,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