netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] phy: mscc: Fix parsing of unicast frames
@ 2025-07-26 14:03 Horatiu Vultur
  2025-07-26 15:07 ` Andrew Lunn
  2025-07-31  1:20 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Horatiu Vultur @ 2025-07-26 14:03 UTC (permalink / raw)
  To: andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni,
	richardcochran, viro, quentin.schulz, atenart
  Cc: netdev, linux-kernel, Horatiu Vultur

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: ab2bf9339357 ("net: phy: mscc: 1588 block initialization")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
---
 drivers/net/phy/mscc/mscc_ptp.c | 1 +
 drivers/net/phy/mscc/mscc_ptp.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/net/phy/mscc/mscc_ptp.c b/drivers/net/phy/mscc/mscc_ptp.c
index 6b800081eed52..275706de5847c 100644
--- a/drivers/net/phy/mscc/mscc_ptp.c
+++ b/drivers/net/phy/mscc/mscc_ptp.c
@@ -900,6 +900,7 @@ static int vsc85xx_eth1_conf(struct phy_device *phydev, enum ts_blk blk,
 				     get_unaligned_be32(ptp_multicast));
 	} else {
 		val |= ANA_ETH1_FLOW_ADDR_MATCH2_ANY_MULTICAST;
+		val |= ANA_ETH1_FLOW_ADDR_MATCH2_ANY_UNICAST;
 		vsc85xx_ts_write_csr(phydev, blk,
 				     MSCC_ANA_ETH1_FLOW_ADDR_MATCH2(0), val);
 		vsc85xx_ts_write_csr(phydev, blk,
diff --git a/drivers/net/phy/mscc/mscc_ptp.h b/drivers/net/phy/mscc/mscc_ptp.h
index da3465360e901..ae9ad925bfa8c 100644
--- a/drivers/net/phy/mscc/mscc_ptp.h
+++ b/drivers/net/phy/mscc/mscc_ptp.h
@@ -98,6 +98,7 @@
 #define MSCC_ANA_ETH1_FLOW_ADDR_MATCH2(x) (MSCC_ANA_ETH1_FLOW_ENA(x) + 3)
 #define ANA_ETH1_FLOW_ADDR_MATCH2_MASK_MASK	GENMASK(22, 20)
 #define ANA_ETH1_FLOW_ADDR_MATCH2_ANY_MULTICAST	0x400000
+#define ANA_ETH1_FLOW_ADDR_MATCH2_ANY_UNICAST	0x200000
 #define ANA_ETH1_FLOW_ADDR_MATCH2_FULL_ADDR	0x100000
 #define ANA_ETH1_FLOW_ADDR_MATCH2_SRC_DEST_MASK	GENMASK(17, 16)
 #define ANA_ETH1_FLOW_ADDR_MATCH2_SRC_DEST	0x020000
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] phy: mscc: Fix parsing of unicast frames
  2025-07-26 14:03 [PATCH net] phy: mscc: Fix parsing of unicast frames Horatiu Vultur
@ 2025-07-26 15:07 ` Andrew Lunn
  2025-07-31  1:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2025-07-26 15:07 UTC (permalink / raw)
  To: Horatiu Vultur
  Cc: hkallweit1, linux, davem, edumazet, kuba, pabeni, richardcochran,
	viro, quentin.schulz, atenart, netdev, linux-kernel

On Sat, Jul 26, 2025 at 04:03:07PM +0200, Horatiu Vultur wrote:
> 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: ab2bf9339357 ("net: phy: mscc: 1588 block initialization")
> Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] phy: mscc: Fix parsing of unicast frames
  2025-07-26 14:03 [PATCH net] phy: mscc: Fix parsing of unicast frames Horatiu Vultur
  2025-07-26 15:07 ` Andrew Lunn
@ 2025-07-31  1:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-07-31  1:20 UTC (permalink / raw)
  To: Horatiu Vultur
  Cc: andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni,
	richardcochran, viro, quentin.schulz, atenart, netdev,
	linux-kernel

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Sat, 26 Jul 2025 16:03:07 +0200 you wrote:
> 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: ab2bf9339357 ("net: phy: mscc: 1588 block initialization")
> Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
> 
> [...]

Here is the summary with links:
  - [net] phy: mscc: Fix parsing of unicast frames
    https://git.kernel.org/netdev/net/c/6fb5ff63b35b

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-07-31  1:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-26 14:03 [PATCH net] phy: mscc: Fix parsing of unicast frames Horatiu Vultur
2025-07-26 15:07 ` Andrew Lunn
2025-07-31  1:20 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).