[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211220120859.140453-3-radu-nicolae.pirea@oss.nxp.com>
Date: Mon, 20 Dec 2021 14:08:59 +0200
From: "Radu Pirea (NXP OSS)" <radu-nicolae.pirea@....nxp.com>
To: netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: christian.herber@....com, andrew@...n.ch, hkallweit1@...il.com,
linux@...linux.org.uk, davem@...emloft.net, kuba@...nel.org,
"Radu Pirea (NXP OSS)" <radu-nicolae.pirea@....nxp.com>
Subject: [PATCH 3/3] phy: nxp-c45-tja11xx: read the tx timestamp without lock
The tx timestamps are read from only one place in interrupt or polling
mode. Locking the mutex is useless.
Signed-off-by: Radu Pirea (NXP OSS) <radu-nicolae.pirea@....nxp.com>
---
drivers/net/phy/nxp-c45-tja11xx.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/phy/nxp-c45-tja11xx.c b/drivers/net/phy/nxp-c45-tja11xx.c
index 74de66c90f24..5bd8c166d726 100644
--- a/drivers/net/phy/nxp-c45-tja11xx.c
+++ b/drivers/net/phy/nxp-c45-tja11xx.c
@@ -381,7 +381,6 @@ static bool nxp_c45_get_hwtxts(struct nxp_c45_phy *priv,
bool valid;
u16 reg;
- mutex_lock(&priv->ptp_lock);
phy_write_mmd(priv->phydev, MDIO_MMD_VEND1, VEND1_EGR_RING_CTRL,
RING_DONE);
reg = phy_read_mmd(priv->phydev, MDIO_MMD_VEND1, VEND1_EGR_RING_DATA_0);
@@ -401,8 +400,6 @@ static bool nxp_c45_get_hwtxts(struct nxp_c45_phy *priv,
hwts->sec |= (reg & RING_DATA_3_SEC_1_0) >> 14;
nxp_c45_get_hwtxts_out:
- mutex_unlock(&priv->ptp_lock);
-
return valid;
}
--
2.34.1
Powered by blists - more mailing lists