Skip to content

Commit 2f61f38

Browse files
Russell King (Oracle)kuba-moo
authored andcommitted
net: stmmac: fix timestamping configuration after suspend/resume
When stmmac_init_timestamping() is called, it clears the receive and transmit path booleans that allow timestamps to be read. These are never re-initialised until after userspace requests timestamping features to be enabled. However, our copy of the timestamp configuration is not cleared, which means we return the old configuration to userspace when requested. This is inconsistent. Fix this by clearing the timestamp configuration. Fixes: d6228b7 ("net: stmmac: implement the SIOCGHWTSTAMP ioctl") Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/E1vuUu4-0000000Afea-0j9B@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 1348659 commit 2f61f38

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,7 @@ static int stmmac_init_timestamping(struct stmmac_priv *priv)
853853
netdev_info(priv->dev,
854854
"IEEE 1588-2008 Advanced Timestamp supported\n");
855855

856+
memset(&priv->tstamp_config, 0, sizeof(priv->tstamp_config));
856857
priv->hwts_tx_en = 0;
857858
priv->hwts_rx_en = 0;
858859

0 commit comments

Comments
 (0)