Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2350867pxb; Fri, 22 Oct 2021 20:29:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3OwJu/dMGRDnoMvE8d4ZHXlCp/NeDgO99RSaqLcORjZotcsWBA6RdGN02MX2/vQ7V5L+Q X-Received: by 2002:a05:6402:1941:: with SMTP id f1mr5234357edz.163.1634959760584; Fri, 22 Oct 2021 20:29:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634959760; cv=none; d=google.com; s=arc-20160816; b=Sj2AgHrYtzI+mS9M8Gik0jNlX1BEJx58BXBsV+6z2lh5TW4ByjVUzjgo69B9rqKccG hxIzFDwP7G+auJwS9DYdtnR9TEdPOIXiaV9/o8X1zt0EFfGhzNWdxJ5dkWYIA0g+t9L9 y4vJ3o0Mjm6mXxBl5yPMchAtRyLWpkS1qP8fRVoGyRFO0zeB++HVuJOTTz4Agi0wO/Vd eR2+21XYXmQlw92YLNp8O2zVd//zTM5VCzvOnkeEdDYc/3E2lC9qS/DFDSqNX1ZUHCZ9 X5rCNl+Bk+KQhlmM0DhHsQm6xOz4c5tKGL5eCCO0KVFS5A2o4XtPg/FrWpKokBQYTW2F 8sbQ== 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=iL5oPbWksXEVrldrO4+G8pNtHxXjaxfkvSxlz1HHHJo=; b=cRbry3Ds9b1wLqE+TgxXE6p2jc+jGCWGWD1GZefxUUgZ5g5frlENqV9yoqihZVaXnh belQKWJ112LijzZb9w1/z+/WeN5yKPr59lZcaohdBGS0/e5QR+hLqstItjPABAW1tfAx mkNqK+Lt4bit+7lRal1Ao3FQ5AiADz+0HoyqbWL1ph5dN4gBqjtn00dPHfAD9VyhFBV1 3WtXqBynj6o5bmAZvyf1ZnxMWc0xeBQBAJr/DVfh1jV0Z7MpkozPrxhSoPnJN47uXZWA SkBq3dqBj0Pus0xi7goDiVHRzfwg2MS/v6qYiFfkWn+UNOS6aLxT1xlA8hcG410eDm/w Ifvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=G25aKDB1; 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 j7si13786011ejm.314.2021.10.22.20.28.26; Fri, 22 Oct 2021 20:29:20 -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=G25aKDB1; 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 S231236AbhJWD1E (ORCPT + 99 others); Fri, 22 Oct 2021 23:27:04 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:26335 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230393AbhJWD0v (ORCPT ); Fri, 22 Oct 2021 23:26:51 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1634959473; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=iL5oPbWksXEVrldrO4+G8pNtHxXjaxfkvSxlz1HHHJo=; b=G25aKDB1ZBNKh8zjKLMYa1GtOl52SK+2LW59bhdGFh6Tq3CawpzZBl1y7VF4SSu0VGburko7 Gqv/5AbwwobFX3w3Q5yGzjJURg3TqMGO66SVjOesqn1O2f+cSkQYVSWxuSO/3fOCyiFQpjGr fFdQ2R+FFJ6y2J9Njjls8xrsieQ= 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 6173806e5baa84c77b00e96f (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Sat, 23 Oct 2021 03:24:30 GMT Sender: luoj=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 7212CC4338F; Sat, 23 Oct 2021 03:24:30 +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 5F538C43460; Sat, 23 Oct 2021 03:24:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org 5F538C43460 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 v5 02/14] net: phy: at803x: use phy_modify() Date: Sat, 23 Oct 2021 11:24:00 +0800 Message-Id: <20211023032412.30479-3-luoj@codeaurora.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211023032412.30479-1-luoj@codeaurora.org> References: <20211023032412.30479-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 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