Skip to content

Commit 4c8c5dc

Browse files
atenartdavem330
authored andcommitted
net: phy: mscc: take into account the 1588 block in MACsec init
This patch takes in account the use of the 1588 block in the MACsec initialization, as a conditional configuration has to be done (when the 1588 block is used). Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 6705b58 commit 4c8c5dc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/phy/mscc/mscc_macsec.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,9 @@ static void vsc8584_macsec_mac_init(struct phy_device *phydev,
285285
MSCC_MAC_CFG_PKTINF_CFG_STRIP_PREAMBLE_ENA |
286286
MSCC_MAC_CFG_PKTINF_CFG_INSERT_PREAMBLE_ENA |
287287
(bank == HOST_MAC ?
288-
MSCC_MAC_CFG_PKTINF_CFG_ENABLE_TX_PADDING : 0));
288+
MSCC_MAC_CFG_PKTINF_CFG_ENABLE_TX_PADDING : 0) |
289+
(IS_ENABLED(CONFIG_NETWORK_PHY_TIMESTAMPING) ?
290+
MSCC_MAC_CFG_PKTINF_CFG_MACSEC_BYPASS_NUM_PTP_STALL_CLKS(0x8) : 0));
289291

290292
val = vsc8584_macsec_phy_read(phydev, bank, MSCC_MAC_CFG_MODE_CFG);
291293
val &= ~MSCC_MAC_CFG_MODE_CFG_DISABLE_DIC;

0 commit comments

Comments
 (0)