🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
1 messages
1 total messages Started by Ziheng Wei Mon, 30 Nov 2026 13:41
[PATCH net v2] octeontx2-pf: propagate ME IRQ registration failures
#24637
Author: Ziheng Wei
Date: Mon, 30 Nov 2026 13:41
73 lines
10250 bytes
ME request_irq() failures are only logged. The next request overwrites
ret, so SR-IOV is enabled without its ME handler.

Return ME errors like FLR errors and unwind all IRQs already registered
by the failing call.

Found by LLM-assisted static analysis. Build tested with allmodconfig;
no runtime fault-injection test.

Fixes: 547d20f10dc5 ("octeontx2-pf: Handle VF function level reset")
Cc: stable@vger.kernel.org
Signed-off-by: Ziheng Wei <zihengw03@163.com>
---
v1 -> v2:
- Fix Fixes tag to 547d20f10dc5 ("octeontx2-pf: Handle VF function level
  reset") (thanks to Sashiko AI review and Daniel Machon).
- v1: https://lore.kernel.org/r/20261123102322.8620-1-zihengw03@163.com

diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
@@ -213,6 +213,7 @@
 	if (ret) {
 		dev_err(pf->dev,
 			"RVUPF: IRQ registration failed for ME0\n");
+		return ret;
 	}
 
 	/* Register FLR interrupt handler */
@@ -224,7 +225,7 @@
 	if (ret) {
 		dev_err(pf->dev,
 			"RVUPF: IRQ registration failed for FLR0\n");
-		return ret;
+		goto free_me0;
 	}
 
 	if (numvfs > 64) {
@@ -237,6 +238,7 @@
 		if (ret) {
 			dev_err(pf->dev,
 				"RVUPF: IRQ registration failed for ME1\n");
+			goto free_flr0;
 		}
 		irq_name = &hw->irq_name[RVU_PF_INT_VEC_VFFLR1 * NAME_SIZE];
 		snprintf(irq_name, NAME_SIZE, "RVUPF%d_FLR1",
@@ -247,7 +249,7 @@
 		if (ret) {
 			dev_err(pf->dev,
 				"RVUPF: IRQ registration failed for FLR1\n");
-			return ret;
+			goto free_me1;
 		}
 	}
 
@@ -271,6 +273,14 @@
 			     INTR_MASK(numvfs));
 	}
 	return 0;
+
+free_me1:
+	free_irq(pci_irq_vector(pf->pdev, RVU_PF_INT_VEC_VFME1), pf);
+free_flr0:
+	free_irq(pci_irq_vector(pf->pdev, RVU_PF_INT_VEC_VFFLR0), pf);
+free_me0:
+	free_irq(pci_irq_vector(pf->pdev, RVU_PF_INT_VEC_VFME0), pf);
+	return ret;
 }
 
 static int otx2_pf_flr_init(struct otx2_nic *pf, int num_vfs)

base-commit: 97d73c8251226cf27cc6656b4c542869bb8c69fa
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads