]> git.ipfire.org Git - thirdparty/pciutils.git/commit
lspci: Fix detection of memory space bar
authorPali Rohár <pali@kernel.org>
Thu, 10 Mar 2022 20:38:18 +0000 (21:38 +0100)
committerPali Rohár <pali@kernel.org>
Fri, 15 Apr 2022 22:01:13 +0000 (00:01 +0200)
commitdcd6913ec2afa8ec1030bf63df7ca69622cbf4f9
treef97a146475c754e3afddb31d1c8d8ab21cf5fd8f
parent861063f33eda73455532d71a55987556dc98448e
lspci: Fix detection of memory space bar

intel-conf1 backend never show AtomicOpsCap: capabilities despite the fact
that is successfuly detects memory bars on device. But other backends show
this capability.

Error is in device_has_memory_space_bar() function, it expects that ->size
member is always filled. But size of the BAR is not available in PCI config
space and therefore raw backends cannot retrieve it.

Probably intention of the non-zero check was to verify that base address
was filled with non-zero size. So either base address is non-zero or length
is non-zero. Adjust check.
ls-caps.c