octeontx-af: fix hardware timestamp configuration
authorHariprasad Kelam <hkelam@marvell.com>
Tue, 4 Jul 2023 04:26:53 +0000 (09:56 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Jul 2023 14:22:06 +0000 (16:22 +0200)
[ Upstream commit 14bb236b29922c4f57d8c05bfdbcb82677f917c9 ]

MAC block on CN10K (RPM) supports hardware timestamp configuration. The
previous patch which added timestamp configuration support has a bug.
Though the netdev driver requests to disable timestamp configuration,
the driver is always enabling it.

This patch fixes the same.

Fixes: d1489208681d ("octeontx2-af: cn10k: RPM hardware timestamp configuration")
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c

index e284a14ca1203f1018581bb3abcd76ad256a9d27..c60b9580ca9694f4777ad996c665f36d13db0df7 100644 (file)
@@ -751,7 +751,7 @@ static int rvu_cgx_ptp_rx_cfg(struct rvu *rvu, u16 pcifunc, bool enable)
        cgxd = rvu_cgx_pdata(cgx_id, rvu);
 
        mac_ops = get_mac_ops(cgxd);
-       mac_ops->mac_enadis_ptp_config(cgxd, lmac_id, true);
+       mac_ops->mac_enadis_ptp_config(cgxd, lmac_id, enable);
        /* If PTP is enabled then inform NPC that packets to be
         * parsed by this PF will have their data shifted by 8 bytes
         * and if PTP is disabled then no shift is required