RE: [Intel-wired-lan] [PATCH v9 net-next 7/8] ice: add Tx reference clock index handling to AN restart command

From: Loktionov, Aleksandr

Date: Fri May 15 2026 - 08:50:31 EST




> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@xxxxxxxxxx> On Behalf
> Of Grzegorz Nitka
> Sent: Friday, May 15, 2026 1:00 AM
> To: netdev@xxxxxxxxxxxxxxx
> Cc: Vecera, Ivan <ivecera@xxxxxxxxxx>; vadim.fedorenko@xxxxxxxxx;
> kuba@xxxxxxxxxx; jiri@xxxxxxxxxxx; edumazet@xxxxxxxxxx; Kitszel,
> Przemyslaw <przemyslaw.kitszel@xxxxxxxxx>; richardcochran@xxxxxxxxx;
> donald.hunter@xxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Kubalewski,
> Arkadiusz <arkadiusz.kubalewski@xxxxxxxxx>; andrew+netdev@xxxxxxx;
> intel-wired-lan@xxxxxxxxxxxxxxxx; horms@xxxxxxxxxx;
> Prathosh.Satish@xxxxxxxxxxxxx; Nguyen, Anthony L
> <anthony.l.nguyen@xxxxxxxxx>; pabeni@xxxxxxxxxx; davem@xxxxxxxxxxxxx
> Subject: [Intel-wired-lan] [PATCH v9 net-next 7/8] ice: add Tx
> reference clock index handling to AN restart command
>
> Extend the Restart Auto-Negotiation (AN) AdminQ command with a new
> parameter allowing software to specify the Tx reference clock index
> to be used during link restart.
>
> This patch:
> - adds REFCLK field definitions to ice_aqc_restart_an
> - updates ice_aq_set_link_restart_an() to take a new refclk
> parameter
> and properly encode it into the command
> - keeps legacy behavior by passing REFCLK_NOCHANGE where
> appropriate
>
> This prepares the driver for configurations requiring dynamic
> selection of the Tx reference clock as part of the AN flow.
>
> Reviewed-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@xxxxxxxxx>
> Signed-off-by: Grzegorz Nitka <grzegorz.nitka@xxxxxxxxx>
> ---
> drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 2 ++
> drivers/net/ethernet/intel/ice/ice_common.c | 5 ++++-
> drivers/net/ethernet/intel/ice/ice_common.h | 2 +-
> drivers/net/ethernet/intel/ice/ice_lib.c | 3 ++-
> 4 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
> b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
> index 3cbb1b0582e3..42878abac9eb 100644
> --- a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
> +++ b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
> @@ -1169,6 +1169,8 @@ struct ice_aqc_restart_an {
> u8 cmd_flags;
> #define ICE_AQC_RESTART_AN_LINK_RESTART BIT(1)
> #define ICE_AQC_RESTART_AN_LINK_ENABLE BIT(2)
> +#define ICE_AQC_RESTART_AN_REFCLK_M GENMASK(4, 3)
> +#define ICE_AQC_RESTART_AN_REFCLK_NOCHANGE 0
> u8 reserved2[13];
> };
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_common.c
> b/drivers/net/ethernet/intel/ice/ice_common.c
> index b617a6bff891..ee7fa4654fe3 100644
> --- a/drivers/net/ethernet/intel/ice/ice_common.c
> +++ b/drivers/net/ethernet/intel/ice/ice_common.c
> @@ -4124,12 +4124,13 @@ int ice_get_link_status(struct ice_port_info
> *pi, bool *link_up)
> * @pi: pointer to the port information structure
> * @ena_link: if true: enable link, if false: disable link
> * @cd: pointer to command details structure or NULL
> + * @refclk: the new TX reference clock, 0 if no change
> *
> * Sets up the link and restarts the Auto-Negotiation over the
> link.
> */
> int
> ice_aq_set_link_restart_an(struct ice_port_info *pi, bool ena_link,
> - struct ice_sq_cd *cd)
> + struct ice_sq_cd *cd, u8 refclk)
Doublespace "*cd, u8 refclk", everything else fine

Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@xxxxxxxxx>

...

> return
> --
> 2.39.3