]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
net: macb: Fix PTP one step sync support
authorHarini Katakam <harini.katakam@xilinx.com>
Wed, 18 May 2022 17:07:56 +0000 (22:37 +0530)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 10 Aug 2022 07:24:35 +0000 (09:24 +0200)
commitf542aba8fcec0472e17bf3685e3084c4d059b127
tree5a76e34a9240eed80a692c17cbbd51480fabd6b4
parentd332cb684ec77f720ae6368ee43726930edfc543
net: macb: Fix PTP one step sync support

BugLink: https://bugs.launchpad.net/bugs/1981864
[ Upstream commit 5cebb40bc9554aafcc492431181f43c6231b0459 ]

PTP one step sync packets cannot have CSUM padding and insertion in
SW since time stamp is inserted on the fly by HW.
In addition, ptp4l version 3.0 and above report an error when skb
timestamps are reported for packets that not processed for TX TS
after transmission.
Add a helper to identify PTP one step sync and fix the above two
errors. Add a common mask for PTP header flag field "twoStepflag".
Also reset ptp OSS bit when one step is not selected.

Fixes: ab91f0a9b5f4 ("net: macb: Add hardware PTP support")
Fixes: 653e92a9175e ("net: macb: add support for padding and fcs computation")
Signed-off-by: Harini Katakam <harini.katakam@xilinx.com>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20220518170756.7752-1-harini.katakam@xilinx.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/net/ethernet/cadence/macb_main.c
drivers/net/ethernet/cadence/macb_ptp.c
include/linux/ptp_classify.h