mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Javen <javen_xu@realsil.com.cn>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "hkallweit1@gmail.com" <hkallweit1@gmail.com>,
	"nic_swsd@realtek.com" <nic_swsd@realtek.com>,
	"andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"maxime.chevallier@bootlin.com" <maxime.chevallier@bootlin.com>,
	"horms@kernel.org" <horms@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"daniel@makrotopia.org" <daniel@makrotopia.org>,
	"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
	"enelsonmoore@gmail.com" <enelsonmoore@gmail.com>,
	"daniel@thingy.jp" <daniel@thingy.jp>
Subject: RE: [PATCH net-next v7 4/7] r8169: add support for RTL8116af
Date: Tue, 28 Jul 2026 06:18:22 +0000	[thread overview]
Message-ID: <d8fa2337e3894a178616a0b1f2786a1f@realsil.com.cn> (raw)
In-Reply-To: <b01e69e8-3c8a-4af5-9de2-19d73713cff3@lunn.ch>

Hi Andrew,
>
>On Thu, Jul 23, 2026 at 03:21:26AM +0000, Javen wrote:
>> >
>> >>  static void rtl8169_init_phy(struct rtl8169_private *tp)  {
>> >> +     phy_init_hw(tp->phydev);
>> >> +     phy_resume(tp->phydev);
>> >>       r8169_hw_phy_config(tp, tp->phydev, tp->mac_version);
>> >>
>> >>       if (tp->mac_version <= RTL_GIGA_MAC_VER_06) { @@ -2562,7
>> >> +2607,7 @@ static void rtl8169_init_phy(struct rtl8169_private *tp)
>> >>           tp->pci_dev->subsystem_device == 0xe000)
>> >>               phy_write_paged(tp->phydev, 0x0001, 0x10, 0xf01b);
>> >>
>> >> -     if (tp->sfp_mode)
>> >> +     if (tp->sfp_mode == RTL_SFP_8127_ATF)
>> >>               rtl_sfp_init(tp);
>> >
>> >This could be diff getting me confused....
>> >
>> >You unconditionally call phy_init_hw() and phy_resume(). And then if
>> >this device should have an SFP you do something else. How can a
>> >device with an SFP also have a PHY?
>>
>> I totally agree that the SFP initialization logic does not belong in a function
>meant for PHYs. But rtl_sfp_init() call was already located inside
>rtl8169_init_phy() before my series. And it works well. This mainly because the
>patch which add support for RTL8127atf(commit id: fef0f545511f72223)
>assume that RTL8127atf has a dummy phy. So tp->phydev will not be NULL.
>
>[Goes and looks at what rtl_sfp_init() actually does]
>
>So it does not touch phydev making this function at least safe.
>
>> And in patch 5/7 of this series which add phylink support for RTL8127atf, I
>remove it.
>
>Yes, i did notice the dummy PHY getting deleted. I will look at that patch in
>more detail.
>
>      Thanks
>        Andrew

Just a gentle ping on this thread.

I am currently preparing for the next version. However, since you mentioned earlier that you were planning to look at patch 5/7 in more detail, I want to ask if you prefer me to send the next version or should I hold off and wait for your feedback on patch 5/7 so I can address everything in next patch.

Thanks,
Javen



  parent reply	other threads:[~2026-07-28  6:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-22  2:28 [PATCH net-next v7 0/7] r8169: add support for phylink javen
2026-07-22  2:29 ` [PATCH net-next v7 1/7] r8169: add speed in private struct javen
2026-07-22  2:29 ` [PATCH net-next v7 2/7] net: phy: phylink: add helper to modify pause javen
2026-07-23  0:57   ` Andrew Lunn
2026-07-23  2:50     ` Javen
2026-07-23 12:47       ` Andrew Lunn
2026-07-22  2:29 ` [PATCH net-next v7 3/7] r8169: add support for phylink javen
2026-07-23  1:04   ` Andrew Lunn
2026-07-23  3:05     ` Javen
2026-07-22  2:29 ` [PATCH net-next v7 4/7] r8169: add support for RTL8116af javen
2026-07-23  1:13   ` Andrew Lunn
2026-07-23  3:21     ` Javen
2026-07-23 12:54       ` Andrew Lunn
2026-07-24  1:44         ` Javen
2026-07-28  6:18         ` Javen [this message]
2026-07-22  2:29 ` [PATCH net-next v7 5/7] r8169: add support for RTL8127atf javen
2026-07-22  2:29 ` [PATCH net-next v7 6/7] r8169: add ltr support for RTL8117 series javen
2026-07-22  2:29 ` [PATCH net-next v7 7/7] r8169: fix RTL8116af can not enter s0idle and c10 javen

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=d8fa2337e3894a178616a0b1f2786a1f@realsil.com.cn \
    --to=javen_xu@realsil.com.cn \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=daniel@makrotopia.org \
    --cc=daniel@thingy.jp \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=enelsonmoore@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=nic_swsd@realtek.com \
    --cc=pabeni@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®