Skip to content

Commit 4fd44b8

Browse files
vladimirolteanPaolo Abeni
authored andcommitted
net: mscc: ocelot: don't report that RX timestamping is enabled by default
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 <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent 3c4bb45 commit 4fd44b8

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

drivers/net/ethernet/mscc/ocelot_ptp.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -824,11 +824,6 @@ int ocelot_init_timestamp(struct ocelot *ocelot,
824824

825825
ocelot_write(ocelot, PTP_CFG_MISC_PTP_EN, PTP_CFG_MISC);
826826

827-
/* There is no device reconfiguration, PTP Rx stamping is always
828-
* enabled.
829-
*/
830-
ocelot->hwtstamp_config.rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT;
831-
832827
return 0;
833828
}
834829
EXPORT_SYMBOL(ocelot_init_timestamp);

0 commit comments

Comments
 (0)