Re: [PATCH net-next v5 2/3] net: mdio: Add Cortina CS7542 bus controller

From: Andrew Lunn

Date: Fri Dec 04 2026 - 08:31:53 EST


On Fri, Dec 04, 2026 at 06:57:54AM +0300, Fil Dunsky via B4 Relay wrote:
> From: Fil Dunsky <filipp.dunsky@xxxxxxxxx>
>
> Support Clause 22 reads and writes through the CS7542 management
> interface. Retain the firmware-configured prescaler and unrelated
> configuration bits while enabling manual operation.
>
> Use sleepable polling for the bounded wait in the MDIO bus callbacks.
> Report timeout errors directly without tracking a pending transaction.
> Use managed bus allocation and registration to cover probe failures
> and removal.
>
> Acquire and enable the required APB input before accessing registers,
> and retain it for the lifetime of the registered bus. Managed bus teardown
> runs before the managed clock is disabled. The firmware MDC prescaler is
> preserved; no clock-rate or divisor programming is introduced.
>
> Signed-off-by: Fil Dunsky <filipp.dunsky@xxxxxxxxx>

Reviewed-by: Andrew Lunn <andrew@xxxxxxx>

Andrew