Re: [RFC PATCH 00/17] Drop uses of pci_read_config_*() return value

From: Christoph Hellwig
Date: Mon Aug 03 2020 - 02:57:05 EST


On Sun, Aug 02, 2020 at 02:14:06PM -0500, Bjorn Helgaas wrote:
> But what guarantees that a PCI config register cannot contain ~0?
> If there's something about that in the spec I'd love to know where it
> is because it would simplify a lot of things.

There isn't. An we even have cases like the NVMe controller memory
buffer and persistent memory region, which are BARs that store
abritrary values for later retreival, so it can't. (now those
features have a major issue with error detection, but that is another
issue)