Re: [PATCH net] octeontx2-af: skip absent MCS blocks in PTP configuration

From: Ratheesh Kannoth

Date: Sun Sep 13 2026 - 23:05:36 EST


On 2026-09-13 at 18:22:12, Slavin Liu (bolin.liu@xxxxxxxxxx) wrote:
> 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@xxxxxxxxxx>
> ---
> 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);

Reviewed-by: Ratheesh Kannoth <rkannoth@xxxxxxxxxxx>