]> www.infradead.org Git - users/jedix/linux-maple.git/commit
vdpa/octeon_ep: Control PCI dev enabling manually
authorPhilipp Stanner <phasta@kernel.org>
Thu, 8 May 2025 08:51:35 +0000 (10:51 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 27 May 2025 14:27:53 +0000 (10:27 -0400)
commiteec812774d307f0beee12f7129a440ad314a544a
tree08e86d477d6a3f68038fd4e4c28eb4d3ab6db2fd
parentac9dcca23615b2131d6510d237b70269fdef2ad4
vdpa/octeon_ep: Control PCI dev enabling manually

PCI region request functions such as pci_request_region() currently have
the problem of becoming sometimes managed functions, if
pcim_enable_device() instead of pci_enable_device() was called. The PCI
subsystem wants to remove this deprecated behavior from its interfaces.

octeopn_ep enables its device with pcim_enable_device() (for VF. PF uses
manual management), but does so only to get automatic disablement. The
driver wants to manage its PCI resources for VF manually, without devres.

The easiest way not to use automatic resource management at all is by
also handling device enable- and disablement manually.

Replace pcim_enable_device() with pci_enable_device(). Add the necessary
calls to pci_disable_device().

Signed-off-by: Philipp Stanner <phasta@kernel.org>
Acked-by: Vamsi Attunuru <vattunuru@marvell.com>
Message-Id: <20250508085134.24084-2-phasta@kernel.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Signed-off-by: Philipp Stanner &lt;<a href="mailto:phasta@kernel.org" target="_blank">phasta@kernel.org</a>&gt;<br>
Acked-by: Vamsi Attunuru &lt;<a href="mailto:vattunuru@marvell.com" target="_blank">vattunuru@marvell.com</a>&gt;<br>
drivers/vdpa/octeon_ep/octep_vdpa_main.c