Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp393293pxb; Tue, 19 Oct 2021 05:12:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzF7fQXVY7iIThrdL6FTl9LHQbcXiseA7rkZ9Eav6R52QqaPKR+sRn0ou4kWF76qR5sjq3M X-Received: by 2002:a17:902:a710:b0:13f:bf61:873f with SMTP id w16-20020a170902a71000b0013fbf61873fmr10686124plq.56.1634645539185; Tue, 19 Oct 2021 05:12:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634645539; cv=none; d=google.com; s=arc-20160816; b=uGkOphG9FEB4sOlpav12JqfAH4qZjlYdqDfKskicJnBdx5Or1rDW+t9kfKt1s7/fHX mqbe/fJ5nz2LV6p8bjrKzD7SYD/KTkYOMITvbji7pzcvQ9Cy9G3YU31gxmXmmZltKA1R MTllqd5BjtfrQcUTn0VquQEvifOZvtxaAF0rd7Q5lN2RMPLxBxrBL3kuyiZlqt06jhXA 1wsdERYCHqZssF83IGAGICSiYbV0BImPrLf86JsY0fYyMWZJKqwUXsb0ggxFC+8tXatb d/+lQEdj6zUHz/1aqrU7O6PFzTodHrSvIca4x+YCWZ8qyj9GMVSIxua6NLWOioYYldxV HPuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dmarc-filter:sender:dkim-signature; bh=O7FVZLMXEbadPvhA4YgEjGlorpBuijO+LAt7hL+fQwk=; b=JPnoYcYUG5dHjfoepBzOY85/q1YfkFjnmxJr3XGyd5dHcShAIynmJupihnNGBE1kHg wUZklv5R/sEH/BAvDTyIXJhi3tBLlC7ZXZxsHQJ3QAzMc5HYbhET20PswfFi5WPPsT+r 3N59GBsM9T4jHGKZjaGqMhSFtuXXsafmiBrHJlKXctYbzrf0V9t0lRr4b359NQm177VV BsRqM8fXqBO0d9oL5y5apkdRUBwV1ELw4Da4aWAk1BMIdf2X8qWN57N4dRKBa+HF/s5f s16vOkPoF4uU0rRJ5zkkV+TTQAMpAxPSqs0SKYQqbq1eyVe7dXjZxxgCk+V103SMrIL3 QEdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=sU3zmkmz; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l18si2849842plh.50.2021.10.19.05.12.06; Tue, 19 Oct 2021 05:12:19 -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=sU3zmkmz; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235533AbhJSMM4 (ORCPT + 99 others); Tue, 19 Oct 2021 08:12:56 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:22058 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230267AbhJSMMz (ORCPT ); Tue, 19 Oct 2021 08:12:55 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1634645443; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: MIME-Version: Date: Message-ID: From: References: Cc: To: Subject: Sender; bh=O7FVZLMXEbadPvhA4YgEjGlorpBuijO+LAt7hL+fQwk=; b=sU3zmkmzwVes0EDEVMk9+KtmnXjlGqYGbazKD01hYb3jzk6V4m8urTMJbCrOLGzVx6Mj8XFf HtdUTMv15TwvJvgUfW5A9X8JDNvCDO+pvdxY0ductHA4mpk+pI3UKqLmNRiXxY3b5M5aiNK/ uvceCDqV8jXfpjaexjxMUTzjGTU= 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-n07.prod.us-west-2.postgun.com with SMTP id 616eb5ac5ca800b6c1868adc (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 19 Oct 2021 12:10:20 GMT Sender: quic_luoj=quicinc.com@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 405CCC43618; Tue, 19 Oct 2021 12:10:20 +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=-5.0 required=2.0 tests=ALL_TRUSTED,BAYES_00, NICE_REPLY_A,SPF_FAIL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from [10.92.1.38] (unknown [180.166.53.36]) (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 70E64C4338F; Tue, 19 Oct 2021 12:10:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org 70E64C4338F Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=fail (p=none dis=none) header.from=quicinc.com Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=quicinc.com Subject: Re: [PATCH v3 06/13] net: phy: add qca8081 read_status To: Andrew Lunn , Luo Jie Cc: hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, sricharan@codeaurora.org References: <20211018033333.17677-1-luoj@codeaurora.org> <20211018033333.17677-7-luoj@codeaurora.org> From: Jie Luo Message-ID: <0472b75b-9fd7-55e3-dc1b-f33786643103@quicinc.com> Date: Tue, 19 Oct 2021 20:10:15 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/19/2021 5:42 AM, Andrew Lunn wrote: >> +static int qca808x_read_status(struct phy_device *phydev) >> +{ >> + int ret; >> + >> + ret = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_10GBT_STAT); >> + if (ret < 0) >> + return ret; >> + >> + linkmode_mod_bit(ETHTOOL_LINK_MODE_2500baseT_Full_BIT, phydev->lp_advertising, >> + ret & MDIO_AN_10GBT_STAT_LP2_5G); >> + > Could genphy_c45_read_lpa() be used here? > > Andrew Hi Andrew, Thanks for the comments,  the MDIO_STAT1 of PHY does not follow the standard, bit0~bit6 of MDIO_STAT1 are always 0, genphy_c45_read_lpa can't be used.