Skip to content

Commit 6fb5ff6

Browse files
HoratiuVulturkuba-moo
authored andcommitted
phy: mscc: Fix parsing of unicast frames
According to the 1588 standard, it is possible to use both unicast and multicast frames to send the PTP information. It was noticed that if the frames were unicast they were not processed by the analyzer meaning that they were not timestamped. Therefore fix this to match also these unicast frames. Fixes: ab2bf93 ("net: phy: mscc: 1588 block initialization") Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20250726140307.3039694-1-horatiu.vultur@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 2da4def commit 6fb5ff6

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

drivers/net/phy/mscc/mscc_ptp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -900,6 +900,7 @@ static int vsc85xx_eth1_conf(struct phy_device *phydev, enum ts_blk blk,
900900
get_unaligned_be32(ptp_multicast));
901901
} else {
902902
val |= ANA_ETH1_FLOW_ADDR_MATCH2_ANY_MULTICAST;
903+
val |= ANA_ETH1_FLOW_ADDR_MATCH2_ANY_UNICAST;
903904
vsc85xx_ts_write_csr(phydev, blk,
904905
MSCC_ANA_ETH1_FLOW_ADDR_MATCH2(0), val);
905906
vsc85xx_ts_write_csr(phydev, blk,

drivers/net/phy/mscc/mscc_ptp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
#define MSCC_ANA_ETH1_FLOW_ADDR_MATCH2(x) (MSCC_ANA_ETH1_FLOW_ENA(x) + 3)
9999
#define ANA_ETH1_FLOW_ADDR_MATCH2_MASK_MASK GENMASK(22, 20)
100100
#define ANA_ETH1_FLOW_ADDR_MATCH2_ANY_MULTICAST 0x400000
101+
#define ANA_ETH1_FLOW_ADDR_MATCH2_ANY_UNICAST 0x200000
101102
#define ANA_ETH1_FLOW_ADDR_MATCH2_FULL_ADDR 0x100000
102103
#define ANA_ETH1_FLOW_ADDR_MATCH2_SRC_DEST_MASK GENMASK(17, 16)
103104
#define ANA_ETH1_FLOW_ADDR_MATCH2_SRC_DEST 0x020000

0 commit comments

Comments
 (0)