All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] r8169: remove not needed PHY soft reset in rtl8168e_2_hw_phy_config
@ 2018-02-20  6:30 Heiner Kallweit
  2018-02-21  4:27 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Heiner Kallweit @ 2018-02-20  6:30 UTC (permalink / raw)
  To: Realtek linux nic maintainers, David Miller; +Cc: netdev

rtl8169_init_phy() resets the PHY anyway after applying the chip-specific
PHY configuration. So we don't need to soft-reset the PHY as part of the
chip-specific configuration.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/ethernet/realtek/r8169.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 0bf7d1759..92b50b688 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -3805,8 +3805,6 @@ static void rtl8168e_2_hw_phy_config(struct rtl8169_private *tp)
 	rtl_writephy(tp, 0x1f, 0x0005);
 	rtl_w0w1_phy(tp, 0x01, 0x0100, 0x0000);
 	rtl_writephy(tp, 0x1f, 0x0000);
-	/* soft-reset phy */
-	rtl_writephy(tp, MII_BMCR, BMCR_RESET | BMCR_ANENABLE | BMCR_ANRESTART);
 
 	/* Broken BIOS workaround: feed GigaMAC registers with MAC address. */
 	rtl_rar_exgmac_set(tp, tp->dev->dev_addr);
-- 
2.16.1

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

* Re: [PATCH net-next] r8169: remove not needed PHY soft reset in rtl8168e_2_hw_phy_config
  2018-02-20  6:30 [PATCH net-next] r8169: remove not needed PHY soft reset in rtl8168e_2_hw_phy_config Heiner Kallweit
@ 2018-02-21  4:27 ` David Miller
  2018-02-21  6:29   ` Heiner Kallweit
  0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2018-02-21  4:27 UTC (permalink / raw)
  To: hkallweit1; +Cc: nic_swsd, netdev

From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Tue, 20 Feb 2018 07:30:16 +0100

> rtl8169_init_phy() resets the PHY anyway after applying the chip-specific
> PHY configuration. So we don't need to soft-reset the PHY as part of the
> chip-specific configuration.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

I'm not so comfortable with this.

There are so many r8169 chip variants out there.

And who knows, maybe one of them needs this second PHY reset or due to
some way the driver is coded it is necessary.

Unless you can test this change on every r8169 chip type, I'm very
reluctant to apply this patch.

Sorry.

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

* Re: [PATCH net-next] r8169: remove not needed PHY soft reset in rtl8168e_2_hw_phy_config
  2018-02-21  4:27 ` David Miller
@ 2018-02-21  6:29   ` Heiner Kallweit
  2018-02-21 18:16     ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Heiner Kallweit @ 2018-02-21  6:29 UTC (permalink / raw)
  To: David Miller; +Cc: nic_swsd, netdev

Am 21.02.2018 um 05:27 schrieb David Miller:
> From: Heiner Kallweit <hkallweit1@gmail.com>
> Date: Tue, 20 Feb 2018 07:30:16 +0100
> 
>> rtl8169_init_phy() resets the PHY anyway after applying the chip-specific
>> PHY configuration. So we don't need to soft-reset the PHY as part of the
>> chip-specific configuration.
>>
>> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> 
> I'm not so comfortable with this.
> 
> There are so many r8169 chip variants out there.
> 
> And who knows, maybe one of them needs this second PHY reset or due to
> some way the driver is coded it is necessary.
> 
> Unless you can test this change on every r8169 chip type, I'm very
> reluctant to apply this patch.
> 
I understand the concern, the change however is in rtl8168e_2_hw_phy_config()
which is specific to chip version 34 (RTL8168evl).
On my system with this chip version the change didn't change system behavior.


> Sorry.
> 

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

* Re: [PATCH net-next] r8169: remove not needed PHY soft reset in rtl8168e_2_hw_phy_config
  2018-02-21  6:29   ` Heiner Kallweit
@ 2018-02-21 18:16     ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-02-21 18:16 UTC (permalink / raw)
  To: hkallweit1; +Cc: nic_swsd, netdev

From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Wed, 21 Feb 2018 07:29:24 +0100

> Am 21.02.2018 um 05:27 schrieb David Miller:
>> From: Heiner Kallweit <hkallweit1@gmail.com>
>> Date: Tue, 20 Feb 2018 07:30:16 +0100
>> 
>>> rtl8169_init_phy() resets the PHY anyway after applying the chip-specific
>>> PHY configuration. So we don't need to soft-reset the PHY as part of the
>>> chip-specific configuration.
>>>
>>> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
>> 
>> I'm not so comfortable with this.
>> 
>> There are so many r8169 chip variants out there.
>> 
>> And who knows, maybe one of them needs this second PHY reset or due to
>> some way the driver is coded it is necessary.
>> 
>> Unless you can test this change on every r8169 chip type, I'm very
>> reluctant to apply this patch.
>> 
> I understand the concern, the change however is in rtl8168e_2_hw_phy_config()
> which is specific to chip version 34 (RTL8168evl).
> On my system with this chip version the change didn't change system behavior.

Ok, that does alleviate my concerns.

Patch applied, thank you.

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

end of thread, other threads:[~2018-02-21 18:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-20  6:30 [PATCH net-next] r8169: remove not needed PHY soft reset in rtl8168e_2_hw_phy_config Heiner Kallweit
2018-02-21  4:27 ` David Miller
2018-02-21  6:29   ` Heiner Kallweit
2018-02-21 18:16     ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.