From: Eric Joyner <eric.joyner@amd.com>
To: <netdev@vger.kernel.org>
Cc: Brett Creeley <brett.creeley@amd.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Eric Joyner <eric.joyner@amd.com>
Subject: [PATCH net 1/7] ionic: Allow the first devcmd to trigger deferred probe
Date: Wed, 29 Apr 2026 14:00:01 -0700 [thread overview]
Message-ID: <20260429210007.40015-2-eric.joyner@amd.com> (raw)
In-Reply-To: <20260429210007.40015-1-eric.joyner@amd.com>
From: Brett Creeley <brett.creeley@amd.com>
The BAR signature can become visible before firmware is ready to process
device commands. In that window the first devcmd may fail even though
the device is present.
Treat a failure of the first devcmd as deferred probe and return
-EPROBE_DEFER, so probe is retried after firmware initialization
completes.
Also reduce log severity for reset-devcmd failures in this path: these
early failures are expected during firmware bring-up and should not emit
the standard devcmd failure messages.
A possible follow-up is to rework ionic_reset() to retry on -EAGAIN and
-EAGAIN/ETIMEDOUT style transient failures, but this change keeps the
current reset flow unchanged.
Fixes: fbfb8031533c ("ionic: Add hardware init and device commands")
Signed-off-by: Brett Creeley <brett.creeley@amd.com>
Signed-off-by: Eric Joyner <eric.joyner@amd.com>
---
drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | 8 ++++++--
drivers/net/ethernet/pensando/ionic/ionic_main.c | 8 ++++++--
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
index 05f19489ec5c..59ce35404e53 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
@@ -260,7 +260,8 @@ static int ionic_setup_one(struct ionic *ionic)
/* Configure the device */
err = ionic_setup(ionic);
if (err) {
- dev_err(dev, "Cannot setup device: %d, aborting\n", err);
+ if (err != -EPROBE_DEFER)
+ dev_err(dev, "Cannot setup device: %d, aborting\n", err);
goto err_out_clear_pci;
}
pci_set_master(pdev);
@@ -335,8 +336,11 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
#endif
err = ionic_setup_one(ionic);
- if (err)
+ if (err) {
+ if (err == -EPROBE_DEFER)
+ dev_info(dev, "Device isn't ready, deferring probe\n");
goto err_out;
+ }
/* Allocate and init the LIF */
err = ionic_lif_size(ionic);
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_main.c b/drivers/net/ethernet/pensando/ionic/ionic_main.c
index 3c5200e2fdb7..91f89b9ff807 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_main.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_main.c
@@ -603,7 +603,11 @@ int ionic_setup(struct ionic *ionic)
err = ionic_dev_setup(ionic);
if (err)
return err;
- ionic_reset(ionic);
+
+ err = ionic_reset(ionic);
+ /* firmware may not be ready to respond yet */
+ if (err == -EAGAIN || err == -ETIMEDOUT)
+ return -EPROBE_DEFER;
return 0;
}
@@ -687,7 +691,7 @@ int ionic_reset(struct ionic *ionic)
mutex_lock(&ionic->dev_cmd_lock);
ionic_dev_cmd_reset(idev);
- err = ionic_dev_cmd_wait(ionic, DEVCMD_TIMEOUT);
+ err = ionic_dev_cmd_wait_nomsg(ionic, DEVCMD_TIMEOUT);
mutex_unlock(&ionic->dev_cmd_lock);
return err;
--
2.17.1
next prev parent reply other threads:[~2026-04-29 21:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 21:00 [PATCH net 0/7] ionic: Various bugfixes Eric Joyner
2026-04-29 21:00 ` Eric Joyner [this message]
2026-04-29 21:00 ` [PATCH net 2/7] ionic: Handle failures from ionic_reset() when relevant Eric Joyner
2026-04-29 21:00 ` [PATCH net 3/7] ionic: Fix unexpected dev_cmd failures Eric Joyner
2026-04-29 21:00 ` [PATCH net 4/7] ionic: Fix check in ionic_get_link_ext_stats Eric Joyner
2026-04-29 21:00 ` [PATCH net 5/7] ionic: fix adminq use-after-free on command timeout Eric Joyner
2026-05-01 3:31 ` Eric Joyner
2026-04-29 21:00 ` [PATCH net 6/7] ionic: service adminq CQ before cancelling to avoid false timeouts Eric Joyner
2026-04-29 21:00 ` [PATCH net 7/7] ionic: fix completion descriptor access with 2x desc size Eric Joyner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260429210007.40015-2-eric.joyner@amd.com \
--to=eric.joyner@amd.com \
--cc=andrew+netdev@lunn.ch \
--cc=brett.creeley@amd.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox