* [PATCH net] octeontx2-af: skip absent MCS blocks in PTP configuration
@ 2026-09-13 12:52 Slavin Liu
0 siblings, 0 replies; only message in thread
From: Slavin Liu @ 2026-09-13 12:52 UTC (permalink / raw)
To: sgoutham, rkannoth, gakula, sbhatta, andrew+netdev, davem,
edumazet, kuba, pabeni
Cc: netdev, linux-kernel, bolin.liu
A successfully probed RPM does not imply a matching MCS block.
Check the independent MCS lookup before accessing PEX registers.
Detected by static analysis and reviewed with AI-assisted source auditing.
Fixes: 65cdc2b637a5 ("octeontx2-af: mcs: Config parser to skip 8B header")
Assisted-by: LLM
Signed-off-by: Slavin Liu <bolin.liu@seu.edu.cn>
---
drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c b/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c
index fce22e314cac..5e24d43d5fc7 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c
@@ -50,6 +50,8 @@ void rvu_mcs_ptp_cfg(struct rvu *rvu, u8 rpm_id, u8 lmac_id, bool ena)
/* CNF10K-B */
if (rvu->mcs_blk_cnt > 1) {
mcs = mcs_get_pdata(rpm_id);
+ if (!mcs)
+ return;
cfg = mcs_reg_read(mcs, MCSX_PEX_RX_SLAVE_PEX_CONFIGURATION);
if (ena)
cfg |= BIT_ULL(lmac_id);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-13 12:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-13 12:52 [PATCH net] octeontx2-af: skip absent MCS blocks in PTP configuration Slavin Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox