Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2357338ybk; Sun, 17 May 2020 18:55:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWmpHaVqP0oI5C1KKWGl3Cn2yBoVOJYdiwgekoyF4lGs03DAk7srqUVUXKbDIvTI5HIgOA X-Received: by 2002:a17:906:1f87:: with SMTP id t7mr9829112ejr.50.1589766927671; Sun, 17 May 2020 18:55:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589766927; cv=none; d=google.com; s=arc-20160816; b=0NCvP39rZldWGyJa026lGg44LmY5qIr08IHu69eLoIdaodrT5lcEHMLutTX8PcugEt xdzZkpvblBcTdLH4vgTwxNBZ8A8fFsq3wveFabptacyhKUt7f3XkzA+3AvHpzj6qIhDC xGalYCcvmi7rNU3pAM2VTnpWyWd/SVSj31CgNffGncOY32vNGx0bdhzAr7FsnexMXXdK rmJBbFe4gkGAtI+qRz55WyYqK1U1cYkxwfzwAffy+YKmyAvySnZUwIkt3D3yWS2plBJA otra1m/gn8m7jaj+Gh/cvd+TOOlfLpxzANKi7rKBg98UevLwgb3hDcAY3DOEFnB6bLhJ q76A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=cwcW6vbF3JS0uA32F4DgrDAxdyZap8o4R8ha4pteJU8=; b=eZuL1Kws5ef7kJ8FrORA4o5DjyOHjq8HboaG2QEihazhQidm2rIGO/gHEdNA323nfE UUTrk508Uf2pZCE6SpRjBUd4TkOShvy05qNM55WnGAlWh293RcQ29h17sfCIIldWqw6x vLazDgJhcJzIigTDdrFYuAxlKgxv97zaBWcB4wE5gHZ4iBHxU64G88g5KflfWncUx1GC DPYPFbnAWtc0i2daAE0AvBOAUP9vD1AluPF0h2kcxOCg4eFo10xQRcyzamUmEJmM8zbi qTnblIZipSP1BXVMUpeHhB9o5Hl+tVSbVrQrAOJofmhPpl7hbQd1DY8eu2n8EjzfCwPJ 8wnw== 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 lb23si5681509ejb.28.2020.05.17.18.54.52; Sun, 17 May 2020 18:55:27 -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; 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 S1726797AbgERBuI (ORCPT + 99 others); Sun, 17 May 2020 21:50:08 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:58074 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726730AbgERBuI (ORCPT ); Sun, 17 May 2020 21:50:08 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 35ED3310FD138A30BCB2; Mon, 18 May 2020 09:50:05 +0800 (CST) Received: from [127.0.0.1] (10.74.149.191) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Mon, 18 May 2020 09:49:59 +0800 Subject: Re: [PATCH net-next] net: phy: realtek: add loopback support for RTL8211F To: Andrew Lunn CC: , , , , , , , , Yufeng Mo , Jian Shen References: <1589358344-14009-1-git-send-email-tanhuazhong@huawei.com> <20200513131226.GA499265@lunn.ch> From: tanhuazhong Message-ID: Date: Mon, 18 May 2020 09:49:58 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20200513131226.GA499265@lunn.ch> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.74.149.191] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/5/13 21:12, Andrew Lunn wrote: > On Wed, May 13, 2020 at 04:25:44PM +0800, Huazhong Tan wrote: >> From: Yufeng Mo >> >> PHY loopback is already supported by genphy driver. This patch >> adds the set_loopback interface to RTL8211F PHY driver, so the PHY >> selftest can run properly on it. >> >> Signed-off-by: Yufeng Mo >> Signed-off-by: Jian Shen >> Signed-off-by: Huazhong Tan > > It took three people to write a 1 line patch? > >> --- >> 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 c7229d0..6c5918c 100644 >> --- a/drivers/net/phy/realtek.c >> +++ b/drivers/net/phy/realtek.c >> @@ -615,6 +615,7 @@ static struct phy_driver realtek_drvs[] = { >> .resume = genphy_resume, >> .read_page = rtl821x_read_page, >> .write_page = rtl821x_write_page, >> + .set_loopback = genphy_loopback, >> }, { >> .name = "Generic FE-GE Realtek PHY", >> .match_phy_device = rtlgen_match_phy_device, > > Do you have access to the data sheets? Can you check if the other PHYs > supported by this driver also support loopback in the standard way? > They probably do. > > Andrew > Hi, Andrew. There are two type of phys we are using, rtl8211f and "Marvell 88E1512". "Marvell 88E1512" has already supported loopback (f0f9b4ed2338 ("net: phy: Add phy loopback support in net phy framework")). So now we adds loopback support to the rtl8211f. From the data sheet other phys should support this loopback as well, but we have no way to verify it. What's your suggestion? Thanks:) > . >