Skip to contentSkip to conversation

octeontx2: use dev_err_probe() for deferred probe

PATCH Applied Juuso Rinta 3 participants 3 messages Sep 1 – Sep 3

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 octeontx2: use dev_err_probe() for deferred probe

The PF and VF drivers warn and return -EPROBE_DEFER when the AF has not programmed the RVUM revision or does not answer the mailbox READY message. That is expected until rvu_af has finished initializing, so the warning is repeated on every deferred retry.

Use dev_err_probe() instead of dev_warn() so the expected deferral is not printed at warning level. -EPROBE_DEFER is logged at debug level and the reason is recorded in devices_deferred.

---
 drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 11 ++++-------
 drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c |  5 ++---
 2 files changed, 6 insertions(+), 10 deletions(-)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +4 -7
index c995f2900..529040f3e 100644
@@ -1167,10 +1167,9 @@ int otx2_register_mbox_intr(struct otx2_nic *pf, bool probe_af)
 	}
 	err = otx2_sync_mbox_msg(&pf->mbox);
 	if (err) {
-		dev_warn(pf->dev,
-			 "AF not responding to mailbox, deferring probe\n");
 		otx2_disable_mbox_intr(pf);
-		return -EPROBE_DEFER;
+		return dev_err_probe(pf->dev, -EPROBE_DEFER,
+			 "AF not responding to mailbox, deferring probe\n");
 	}
 
 	return 0;
@@ -2993,11 +2992,9 @@ int otx2_check_pf_usable(struct otx2_nic *nic)
 	 * otherwise this driver probe should be deferred
 	 * until AF driver comes up.
 	 */
-	if (!rev) {
-		dev_warn(nic->dev,
+	if (!rev)
+		return dev_err_probe(nic->dev, -EPROBE_DEFER,
 			 "AF is not initialized, deferring probe\n");
-		return -EPROBE_DEFER;
-	}
 	return 0;
 }
 
drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c +2 -3
index fcdf891f9..a02267978 100644
@@ -297,10 +297,9 @@ static int otx2vf_register_mbox_intr(struct otx2_nic *vf, bool probe_pf)
 
 	err = otx2_sync_mbox_msg(&vf->mbox);
 	if (err) {
-		dev_warn(vf->dev,
-			 "AF not responding to mailbox, deferring probe\n");
 		otx2vf_disable_mbox_intr(vf);
-		return -EPROBE_DEFER;
+		return dev_err_probe(vf->dev, -EPROBE_DEFER,
+			 "AF not responding to mailbox, deferring probe\n");
 	}
 	return 0;
 }

---
base-commit: 25c1f6111034aef7fc06cfbdcf1e4f0d6e5ee74b
change-id: 20260831-octeontx2-dev-err-probe-9ff7be8b5e6c

Best regards,

Signature · 1 line
Juuso Rinta <[email protected]>
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Juuso Rinta

The PF and VF drivers warn and return -EPROBE_DEFER when the AF has not programmed the RVUM revision or does not answer the mailbox READY message. That is expected until rvu_af has finished initializing, so the warning is repeated on every deferred retry.

Use dev_err_probe() instead of dev_warn() so the expected deferral is not printed at warning level. -EPROBE_DEFER is logged at debug level and the reason is recorded in devices_deferred.

#2 lore raw
In reply to Juuso Rinta
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:

Quoted 10 lines · On Tue, 01 Sep 2026 08:17:36 +0300 you wrote:

The PF and VF drivers warn and return -EPROBE_DEFER when the AF has not programmed the RVUM revision or does not answer the mailbox READY message. That is expected until rvu_af has finished initializing, so the warning is repeated on every deferred retry.

Use dev_err_probe() instead of dev_warn() so the expected deferral is not printed at warning level. -EPROBE_DEFER is logged at debug level and the reason is recorded in devices_deferred.

[...]

Here is the summary with links:
- [net-next] octeontx2: use dev_err_probe() for deferred probe

    https://git.kernel.org/netdev/net-next/c/e048669dccec

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html