diff options
author | Niklas Schnelle <schnelle@linux.ibm.com> | 2021-07-22 12:44:08 +0300 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2021-08-25 12:03:33 +0300 |
commit | cc049eecfb7adc4bfecd05eb25e425d8def96fce (patch) | |
tree | 9a5b659a0fbef8b3615b0ec61fa0a4b9d3527e60 /arch/s390/include/asm/pci.h | |
parent | 8256adda1f44ea1ec763711aefcd25f8c0cf93f3 (diff) | |
download | linux-cc049eecfb7adc4bfecd05eb25e425d8def96fce.tar.xz |
s390/pci: simplify CLP List PCI handling
Currently clp_get_state() and clp_refresh_fh() awkwardly use the
clp_list_pci() callback mechanism to find the entry for a specific FID
and update its zdev, respectively return its state.
This is both needlessly complex and means we are always going through
the entire PCI function list even if the FID has already been found.
Instead lets introduce a clp_find_pci() function to find a specific
entry and share the CLP List PCI request handling code with
clp_list_pci().
With that in place we can also easily make the function handle a simple
out parameter instead of directly altering the zdev allowing easier
access to the updated function handle by the caller.
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/pci.h')
-rw-r--r-- | arch/s390/include/asm/pci.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/s390/include/asm/pci.h b/arch/s390/include/asm/pci.h index a5eec4410421..c51e64d49d4e 100644 --- a/arch/s390/include/asm/pci.h +++ b/arch/s390/include/asm/pci.h @@ -216,10 +216,10 @@ void zpci_remove_reserved_devices(void); int clp_setup_writeback_mio(void); int clp_scan_pci_devices(void); int clp_query_pci_fn(struct zpci_dev *zdev); -int clp_enable_fh(struct zpci_dev *, u8); -int clp_disable_fh(struct zpci_dev *); +int clp_enable_fh(struct zpci_dev *zdev, u32 *fh, u8 nr_dma_as); +int clp_disable_fh(struct zpci_dev *zdev, u32 *fh); int clp_get_state(u32 fid, enum zpci_state *state); -int clp_refresh_fh(u32 fid); +int clp_refresh_fh(u32 fid, u32 *fh); /* UID */ void update_uid_checking(bool new); |