linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: phy: realtek: add loopback support for RTL8211F
@ 2020-05-13  8:25 Huazhong Tan
  2020-05-13 13:12 ` Andrew Lunn
  0 siblings, 1 reply; 5+ messages in thread
From: Huazhong Tan @ 2020-05-13  8:25 UTC (permalink / raw)
  To: andrew, f.fainelli, hkallweit1, linux, davem
  Cc: netdev, linux-kernel, linuxarm, kuba, Yufeng Mo, Jian Shen, Huazhong Tan

From: Yufeng Mo <moyufeng@huawei.com>

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 <moyufeng@huawei.com>
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
---
 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,
-- 
2.7.4


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next] net: phy: realtek: add loopback support for RTL8211F
  2020-05-13  8:25 [PATCH net-next] net: phy: realtek: add loopback support for RTL8211F Huazhong Tan
@ 2020-05-13 13:12 ` Andrew Lunn
  2020-05-14  1:32   ` tanhuazhong
  2020-05-18  1:49   ` tanhuazhong
  0 siblings, 2 replies; 5+ messages in thread
From: Andrew Lunn @ 2020-05-13 13:12 UTC (permalink / raw)
  To: Huazhong Tan
  Cc: f.fainelli, hkallweit1, linux, davem, netdev, linux-kernel,
	linuxarm, kuba, Yufeng Mo, Jian Shen

On Wed, May 13, 2020 at 04:25:44PM +0800, Huazhong Tan wrote:
> From: Yufeng Mo <moyufeng@huawei.com>
> 
> 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 <moyufeng@huawei.com>
> Signed-off-by: Jian Shen <shenjian15@huawei.com>
> Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next] net: phy: realtek: add loopback support for RTL8211F
  2020-05-13 13:12 ` Andrew Lunn
@ 2020-05-14  1:32   ` tanhuazhong
  2020-05-18  1:49   ` tanhuazhong
  1 sibling, 0 replies; 5+ messages in thread
From: tanhuazhong @ 2020-05-14  1:32 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: f.fainelli, hkallweit1, linux, davem, netdev, linux-kernel,
	linuxarm, kuba, Yufeng Mo, Jian Shen



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 <moyufeng@huawei.com>
>>
>> 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 <moyufeng@huawei.com>
>> Signed-off-by: Jian Shen <shenjian15@huawei.com>
>> Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
> 
> It took three people to write a 1 line patch?

Yufeng Mo is the author of this patch, since he has not right to send mail
so I just help him to do than。 If necessary, Jian Shen could be deleted.

> 
>> ---
>>   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
> 

We have checked the data sheet. Since we only have rtl8211f phy on our 
hand, so only support loopback on this phy.

Thanks:)

> .
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next] net: phy: realtek: add loopback support for RTL8211F
  2020-05-13 13:12 ` Andrew Lunn
  2020-05-14  1:32   ` tanhuazhong
@ 2020-05-18  1:49   ` tanhuazhong
  2020-05-18 14:50     ` Andrew Lunn
  1 sibling, 1 reply; 5+ messages in thread
From: tanhuazhong @ 2020-05-18  1:49 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: f.fainelli, hkallweit1, linux, davem, netdev, linux-kernel,
	linuxarm, kuba, Yufeng Mo, Jian Shen



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 <moyufeng@huawei.com>
>>
>> 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 <moyufeng@huawei.com>
>> Signed-off-by: Jian Shen <shenjian15@huawei.com>
>> Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
> 
> 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:)

> .
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next] net: phy: realtek: add loopback support for RTL8211F
  2020-05-18  1:49   ` tanhuazhong
@ 2020-05-18 14:50     ` Andrew Lunn
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2020-05-18 14:50 UTC (permalink / raw)
  To: tanhuazhong
  Cc: f.fainelli, hkallweit1, linux, davem, netdev, linux-kernel,
	linuxarm, kuba, Yufeng Mo, Jian Shen

> 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?

So you checked the datasheets for the RTL8201CP, RTL8201F, RTL8208,
RTL8211B, RTL8211DN, etc?

For all those you have datasheets for, please also add loopback
support. I'm just trying to avoid one PHY from twelve in that driver
having loopback support, when they all probably can.

       Andrew

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-05-18 14:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-13  8:25 [PATCH net-next] net: phy: realtek: add loopback support for RTL8211F Huazhong Tan
2020-05-13 13:12 ` Andrew Lunn
2020-05-14  1:32   ` tanhuazhong
2020-05-18  1:49   ` tanhuazhong
2020-05-18 14:50     ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).