RE: [Intel-wired-lan] [PATCH iwl-net v3] ice: propagate ETH56G deskew poll failures

From: Nowlin, Alexander

Date: Mon Oct 05 2026 - 11:55:31 EST


> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@xxxxxxxxxx> On Behalf Of Pengpeng Hou
> Sent: Saturday, August 15, 2026 6:57 AM
> To: Nguyen, Anthony L <anthony.l.nguyen@xxxxxxxxx>; Kitszel, Przemyslaw <przemyslaw.kitszel@xxxxxxxxx>
> Cc: Pengpeng Hou <pengpeng@xxxxxxxxxxx>; Jagielski, Jedrzej <jedrzej.jagielski@xxxxxxxxx>; Loktionov, Aleksandr <aleksandr.loktionov@xxxxxxxxx>; Andrew Lunn <andrew+netdev@xxxxxxx>; David S. Miller <davem@xxxxxxxxxxxxx>; Eric Dumazet <edumazet@xxxxxxxxxx>; Jakub Kicinski <kuba@xxxxxxxxxx>; Paolo Abeni <pabeni@xxxxxxxxxx>; Richard Cochran <richardcochran@xxxxxxxxx>; Keller, Jacob E <jacob.e.keller@xxxxxxxxx>; Kubalewski, Arkadiusz <arkadiusz.kubalewski@xxxxxxxxx>; Karol Kolacinski <karol.kolacinski@xxxxxxxxx>; Temerkhanov, Sergey <sergey.temerkhanov@xxxxxxxxx>; Michal Michalik <michal.michalik@xxxxxxxxx>; Simon Horman <horms@xxxxxxxxxx>; intel-wired-lan@xxxxxxxxxxxxxxxx; netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> Subject: [Intel-wired-lan] [PATCH iwl-net v3] ice: propagate ETH56G deskew poll failures
>
> ice_ptp_calc_deskew_eth56g() ignores the return value of read_poll_timeout(). If register reads succeed but the DESKEW valid bit never appears, the timeout is treated as success. If a register read fails, the poll condition can also inspect deskew_i before a successful read and continue polling instead of stopping on the hard error. The function then returns an int error through its u32 deskew return type.
>
> Return the deskew value through an output parameter. Stop polling when either the read fails or the valid bit appears, then propagate the register error or the poll timeout separately before calculating and applying the deskew value.
>
> Fixes: 7cab44f1c35f ("ice: Introduce ETH56G PHY model for E825C products")
>
> Assisted-by: Codex:gpt-5
> Signed-off-by: Pengpeng Hou <pengpeng@xxxxxxxxxxx>
> ---
> Changes since v2: https://lore.kernel.org/all/20260706144325.91320-1-pengpeng@xxxxxxxxxxx/
> - capture and propagate the read_poll_timeout() result
> - stop the poll immediately on a register read error
> - initialize deskew_i before it is used by the poll condition
> - do not carry the v2 Reviewed-by because the poll logic changed
>
> drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 42 ++++++++++++++++++----------
> 1 file changed, 28 insertions(+), 14 deletions(-)

Tested-by: Alexander Nowlin <alexander.nowlin@xxxxxxxxx>