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: <bde1d3a9-6378-49a9-bcc2-00f4038f5558@lunn.ch>
Date: Fri, 16 Jan 2026 19:10:54 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Damien Dejean <dam.dejean@...il.com>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH 1/2] net: phy: realtek: add RTL8224 pair swap support

On Fri, Jan 16, 2026 at 06:39:19PM +0100, Damien Dejean wrote:
> The RTL8224 has a register to configure a pair swap (from ABCD order to
> DCBA) providing PCB designers more flexbility when wiring the chip. The
> swap parameter has to be set correctly for each of the 4 ports before
> the chip can detect a link.

Does the PHY support auto MDI-X, where it figures out a working
combination at link up time? That allows you to use crossed or not
crossed cables.

Anyway, the DT property you are adding seems to be the same as
marvell,mdi-cfg-order. See commit:

1432965bf5ce ("dt-bindings: net: marvell,aquantia: add property to override MDI_CFG")

> +  realtek,mdi-pair-swap:

Maybe call this realtek,mdi-cfg-order and use the same binding?

> +    description:
> +      Enable or disable the swap of the ethernet pairs (from ABCD to DCBA).
> +      The "keep" setting will keep the pair configuration at whatever its
> +      current state is.
> +    $ref: /schemas/types.yaml#/definitions/string
> +    enum:
> +      - keep

You should not need keep. If the property is not present in DT, you by
default do nothing, which would be keep.

> diff --git a/drivers/net/phy/realtek/Kconfig b/drivers/net/phy/realtek/Kconfig
> index b05c2a1e9024..a741b34d193e 100644
> --- a/drivers/net/phy/realtek/Kconfig
> +++ b/drivers/net/phy/realtek/Kconfig
> @@ -1,6 +1,7 @@
>  # SPDX-License-Identifier: GPL-2.0-only
>  config REALTEK_PHY
>  	tristate "Realtek PHYs"
> +	select PHY_PACKAGE
>  	help
>  	  Currently supports RTL821x/RTL822x and fast ethernet PHYs

Changes to DT bindings should be in a patch of its own.

    Andrew

---
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ