Re: [PATCH] PCI: Stop waiting for link status after config read failure

From: Yury M.

Date: Wed Sep 09 2026 - 09:22:37 EST


I sent v2 (https://lore.kernel.org/linux-pci/20260907123853.1081635-1-yurypm@xxxxxxxxxx) of the patch for review, where I simply check pci_dev_is_disconnected().

Thanks,
Yury

On 9/5/26 11:06, Lukas Wunner wrote:
It's repetitive because pcie_capability_read_word() already checks
internally for pci_dev_is_disconnected():

pcie_capability_read_word()
pci_read_config_word()
pci_dev_is_disconnected()

I just thought that since you specifically want to bail out in the
hot-removal case, it might be clearer to check pci_dev_is_disconnected()
in pcie_wait_for_link_status() before performing the config space read.

But I don't feel strongly either way and checking the return value of
pcie_capability_read_word() is a viable approach as well.

Thanks,

Lukas