On Tue, Aug 20, 2024 at 12:21:50PM +0200, Karol Kolacinski wrote:
> From: Michal Michalik <[email protected]>
>
> 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 protected]>
> Co-developed-by: Milena Olech <[email protected]>
> Signed-off-by: Milena Olech <[email protected]>
> Co-developed-by: Paul Greenwalt <[email protected]>
> Signed-off-by: Paul Greenwalt <[email protected]>
> Signed-off-by: Michal Michalik <[email protected]>
> Co-developed-by: Karol Kolacinski <[email protected]>
> Signed-off-by: Karol Kolacinski <[email protected]>
...
> 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.
...