diff options
author | Shalom Toledo <shalomt@mellanox.com> | 2019-07-04 10:07:39 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-07-05 15:28:57 -0700 |
commit | 5fc1733897bff10b2a9d1fb1eae775c96cefa333 (patch) | |
tree | e7dbe75d1da0531c8b00fa72bc04fbead100ffb1 /drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h | |
parent | mlxsw: spectrum_ptp: Enable/disable PTP shaper on a port when getting HWTSTAMP on/off (diff) | |
download | linux-dev-5fc1733897bff10b2a9d1fb1eae775c96cefa333.tar.xz linux-dev-5fc1733897bff10b2a9d1fb1eae775c96cefa333.zip |
mlxsw: spectrum: Set up PTP shaper when port status has changed
When getting port up down event (PUDE), change the PTP shaper
configuration based on hardware time stamping on/off and the port's
speed.
Signed-off-by: Shalom Toledo <shalomt@mellanox.com>
Reviewed-by: Petr Machata <petrm@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h index b23abfc0bd76..72e55f6926b9 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h @@ -54,6 +54,8 @@ int mlxsw_sp1_ptp_hwtstamp_get(struct mlxsw_sp_port *mlxsw_sp_port, int mlxsw_sp1_ptp_hwtstamp_set(struct mlxsw_sp_port *mlxsw_sp_port, struct hwtstamp_config *config); +void mlxsw_sp1_ptp_shaper_work(struct work_struct *work); + int mlxsw_sp1_ptp_get_ts_info(struct mlxsw_sp *mlxsw_sp, struct ethtool_ts_info *info); @@ -113,6 +115,10 @@ mlxsw_sp1_ptp_hwtstamp_set(struct mlxsw_sp_port *mlxsw_sp_port, return -EOPNOTSUPP; } +static inline void mlxsw_sp1_ptp_shaper_work(struct work_struct *work) +{ +} + static inline int mlxsw_sp1_ptp_get_ts_info(struct mlxsw_sp *mlxsw_sp, struct ethtool_ts_info *info) { @@ -167,6 +173,10 @@ mlxsw_sp2_ptp_hwtstamp_set(struct mlxsw_sp_port *mlxsw_sp_port, return -EOPNOTSUPP; } +static inline void mlxsw_sp2_ptp_shaper_work(struct work_struct *work) +{ +} + static inline int mlxsw_sp2_ptp_get_ts_info(struct mlxsw_sp *mlxsw_sp, struct ethtool_ts_info *info) { |