]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
s390/pci: Pull search for parent PF out of zpci_iov_setup_virtfn()
authorNiklas Schnelle <schnelle@linux.ibm.com>
Fri, 7 Feb 2025 12:30:16 +0000 (13:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2025 13:01:35 +0000 (14:01 +0100)
commitc746d3eb0ddfbeb9dd73194432a17ee0a5d0ad86
treebdd6c2cb30678125253e05d4c45bf24cc2e4f226
parenta6a7e8b5a98bc7c70a284e80bad491d1d7456830
s390/pci: Pull search for parent PF out of zpci_iov_setup_virtfn()

commit 05793884a1f30509e477de9da233ab73584b1c8c upstream.

This creates a new zpci_iov_find_parent_pf() function which a future
commit can use to find if a VF has a configured parent PF. Use
zdev->rid instead of zdev->devfn such that the new function can be used
before it has been decided if the RID will be exposed and zdev->devfn is
set. Also handle the hypotheical case that the RID is not available but
there is an otherwise matching zbus.

Fixes: 25f39d3dcb48 ("s390/pci: Ignore RID for isolated VFs")
Cc: stable@vger.kernel.org
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/pci/pci_iov.c