Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp443736pxu; Wed, 25 Nov 2020 07:08:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJz0fXFJAC89XbBBCtNrPg8rFgNWWLqFwe92dgTfPv5sjCb3FJyOrElLT9vYTTc7bX3Os0By X-Received: by 2002:a50:9eae:: with SMTP id a43mr3854651edf.109.1606316890465; Wed, 25 Nov 2020 07:08:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606316890; cv=none; d=google.com; s=arc-20160816; b=n5lwFnzjtfgL9Y0Zo8+CE5jSDV/rAIapYn65FMsR+Un3+yFDIHMimdaEu2Eyp/MDrl d+zPEJeEyRF+cXYtPb+zNNBqJaCfg8k/WsGPCTfJTPM4L5vSpMEFC3E/JtW4r3QwxtiT FVp+mZKelQJRI55rjysPyQuXHFPUhVdZkFqgJfgbKS3sxO1KEODlEFZO3AUfgsQQW1fR fvDbGVDsShURUHYsEM66zwkBqMLjTJcgv14KTMnI3f5LfN1UfURhQZI8NG4a1y+8qvXt aH9fmp7d14vozkxeQ1rWV93Q6zaKX2SDGeNmH1KMUosoJ9rEcE2vwvcTBw5iAvvHQAFE meXw== 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; bh=sRusRdmLikUQ9I5Wlk+UeDOAio0YsiPcI24tkTxsS14=; b=Y0nfkZbG/GRkfXN4xbjEeoSBpp3hdCF2e3LUm/JLjTAckWFx8QOIHQ6ClQd6fB5Pt0 vne6G+1dGdtWEP7qkQVrsVHmRVstntr2NPvzibOCF9CrOJg0hBUIshwRsGzG4NyAFZuu WqEQjM+up9lAEgwfMwW5KeCgVqXkd+ca59+mtUWyyj8vVKjc6wv6Gp9AHBSyCK2/LoPB 6LbhrQXytp1/4L+Cg8WldEJ78kNNLR5i2miU0hqCGGcBAlIFpJgdgewLzWzOqbSEY22U UPjvvjKcjOt2CRXR2juqhkpwLv6dvmcD+gce8c0lYnOtdG0EC3VrWOtVTsIA4yfjVda8 vVJA== ARC-Authentication-Results: i=1; mx.google.com; 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 zc3si1398520ejb.158.2020.11.25.07.07.46; Wed, 25 Nov 2020 07:08:10 -0800 (PST) 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; 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 S1729957AbgKYPDz (ORCPT + 99 others); Wed, 25 Nov 2020 10:03:55 -0500 Received: from szxga02-in.huawei.com ([45.249.212.188]:2504 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729901AbgKYPDy (ORCPT ); Wed, 25 Nov 2020 10:03:54 -0500 Received: from dggeme760-chm.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Ch4014WkYzQksm; Wed, 25 Nov 2020 23:03:29 +0800 (CST) Received: from [127.0.0.1] (10.57.36.170) by dggeme760-chm.china.huawei.com (10.3.19.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1913.5; Wed, 25 Nov 2020 23:03:47 +0800 Subject: Re: [PATCH v3 net-next] net: phy: realtek: read actual speed on rtl8211f to detect downshift To: Antonio Borneo , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Jakub Kicinski , , Willy Liu CC: , Salil Mehta , , References: <20201124143848.874894-1-antonio.borneo@st.com> <20201124230756.887925-1-antonio.borneo@st.com> From: Yonglong Liu Message-ID: Date: Wed, 25 Nov 2020 23:03:46 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.0.1 MIME-Version: 1.0 In-Reply-To: <20201124230756.887925-1-antonio.borneo@st.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [10.57.36.170] X-ClientProxiedBy: dggeme719-chm.china.huawei.com (10.1.199.115) To dggeme760-chm.china.huawei.com (10.3.19.106) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tested-by: Yonglong Liu On 2020/11/25 7:07, Antonio Borneo wrote: > The rtl8211f supports downshift and before commit 5502b218e001 > ("net: phy: use phy_resolve_aneg_linkmode in genphy_read_status") > the read-back of register MII_CTRL1000 was used to detect the > negotiated link speed. > The code added in commit d445dff2df60 ("net: phy: realtek: read > actual speed to detect downshift") is working fine also for this > phy and it's trivial re-using it to restore the downshift > detection on rtl8211f. > > Add the phy specific read_status() pointing to the existing > function rtlgen_read_status(). > > Signed-off-by: Antonio Borneo > Link: https://lore.kernel.org/r/478f871a-583d-01f1-9cc5-2eea56d8c2a7@huawei.com > --- > To: Andrew Lunn > To: Heiner Kallweit > To: Russell King > To: "David S. Miller" > To: Jakub Kicinski > To: netdev@vger.kernel.org > To: Yonglong Liu > To: Willy Liu > Cc: linuxarm@huawei.com > Cc: Salil Mehta > Cc: linux-stm32@st-md-mailman.stormreply.com > Cc: linux-kernel@vger.kernel.org > In-Reply-To: <20201124143848.874894-1-antonio.borneo@st.com> > > V1 => V2 > move from a generic implementation affecting every phy > to a rtl8211f specific implementation > V2 => V3 > rebase on netdev-next, resolving minor conflict after > merge of 8b43357fff61 > --- > drivers/net/phy/realtek.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c > index f71eda945c6a..99ecd6c4c15a 100644 > --- a/drivers/net/phy/realtek.c > +++ b/drivers/net/phy/realtek.c > @@ -729,6 +729,7 @@ static struct phy_driver realtek_drvs[] = { > PHY_ID_MATCH_EXACT(0x001cc916), > .name = "RTL8211F Gigabit Ethernet", > .config_init = &rtl8211f_config_init, > + .read_status = rtlgen_read_status, > .config_intr = &rtl8211f_config_intr, > .handle_interrupt = rtl8211f_handle_interrupt, > .suspend = genphy_suspend, > > base-commit: 1d155dfdf50efc2b0793bce93c06d1a5b23d0877