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

From: Cheatham, Benjamin

Date: Fri Oct 30 2026 - 17:10:31 EST


On 9/28/2026 9:04 PM, Richard Cheng wrote:
> pci_dev_wait() return -ENOTTY when the device fails to become ready. The
> reset framekwork interprets this as an unsupported reset method and may

typo in framework

> try another method.
>
> Return -ETIMEOUT to report the timeout and stop reset-method fallback.
>
and -ETIMEOUT is missing the 'D'.

The sashiko report also brought up my first thought with this, which is that there may
be a device and/or driver that relies on this behavior. I'm *extremely* far from an expert
on PCI code though, so someone else will have to weigh in.

> 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) {