]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
s390/pci: Expose FIDPARM attribute in sysfs
authorNiklas Schnelle <schnelle@linux.ibm.com>
Wed, 2 Oct 2024 08:29:00 +0000 (10:29 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Thu, 10 Oct 2024 13:32:44 +0000 (15:32 +0200)
This attribute will be used to communicate function type specific
firmware controlled flag bits.

Reviewed-by: Gerd Bayer <gbayer@linux.ibm.com>
Reviewed-by: Alexandra Winter <wintera@linux.ibm.com>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/include/asm/pci.h
arch/s390/include/asm/pci_clp.h
arch/s390/pci/pci_clp.c
arch/s390/pci/pci_sysfs.c

index e107eda7af86fc12fe8ee66a9668264b77cbdb95..5013a690837ecf963e4658479dd0577e7ea16200 100644 (file)
@@ -136,6 +136,7 @@ struct zpci_dev {
        u8              pfgid;          /* function group ID */
        u8              pft;            /* pci function type */
        u8              port;
+       u8              fidparm;
        u8              dtsm;           /* Supported DT mask */
        u8              rid_available   : 1;
        u8              has_hp_slot     : 1;
index 14afb9ce91f3bc6804de7c732ca22ae71300038e..3fff2f7095c8c9ecc2ba05dda0b1638cca0c54bf 100644 (file)
@@ -123,8 +123,9 @@ struct clp_rsp_query_pci {
        u16 pchid;
        __le32 bar[PCI_STD_NUM_BARS];
        u8 pfip[CLP_PFIP_NR_SEGMENTS];  /* pci function internal path */
-       u16                     : 12;
-       u16 port                :  4;
+       u8 fidparm;
+       u8 reserved3            :  4;
+       u8 port                 :  4;
        u8 fmb_len;
        u8 pft;                         /* pci function type */
        u64 sdma;                       /* start dma as */
index 74dac6da03d5bbf424401cc1304312e42dbfeaf8..08987ac8dd35f47684915561513abaf5b4d2b04e 100644 (file)
@@ -162,6 +162,7 @@ static int clp_store_query_pci_fn(struct zpci_dev *zdev,
        zdev->pft = response->pft;
        zdev->vfn = response->vfn;
        zdev->port = response->port;
+       zdev->fidparm = response->fidparm;
        zdev->uid = response->uid;
        zdev->fmb_length = sizeof(u32) * response->fmb_len;
        zdev->is_physfn = response->is_physfn;
index 055a75b3f59d7e7abc3b3b24e19eb9afa32a22e9..5f46ad58dcd1c3fda7e95aeabcdd10cdf9efd64e 100644 (file)
@@ -34,6 +34,7 @@ zpci_attr(pfgid, "0x%02x\n", pfgid);
 zpci_attr(vfn, "0x%04x\n", vfn);
 zpci_attr(pft, "0x%02x\n", pft);
 zpci_attr(port, "%d\n", port);
+zpci_attr(fidparm, "0x%02x\n", fidparm);
 zpci_attr(uid, "0x%x\n", uid);
 zpci_attr(segment0, "0x%02x\n", pfip[0]);
 zpci_attr(segment1, "0x%02x\n", pfip[1]);
@@ -215,6 +216,7 @@ static struct attribute *zpci_dev_attrs[] = {
        &dev_attr_pfgid.attr,
        &dev_attr_pft.attr,
        &dev_attr_port.attr,
+       &dev_attr_fidparm.attr,
        &dev_attr_vfn.attr,
        &dev_attr_uid.attr,
        &dev_attr_recover.attr,