netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Genevieve Chan <genevieve.chan@starfivetech.com>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
	"ddaney@caviumnetworks.com" <ddaney@caviumnetworks.com>,
	Andrew Lunn <andrew@lunn.ch>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: Marvell_of_reg_init function
Date: Wed, 24 May 2023 09:40:27 +0100	[thread overview]
Message-ID: <ZG3Ne7wOo3SeSZTp@shell.armlinux.org.uk> (raw)
In-Reply-To: <ace88928-93b3-72fe-59e5-c7b5b7527f5e@gmail.com>

On Wed, May 24, 2023 at 08:38:43AM +0200, Heiner Kallweit wrote:
> On 24.05.2023 08:13, Genevieve Chan wrote:
> > ++
> > 
> > Hi Heiner,
> > 
> >  
> > 
> > Hope you’re doing well. I am Genevieve Chan, a linux junior software developer for RISC-V based processor. As mentioned in the email thread below, I have came across a possible issue when attempting to issue reg-init onto Page 0 Reg 4, involving advertisement register of PHY. I have stated the observation and the root cause and possible solution. Would like to ask if this proposed solution is probable and I could submit a patch for this?
> > 
> 
> Please address all phylib maintainers and the netdev mailing list.
> 
> You should start with explaining why you want to set these registers,
> and why via device tree. There should never be the need to manually
> fiddle with C22 standard registers via device tree.
> 
> If you need a specific register initialization for a particular PHY,
> then the config_init callback of the PHY driver typically is the right
> place.
> 
> And no, generic code should not query vendor-specific DT properties.

To Genevieve Chan...

Page 0 register 4 is a register that is managed by the phylib code on
behalf of the network driver. Attempting to configuring it (or any
register managed by phylib, e.g. for advertisement) via the of_reg_init
will not work as phylib will overwrite it. Doing so is intended not to
work, isn't supported, and any value written will be overwritten by
phylib or the PHY driver.

If you wish to change the advertisement, that has to be done via the
"ethtool" userspace utility.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

  reply	other threads:[~2023-05-24  8:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <8eb8860a698b453788c29d43c6e3f239@EXMBX172.cuchost.com>
     [not found] ` <907b769ca48a482eaf727b89ead56db4@EXMBX172.cuchost.com>
2023-05-24  6:38   ` Marvell_of_reg_init function Heiner Kallweit
2023-05-24  8:40     ` Russell King (Oracle) [this message]
2023-05-25  7:52       ` Genevieve Chan

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=ZG3Ne7wOo3SeSZTp@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=ddaney@caviumnetworks.com \
    --cc=genevieve.chan@starfivetech.com \
    --cc=hkallweit1@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).