s390/pci: stash version in the zpci_dev
authorMatthew Rosato <mjrosato@linux.ibm.com>
Wed, 7 Oct 2020 18:56:20 +0000 (14:56 -0400)
committerAlex Williamson <alex.williamson@redhat.com>
Wed, 7 Oct 2020 20:23:41 +0000 (14:23 -0600)
In preparation for passing the info on to vfio-pci devices, stash the
supported PCI version for the target device in the zpci_dev.

Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
Acked-by: Niklas Schnelle <schnelle@linux.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
arch/s390/include/asm/pci.h
arch/s390/pci/pci_clp.c

index 99b92c3..882e233 100644 (file)
@@ -179,6 +179,7 @@ struct zpci_dev {
        atomic64_t mapped_pages;
        atomic64_t unmapped_pages;
 
+       u8              version;
        enum pci_bus_speed max_bus_speed;
 
        struct dentry   *debugfs_dev;
index 7e735f4..48bf316 100644 (file)
@@ -102,6 +102,7 @@ static void clp_store_query_pci_fngrp(struct zpci_dev *zdev,
        zdev->msi_addr = response->msia;
        zdev->max_msi = response->noi;
        zdev->fmb_update = response->mui;
+       zdev->version = response->version;
 
        switch (response->version) {
        case 1: