Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 4b103883 authored by Keith Busch's avatar Keith Busch Committed by Bjorn Helgaas
Browse files

PCI: Don't attempt config access to disconnected devices



If we've  detected the PCI device is disconnected, there is no need to
attempt to access its config space since we know the operation will fail.
Make all the config reads and writes return -ENODEV error immediately when
in such a state.

If a caller requests a config read to a disconnected device, return a data
value of all 1's.  This is the same as what hardware is expected to return
when accessing a removed device, but software can do this faster without
relying on hardware.

Tested-by: default avatarKrishna Dhulipala <krishnad@fb.com>
Signed-off-by: default avatarKeith Busch <keith.busch@intel.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarWei Zhang <wzhang@fb.com>
parent 89ee9f76
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment