All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Fabio Baltieri <fabio.baltieri@gmail.com>
Cc: Michael Zimmermann <sigmaepsilon92@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>,
	nic_swsd@realtek.com, Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] r8169: add support for RTL8127ATF
Date: Fri, 21 Nov 2025 14:09:08 +0100	[thread overview]
Message-ID: <1ca0e3ed-faab-4203-be4e-9998d6d2b7ad@gmail.com> (raw)
In-Reply-To: <aSBWiuivrPG8vNKw@google.com>

On 11/21/2025 1:09 PM, Fabio Baltieri wrote:
> On Fri, Nov 21, 2025 at 12:17:33AM +0100, Heiner Kallweit wrote:
>> Could you please test whether the following fixes the chip hang on suspend / shutdown?
>>
>> diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
>> index de304d1eb..97dbe8f89 100644
>> --- a/drivers/net/ethernet/realtek/r8169_main.c
>> +++ b/drivers/net/ethernet/realtek/r8169_main.c
>> @@ -1517,11 +1517,20 @@ static enum rtl_dash_type rtl_get_dash_type(struct rtl8169_private *tp)
>>  
>>  static void rtl_set_d3_pll_down(struct rtl8169_private *tp, bool enable)
>>  {
>> -	if (tp->mac_version >= RTL_GIGA_MAC_VER_25 &&
>> -	    tp->mac_version != RTL_GIGA_MAC_VER_28 &&
>> -	    tp->mac_version != RTL_GIGA_MAC_VER_31 &&
>> -	    tp->mac_version != RTL_GIGA_MAC_VER_38)
>> -		r8169_mod_reg8_cond(tp, PMCH, D3_NO_PLL_DOWN, !enable);
>> +	switch (tp->mac_version) {
>> +	case RTL_GIGA_MAC_VER_02 ... RTL_GIGA_MAC_VER_24:
>> +	case RTL_GIGA_MAC_VER_28:
>> +	case RTL_GIGA_MAC_VER_31:
>> +	case RTL_GIGA_MAC_VER_38:
>> +		break;
>> +	case RTL_GIGA_MAC_VER_80:
>> +		r8169_mod_reg8_cond(tp, PMCH, D3_NO_PLL_DOWN, true);
>> +		break;
>> +	default:
>> +		r8169_mod_reg8_cond(tp, PMCH, D3HOT_NO_PLL_DOWN, true);
>> +		r8169_mod_reg8_cond(tp, PMCH, D3COLD_NO_PLL_DOWN, !enable);
>> +		break;
>> +	}
>>  }
>>  
>>  static void rtl_reset_packet_filter(struct rtl8169_private *tp)
> 
> Yes, patched it in and tested on both suspend and reboot without
> touching the wol flags, seems to be working correctly.
> 
Great, thanks for the feedback!

> Thanks!


      reply	other threads:[~2025-11-21 13:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-17 19:16 [PATCH] r8169: add support for RTL8127ATF Fabio Baltieri
2025-11-17 19:37 ` Andrew Lunn
2025-11-18 11:08   ` Fabio Baltieri
2025-11-18 19:31     ` Andrew Lunn
2025-11-18 20:02       ` Heiner Kallweit
2025-11-18 20:20         ` Fabio Baltieri
2025-11-18 21:31           ` Michael Zimmermann
2025-11-18 22:01             ` Fabio Baltieri
2025-11-19  7:00               ` Michael Zimmermann
2025-11-19 10:26                 ` Fabio Baltieri
2025-11-20 23:17                   ` Heiner Kallweit
2025-11-21 12:09                     ` Fabio Baltieri
2025-11-21 13:09                       ` Heiner Kallweit [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1ca0e3ed-faab-4203-be4e-9998d6d2b7ad@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fabio.baltieri@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nic_swsd@realtek.com \
    --cc=pabeni@redhat.com \
    --cc=sigmaepsilon92@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.