Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp423505pxb; Tue, 19 Oct 2021 05:49:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypjL5p3TRqoMKWTwujNmsGEDZsdSiMI+qR3E1/HORw7k/rRinS6J5xssDNn8+3qWmR+QOB X-Received: by 2002:a62:3387:0:b0:44d:7ec:906a with SMTP id z129-20020a623387000000b0044d07ec906amr35871392pfz.69.1634647794789; Tue, 19 Oct 2021 05:49:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634647794; cv=none; d=google.com; s=arc-20160816; b=YqUOo+rae39WBekvM9hwXgvvehyb695EgNMY/Y2bLPIUhagqV30aLN6YzYxj9W2WyR TZ/7WzBGNP8YOLyaerbHqItnJ+BRhDyv8iujmgus2aXyY2K8kjmUljv7mT1VldnIKiE+ XupADTM47WktUsjWhwmMblnfW7AuY0bnzTFBtfEBTdTOOuzsLAiLwPm1icuCgbOnQyWj YSlP4GfAgtMoIGVpZmRWCkDJy7EkV8BPVPBMDJ6thc7iCrPCjkjSLu+Lwc2cMopCPpqr PQI5sIpmm7yTZNaN0w9aM5z/kG3Ubf8fKvf0Mr+GYcjv8NFexzmwsrPeL8s7bsAeeIV/ pwgg== 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=ILJ6KUzz5UKYPnWbk1cGvixDN6iLtxb7woY6fRVqBHg=; b=Sy3iSW0wJeSfzW1bXD6Py2H6VwJjP0hZFSPwgdMbJcaiucqWc7q+n549cY8pEagrPg rOyfqQbHgHRLT/Obz+Xvt/dAB3WeLFqWUv/KCFse2NJ0Mns6kSvGFagsROW0sHfEKDo0 ua+PcT9XNiKdLa2v/uwakf6+d5Z2snecSh2e5DJwL4CmTKuqVLKxgLcPAs5zx03JzlHz n2vaNz+glR1qPa+6dUylNgoIbmjd+xLC1shuue7+YY07n5Hbsa6XXXnSNGfHzhR4QnUl BVfm/f3HdX7+vYivNNwzUQlc4vo3TE3qJg3GO6p4JlESeJOmSaKM8kiznECUlToT0Gix 0lvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=HHqFBzlp; 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 d1si25165364plg.437.2021.10.19.05.49.42; Tue, 19 Oct 2021 05:49:54 -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=HHqFBzlp; 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 S235627AbhJSMur (ORCPT + 99 others); Tue, 19 Oct 2021 08:50:47 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:19316 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230267AbhJSMuq (ORCPT ); Tue, 19 Oct 2021 08:50:46 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1634647714; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: MIME-Version: Date: Message-ID: From: References: Cc: To: Subject: Sender; bh=ILJ6KUzz5UKYPnWbk1cGvixDN6iLtxb7woY6fRVqBHg=; b=HHqFBzlp0SfdzvmHRmL78qGYoADMNUAjf6RU+SunetfijYCQftyEhZHVWRILErZL2L3oiheW p+PBA3eOjJo8WufTfMKC4XLjrQNICsf+YXTVwqAMwRAjBmhv5buBjpA8PqUZt2yxzd8nBZhj 9/8rhQNei1MnQDEktKw3lZjJxGo= 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 616ebe975ca800b6c1b80db7 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 19 Oct 2021 12:48:23 GMT Sender: quic_luoj=quicinc.com@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 5010AC4360C; Tue, 19 Oct 2021 12:48:23 +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 98236C4338F; Tue, 19 Oct 2021 12:48:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org 98236C4338F 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 Cc: Luo Jie , 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> <0472b75b-9fd7-55e3-dc1b-f33786643103@quicinc.com> From: Jie Luo Message-ID: Date: Tue, 19 Oct 2021 20:48:18 +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 8:31 PM, Andrew Lunn wrote: > On Tue, Oct 19, 2021 at 08:10:15PM +0800, Jie Luo wrote: >> 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. > O.K. It is a shame the hardware partially follow the standard, but > breaks it as well. Why go to the effort of partially following it, > when you don't gain anything from it because you need custom code > anyway? > > Andrew Hi Andrew, Thanks for the suggestion. qca8081 PHY indeed add 2.5G capability based on the general 1G PHY, i will feedback this to the HW design team, thanks for this comments.