Skip to content

Commit

Permalink
net: mscc: ocelot: don't report that RX timestamping is enabled by de…
Browse files Browse the repository at this point in the history
…fault

PTP RX timestamping should be enabled when the user requests it, not by
default. If it is enabled by default, it can be problematic when the
ocelot driver is a DSA master, and it sidesteps what DSA tries to avoid
through __dsa_master_hwtstamp_validate().

Additionally, after the change which made ocelot trap PTP packets only
to the CPU at ocelot_hwtstamp_set() time, it is no longer even true that
RX timestamping is enabled by default, because until ocelot_hwtstamp_set()
is called, the PTP traps are actually not set up. So the rx_filter field
of ocelot->hwtstamp_config reflects an incorrect reality.

Fixes: 96ca08c ("net: mscc: ocelot: set up traps for PTP packets")
Fixes: 4e3b046 ("net: mscc: PTP Hardware Clock (PHC) support")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
  • Loading branch information
Vladimir Oltean authored and Paolo Abeni committed Jun 29, 2023
1 parent 3c4bb45 commit 4fd44b8
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/net/ethernet/mscc/ocelot_ptp.c
Original file line number Diff line number Diff line change
Expand Up @@ -824,11 +824,6 @@ int ocelot_init_timestamp(struct ocelot *ocelot,

ocelot_write(ocelot, PTP_CFG_MISC_PTP_EN, PTP_CFG_MISC);

/* There is no device reconfiguration, PTP Rx stamping is always
* enabled.
*/
ocelot->hwtstamp_config.rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT;

return 0;
}
EXPORT_SYMBOL(ocelot_init_timestamp);
Expand Down

0 comments on commit 4fd44b8

Please sign in to comment.