]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
LinuxKPI: return an address string in pci_name()
authorVal Packett <val@packett.cool>
Mon, 6 Feb 2023 21:50:13 +0000 (21:50 +0000)
committerBjoern A. Zeeb <bz@FreeBSD.org>
Mon, 6 Feb 2023 21:56:39 +0000 (21:56 +0000)
commit393b0ba25f1a54dcc3f94244933c665f1c471d1a
tree5bf718431f161a438b9224a1d9a77a534c507b19
parentf374ba41f55c1a127303d92d830dd58eef2f5243
LinuxKPI: return an address string in pci_name()

amdgpu's virtual display feature uses pci_name() to match a module parameter
string, and the documentation shows an example of `0000:26:00.0` for the name.
In our case the name was just `drmn`, which is not actually unique across
devices.

The other consumers are wireless drivers, which will benefit from this
change.

Generate the expected string for pci_name() to return.

Related to: https://github.com/freebsd/drm-kmod/issues/134
Sponsored by: https://www.patreon.com/valpackett
Reviewed by: bz, hselasky, manu (earlier)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D34248
sys/compat/linuxkpi/common/include/linux/pci.h
sys/compat/linuxkpi/common/src/linux_pci.c