mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: 万致远 <kmlinuxm@gmail.com>
Cc: kuba@kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, willy.liu@realtek.com,
	Yuki Lee <febrieac@outlook.com>
Subject: Re: [PATCH 1/2] net: phy: realtek: add combo mode support for RTL8211FS
Date: Tue, 3 Dec 2024 04:53:32 +0100	[thread overview]
Message-ID: <aa36e5a4-e7d2-4755-b2a1-58dc5a60af1c@lunn.ch> (raw)
In-Reply-To: <CAHwZ4N3dn+jWG0Hbz2ptPRyA3i1SwCq1F7ipgMdwBaahntqkjA@mail.gmail.com>

On Tue, Dec 03, 2024 at 11:08:22AM +0800, 万致远 wrote:
> On 2024/12/3 7:52, Andrew Lunn wrote:
> >> +static int rtl8211f_config_aneg(struct phy_device *phydev)
> >> +{
> >> +    int ret;
> >> +
> >> +    struct rtl821x_priv *priv = phydev->priv;
> >> +
> >> +    ret = genphy_read_abilities(phydev);
> >> +    if (ret < 0)
> >> +            return ret;
> >> +
> >> +    linkmode_copy(phydev->advertising, phydev->supported);
> >
> > This is all very unusual for config_aneg(). genphy_read_abilities()
> > will have been done very early on during phy_probe(). So why do it
> > now? And why overwrite how the user might of configured what is to be
> > advertised?
> >
> 
> These codes are migrated from Rockchip SDK and I'm not familiar with this part.
> 
> I will use `linkmode_and` instead of `linkmode_copy` in my next
> version of patch like Marvell does.

No, it needs a lot more work than just that. Spend some time to really
understand how the marvell driver handles either copper or fibre, and
assume the Rockchip SDK is poor quality code.

It might also be that the marvell scheme does not work. It will depend
on how the PHY actually works.

Andrew

  reply	other threads:[~2024-12-03  3:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-02 19:50 Zhiyuan Wan
2024-12-02 19:50 ` [PATCH 2/2] net: phy: realtek: add dt property to disable broadcast PHY address Zhiyuan Wan
2024-12-03  0:04   ` Andrew Lunn
2024-12-03  3:46     ` [PATCH v2 1/2] net: phy: realtek: disable broadcast address feature of rtl8211f Zhiyuan Wan
2024-12-03  3:58       ` Andrew Lunn
2024-12-03  4:26         ` [PATCH v3 " Zhiyuan Wan
2024-12-03  6:50           ` Heiner Kallweit
2024-12-03  7:18             ` [PATCH net-next " Zhiyuan Wan
2024-12-03  7:38               ` Heiner Kallweit
2024-12-03  8:35                 ` Zhiyuan Wan
2024-12-03  9:52                   ` Heiner Kallweit
2024-12-02 23:52 ` [PATCH 1/2] net: phy: realtek: add combo mode support for RTL8211FS Andrew Lunn
2024-12-03  3:08   ` 万致远
2024-12-03  3:53     ` Andrew Lunn [this message]
2024-12-03  4:42       ` 万致远
2024-12-03  4:44       ` 万致远

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=aa36e5a4-e7d2-4755-b2a1-58dc5a60af1c@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=febrieac@outlook.com \
    --cc=kmlinuxm@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=willy.liu@realtek.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®