Subject: Re: [PATCH v7 iwl-next 3/6] ice: Implement PTP support for E830 devices

From: Simon Horman <[email-masked]>
Date: Fri, 23 Aug 2024 21:33:37 +0100

On Tue, Aug 20, 2024 at 12:21:50PM +0200, Karol Kolacinski wrote:
> From: Michal Michalik <[email-masked]>
> 
> Add specific functions and definitions for E830 devices to enable
> PTP support.
> Introduce new PHY model ICE_PHY_E830.
> E830 devices support direct write to GLTSYN_ registers without shadow
> registers and 64 bit read of PHC time.
> 
> Reviewed-by: Przemek Kitszel <[email-masked]>
> Co-developed-by: Milena Olech <[email-masked]>
> Signed-off-by: Milena Olech <[email-masked]>
> Co-developed-by: Paul Greenwalt <[email-masked]>
> Signed-off-by: Paul Greenwalt <[email-masked]>
> Signed-off-by: Michal Michalik <[email-masked]>
> Co-developed-by: Karol Kolacinski <[email-masked]>
> Signed-off-by: Karol Kolacinski <[email-masked]>

...

> diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c

...

> @@ -1405,10 +1416,11 @@ void ice_ptp_link_change(struct ice_pf *pf, u8 port, bool linkup)
>  
>  	switch (hw->mac_type) {
>  	case ICE_MAC_E810:
> -		/* Do not reconfigure E810 PHY */
> +	case ICE_MAC_E830:
> +		/* Do not reconfigure E810 or E830 PHY */
>  		return;
> -	case ICE_MAC_GENERIC_3K_E825:
>  	case ICE_MAC_GENERIC:
> +	case ICE_MAC_GENERIC_3K_E825:
>  		ice_ptp_port_phy_restart(ptp_port);
>  		return;
>  	default:

The re-ordering of ICE_MAC_GENERIC_3K_E825 does not feel like it belongs
in this patch. Perhaps it can be squashed into the earlier patch
in the series that adds the code that is being shuffled here?

...

> @@ -3271,10 +3285,8 @@ static int ice_ptp_init_port(struct ice_pf *pf, struct ice_ptp_port *ptp_port)
>  	mutex_init(&ptp_port->ps_lock);
>  
>  	switch (hw->mac_type) {
> -	case ICE_MAC_GENERIC_3K_E825:
> -		return ice_ptp_init_tx_eth56g(pf, &ptp_port->tx,
> -					      ptp_port->port_num);
>  	case ICE_MAC_E810:
> +	case ICE_MAC_E830:
>  		return ice_ptp_init_tx_e810(pf, &ptp_port->tx);
>  	case ICE_MAC_GENERIC:
>  		kthread_init_delayed_work(&ptp_port->ov_work,
> @@ -3282,6 +3294,9 @@ static int ice_ptp_init_port(struct ice_pf *pf, struct ice_ptp_port *ptp_port)
>  
>  		return ice_ptp_init_tx_e82x(pf, &ptp_port->tx,
>  					    ptp_port->port_num);
> +	case ICE_MAC_GENERIC_3K_E825:
> +		return ice_ptp_init_tx_eth56g(pf, &ptp_port->tx,
> +					      ptp_port->port_num);
>  	default:
>  		return -ENODEV;
>  	}

Ditto.

...