lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <ace88928-93b3-72fe-59e5-c7b5b7527f5e@gmail.com>
Date: Wed, 24 May 2023 08:38:43 +0200
From: Heiner Kallweit <hkallweit1@...il.com>
To: Genevieve Chan <genevieve.chan@...rfivetech.com>,
 "ddaney@...iumnetworks.com" <ddaney@...iumnetworks.com>
Cc: Andrew Lunn <andrew@...n.ch>,
 Russell King - ARM Linux <linux@...linux.org.uk>,
 "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: Marvell_of_reg_init function

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.

>  
> 
> Thank you and have a nice day!
> 
>  
> 
> Best regards,
> 
> Genevieve Chan(陈巧艳)
> 
> Software Team, MDC
> 
> Starfive Technology Sdn. Bhd.
> 
>  
> 
> *From:*Genevieve Chan
> *Sent:* Wednesday, May 24, 2023 1:57 PM
> *To:* 'ddaney@...iumnetworks.com' <ddaney@...iumnetworks.com>
> *Subject:* Marvell_of_reg_init function
> 
>  
> 
> Hi David,
> 
>  
> 
> How are you doing? I am Genevieve Chan, a Linux Junior Software Developer for RISC-V Based Processor. I was working on GMAC driver and came across this wonderful feature you’ve enabled long ago, to modify PHY registers using device tree nodes.
> 
>  
> 
> I did try to modify a number of registers, but one 0:4 was overwritten by other config function:
> 
>  
> 
> Device tree node:
> 
>  
> 
> Output log:
> 
>  
> 
> As shown in the screenshots above, I have intended to set 0x441 to page 0 reg 4. In m88e1121_config_aneg, it got overwritten with 0xc61, in which when stepping in, it is *_due to this function_*:
> 
>  
> 
>  
> 
> *_Problem:_* If any user intend to modify page 0 register 4, it becomes redundant as it will eventually be overwritten by this function.
> 
>  
> 
> *_Here is my proposed solution:_*
> 
>   * Add in a condition if CONFIG_OF_MDIO is enabled, and check if “marvell,reg-init” node is present, then return 0, else proceed to check valid advertisement*__*
> 
> *_ _*
> 
> *_Screenshot of proposal:_*
> 
> *__*
> 
> *_ _*
> 
> *_ _*
> 
> Would like to reach out to you to gather you opinions and suggestion, if it’s okay for me to submit a patch for this.
> 
>  
> 
>  
> 
> Thank you and have a nice day!
> 
>  
> 
> Best regards,
> 
> Genevieve Chan(陈巧艳)
> 
> Software Team, MDC
> 
> Starfive Technology Sdn. Bhd.
> 
>  
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ