[PATCH 2/4] PCI: Return -ETIMEOUT when reset readiness polling expires

From: Richard Cheng

Date: Mon Sep 28 2026 - 22:07:44 EST


pci_dev_wait() return -ENOTTY when the device fails to become ready. The
reset framekwork interprets this as an unsupported reset method and may
try another method.

Return -ETIMEOUT to report the timeout and stop reset-method fallback.

Signed-off-by: Richard Cheng <icheng@xxxxxxxxxx>
---
drivers/pci/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 6461274bdbcf..d59a374a350d 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1279,7 +1279,7 @@ static int pci_dev_wait(struct pci_dev *dev, char *reset_type, int timeout)
if (delay > timeout) {
pci_err(dev, "not ready %dms after %s; giving up\n",
delay - 1, reset_type);
- return -ENOTTY;
+ return -ETIMEDOUT;
}

if (delay > PCI_RESET_WAIT) {
--
2.43.0