summaryrefslogtreecommitdiff
path: root/arch/s390/pci
diff options
context:
space:
mode:
authorPierre Morel <pmorel@linux.ibm.com>2020-02-21 12:06:38 +0300
committerVasily Gorbik <gor@linux.ibm.com>2020-04-28 14:49:46 +0300
commitc9a1752b84f1a8f73187c116ff0514b2ab24d878 (patch)
tree07ac7933d9619a6f5cff7940e81bc0749c70adec /arch/s390/pci
parent6cf17f9a67c124aa4739b79709008d942635b975 (diff)
downloadlinux-c9a1752b84f1a8f73187c116ff0514b2ab24d878.tar.xz
s390/pci: define RID and RID available
Firmware provides the bus/devfn part of the PCI addresses of a zPCI function inside the new field RID of the CLP query PCI function with a bit to know if this field is available to use. Let's add these fields to the clp_rsp_query_pci structure, add corresponding fields to zdev and initialize them. Signed-off-by: Pierre Morel <pmorel@linux.ibm.com> Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/pci')
-rw-r--r--arch/s390/pci/pci_clp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/s390/pci/pci_clp.c b/arch/s390/pci/pci_clp.c
index f7bca8cfa92c..9b318824a134 100644
--- a/arch/s390/pci/pci_clp.c
+++ b/arch/s390/pci/pci_clp.c
@@ -158,6 +158,9 @@ static int clp_store_query_pci_fn(struct zpci_dev *zdev,
zdev->port = response->port;
zdev->uid = response->uid;
zdev->fmb_length = sizeof(u32) * response->fmb_len;
+ zdev->rid_available = response->rid_avail;
+ if (!s390_pci_no_rid && zdev->rid_available)
+ zdev->devfn = response->rid & ZPCI_RID_MASK_DEVFN;
memcpy(zdev->pfip, response->pfip, sizeof(zdev->pfip));
if (response->util_str_avail) {