Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2571709pxb; Sat, 23 Oct 2021 02:57:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFILUpe2NVHcUJMY4VUVbZj1rqhxQXf8tDQgUDpZcztiGiQi3tXl7gt42hPyG/xLCHYlr9 X-Received: by 2002:a17:90a:a581:: with SMTP id b1mr20415982pjq.21.1634983034729; Sat, 23 Oct 2021 02:57:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634983034; cv=none; d=google.com; s=arc-20160816; b=BACYM9/xqndAFfDOTXSHoXeTVA/7VKEgvUdzXcnU8Bz8kWUCXNKDfIh06N0NNxifYa VyLq5NBVHGGvjU5mDkOyDDKxeAAIzfl/xkb1hnxRGyZmofAfWvMIAGOi/Fassr0rbdad pcyGb6XPEAHPJlU43JgNUB4eiEFIJ7YVCMWoKXat4uJgdWSRszBPE6bK46o+cq6ulV5l hVzsoJ2aG2SXha8HsyILQIJLukKg00SpgBQxB9s6x11q63OZ+Oet/migxgJCr+/LeBTw +9siW3UAb5vmM58wIyWU1pv66bY3+ekHYClkzP9D8OtoEuArN5f4FjGMBQKKGlp1VPw6 8LhA== 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=8SWStl1eruJOMlZRMmEScVhxwe++GVfLSFXUSWnyJ7w=; b=oHi99RJmshNxASuce0v8fURl3vB9WMn2tYfWkpMTXlsPo8pfa6pCeU0LKWOLmM2Msk XMIfKqtbFyC3GzovkTnsX+SwtDouRQfcVC0AoNOJ6IaiPgRkMpLCqFXEZGN3L9xV8F17 pw+UhT3pi+OROwD9lYPJK1YNe2WD3adopr6J1mZsxxUNHNfauETDBz1Dkgj3Zd32C6kq SbidzZKbcQur45RO9gQsojCYIHw8/p0NG1f3sIq8oeNjgbVNXZs6xSIaZxj2cxTyE+4h mMr63du7NW/X4ZcXIl1m+eC8KO3BZ/kTCOtjN0BQSTCzHZ1IHYAMJLCOPMnV19ikUH0c 4KWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=qZ1oTDfG; 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 u11si722528pjj.189.2021.10.23.02.56.59; Sat, 23 Oct 2021 02:57:14 -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=qZ1oTDfG; 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 S232116AbhJWJ6B (ORCPT + 99 others); Sat, 23 Oct 2021 05:58:01 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:63274 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231574AbhJWJ5q (ORCPT ); Sat, 23 Oct 2021 05:57:46 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1634982927; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=8SWStl1eruJOMlZRMmEScVhxwe++GVfLSFXUSWnyJ7w=; b=qZ1oTDfG0z0HjG6Ro9z+0DxpiFPlcaT7EZF2EsS+v930X1QBFwJWABo6vwG+/XDz2V87nB4i n+ioQxc+SMe9hj1podviKBMO7Bbeh1IQiw6C0ZkHomNJ5KxATgmSZ6fQlxi80h25QU4tOQDR Isna88+BzWe5gPYOM6kOjGd7f1o= 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-n01.prod.us-east-1.postgun.com with SMTP id 6173dc0559612e01009f1be5 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Sat, 23 Oct 2021 09:55:17 GMT Sender: luoj=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 811C4C4314B; Sat, 23 Oct 2021 09:55:16 +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 3ADA5C43637; Sat, 23 Oct 2021 09:55:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org 3ADA5C43637 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 v6 02/14] net: phy: at803x: use phy_modify() Date: Sat, 23 Oct 2021 17:54:41 +0800 Message-Id: <20211023095453.22615-3-luoj@codeaurora.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211023095453.22615-1-luoj@codeaurora.org> References: <20211023095453.22615-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 --- 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