octeontx2-af: mcs: Clear stale X2P calibration state before calibration
PATCH 1/1 octeontx2-af: mcs: Clear stale X2P calibration state before calibration
From: Viswajith Murali <[email protected]>
Some firmware versions leave MCSX_MIL_GLOBAL bit 5 set on boot. If the bit is already set when the driver attempts X2P calibration, the hardware sees no rising edge and calibration never triggers. Clear the bit and wait briefly before starting calibration to ensure a clean rising edge.
--- drivers/net/ethernet/marvell/octeontx2/af/mcs.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/net/ethernet/marvell/octeontx2/af/mcs.c +10 -0
@@ -1417,6 +1417,16 @@ static int mcs_x2p_calibration(struct mcs *mcs)int i, err =0 ;u64 val; +/* Clear any stale calibration state left by firmware/bootloader. +* Some firmware versions may leave MCSX_MIL_GLOBAL bit 5 set, +* preventing the hardware from detecting the rising edge needed to +* trigger X2P calibration. +*/ + val =mcs_reg_read (mcs,MCSX_MIL_GLOBAL ); + val &= ~BIT_ULL (5 ); +mcs_reg_write (mcs,MCSX_MIL_GLOBAL , val); +usleep_range (100 ,200 ); +/* set X2P calibration */ val =mcs_reg_read (mcs,MCSX_MIL_GLOBAL ); val |=BIT_ULL (5 );
Signature · 1 line
2.48.1
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Tue, 1 Sep 2026 15:13:17 +0530 you wrote:
From: Viswajith Murali <[email protected]>
Some firmware versions leave
MCSX_MIL_GLOBALbit 5 set on boot. If the bit is already set when the driver attempts X2P calibration, the hardware sees no rising edge and calibration never triggers. Clear the bit and wait briefly before starting calibration to ensure a clean rising edge.[...]
Here is the summary with links:
- [net] octeontx2-af: mcs: Clear stale X2P calibration state before calibration
https://git.kernel.org/netdev/net/c/1f29543126dd
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html