Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

octeontx2-af: Fix PF driver crash with kexec kernel booting

During a kexec reboot the hardware is not power-cycled, so AF state from
the old kernel can persist into the new kernel. When AF and PF drivers
are built as modules, the PF driver may probe before AF reinitializes
the hardware.

The PF driver treats the RVUM block revision as an indication that AF
initialization is complete. If this value is left uncleared at shutdown,
PF may incorrectly assume AF is ready and access stale hardware state,
leading to a crash.

Clear the RVUM block revision during AF shutdown to avoid PF
mis-detecting AF readiness after kexec.

Fixes: 54494aa5d1e6 ("octeontx2-af: Add Marvell OcteonTX2 RVU AF driver")
Signed-off-by: Anshumali Gaur <agaur@marvell.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20260203050701.2616685-1-agaur@marvell.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Anshumali Gaur and committed by
Jakub Kicinski
2d2d5743 8fdb05de

+11
+11
drivers/net/ethernet/marvell/octeontx2/af/rvu.c
··· 3632 3632 devm_kfree(&pdev->dev, rvu); 3633 3633 } 3634 3634 3635 + static void rvu_shutdown(struct pci_dev *pdev) 3636 + { 3637 + struct rvu *rvu = pci_get_drvdata(pdev); 3638 + 3639 + if (!rvu) 3640 + return; 3641 + 3642 + rvu_clear_rvum_blk_revid(rvu); 3643 + } 3644 + 3635 3645 static struct pci_driver rvu_driver = { 3636 3646 .name = DRV_NAME, 3637 3647 .id_table = rvu_id_table, 3638 3648 .probe = rvu_probe, 3639 3649 .remove = rvu_remove, 3650 + .shutdown = rvu_shutdown, 3640 3651 }; 3641 3652 3642 3653 static int __init rvu_init_module(void)