]> mj.ucw.cz Git - pciutils.git/commit
libpci: win32-cfgmgr32: Add support for accessing config space via other backend
authorPali Rohár <pali@kernel.org>
Fri, 30 Dec 2022 20:21:10 +0000 (21:21 +0100)
committerPali Rohár <pali@kernel.org>
Tue, 3 Jan 2023 23:48:12 +0000 (00:48 +0100)
commit848123ebb5a034c48797fb67ad1b19f36e2cb80c
tree3bcdcecb17653000d8f2afc3f33be1e5f0ab1f69
parent5abf19113f5fa88817d6f6e3f190c40205c46b8d
libpci: win32-cfgmgr32: Add support for accessing config space via other backend

Extend win32-cfgmgr32 backend and add a new option win32.cfgmethod for
specifying other backend for accessing PCI config space. There are more
config space access methods available on Windows and each is working only
sometimes (either requires special privileges or special setup).

So by default try to choose the first working one via order defined in pci
probe_sequence[] array. If none is available then emulate PCI config space
like before this change.

Function pci_init_v35() is extended and renamed to pci_init_internal() to
optionally do not throw errors and allow to specify one access method which
will be skipped in AUTO mode. This is used to prevent choosing win32-cfgmgr32
as config space access method for win32-cfgmgr32.
lib/init.c
lib/internal.h
lib/win32-cfgmgr32.c
pcilib.man