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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e1311746-9882-4063-84af-3939466096e9@lunn.ch>
Date: Tue, 28 Oct 2025 03:51:04 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Yi Cong <cong.yi@...ux.dev>
Cc: Frank.Sae@...or-comm.com, andrew+netdev@...n.ch, hkallweit1@...il.com,
	linux@...linux.org.uk, davem@...emloft.net, kuba@...nel.org,
	netdev@...r.kernel.org, Yi Cong <yicong@...inos.cn>,
	stable@...r.kernel.org
Subject: Re: [PATCH] net: phy: motorcomm: Fix the issue in the code regarding
 the incorrect use of time units

On Tue, Oct 28, 2025 at 09:59:23AM +0800, Yi Cong wrote:
> From: Yi Cong <yicong@...inos.cn>
> 
> Currently, NS (nanoseconds) is being used, but according to the datasheet,
> the correct unit should be PS (picoseconds).
> 
> Fixes: 4869a146cd60 ("net: phy: Add BIT macro for Motorcomm yt8521/yt8531 gigabit ethernet phy")
> Cc: stable@...r.kernel.org
> Signed-off-by: Yi Cong <yicong@...inos.cn>
> ---
>  drivers/net/phy/motorcomm.c | 102 ++++++++++++++++++------------------
>  1 file changed, 51 insertions(+), 51 deletions(-)
> 
> diff --git a/drivers/net/phy/motorcomm.c b/drivers/net/phy/motorcomm.c
> index a3593e663059..81491c71e75b 100644
> --- a/drivers/net/phy/motorcomm.c
> +++ b/drivers/net/phy/motorcomm.c
> @@ -171,7 +171,7 @@
>   * 1b1 enable 1.9ns rxc clock delay
>   */
>  #define YT8521_CCR_RXC_DLY_EN			BIT(8)
> -#define YT8521_CCR_RXC_DLY_1_900_NS		1900
> +#define YT8521_CCR_RXC_DLY_1_900_PS		1900

This could be down to interpretation.

#define YT8521_CCR_RXC_DLY_1.900_NS		1900

would be technically correct, but not valid for cpp(1). So the . is
replaced with a _ .

#define YT8521_CCR_RXC_DLY_1900_PS		1900

would also be correct, but that is not what you have in your patch,
you leave the _ in place.

    Andrew

---
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ