Commit e6ab7490 authored by Alexander Schmidt's avatar Alexander Schmidt Committed by Vasily Gorbik

s390/pci: Expose new port attribute for PCIe functions

Add SysFS attribute that provides the port number for PCI functions
representing a single port of a multi-port device.
Signed-off-by: default avatarAlexander Schmidt <alexs@linux.ibm.com>
Signed-off-by: default avatarPierre Morel <pmorel@linux.ibm.com>
Reviewed-by: default avatarNiklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent ae83d0b4
...@@ -108,6 +108,7 @@ struct zpci_dev { ...@@ -108,6 +108,7 @@ struct zpci_dev {
u8 pfgid; /* function group ID */ u8 pfgid; /* function group ID */
u8 pft; /* pci function type */ u8 pft; /* pci function type */
u16 domain; u16 domain;
u8 port;
struct mutex lock; struct mutex lock;
u8 pfip[CLP_PFIP_NR_SEGMENTS]; /* pci function internal path */ u8 pfip[CLP_PFIP_NR_SEGMENTS]; /* pci function internal path */
......
...@@ -102,7 +102,8 @@ struct clp_rsp_query_pci { ...@@ -102,7 +102,8 @@ struct clp_rsp_query_pci {
u16 pchid; u16 pchid;
__le32 bar[PCI_STD_NUM_BARS]; __le32 bar[PCI_STD_NUM_BARS];
u8 pfip[CLP_PFIP_NR_SEGMENTS]; /* pci function internal path */ u8 pfip[CLP_PFIP_NR_SEGMENTS]; /* pci function internal path */
u32 : 16; u16 : 12;
u16 port : 4;
u8 fmb_len; u8 fmb_len;
u8 pft; /* pci function type */ u8 pft; /* pci function type */
u64 sdma; /* start dma as */ u64 sdma; /* start dma as */
......
...@@ -155,6 +155,7 @@ static int clp_store_query_pci_fn(struct zpci_dev *zdev, ...@@ -155,6 +155,7 @@ static int clp_store_query_pci_fn(struct zpci_dev *zdev,
zdev->pfgid = response->pfgid; zdev->pfgid = response->pfgid;
zdev->pft = response->pft; zdev->pft = response->pft;
zdev->vfn = response->vfn; zdev->vfn = response->vfn;
zdev->port = response->port;
zdev->uid = response->uid; zdev->uid = response->uid;
zdev->fmb_length = sizeof(u32) * response->fmb_len; zdev->fmb_length = sizeof(u32) * response->fmb_len;
......
...@@ -33,6 +33,7 @@ zpci_attr(pchid, "0x%04x\n", pchid); ...@@ -33,6 +33,7 @@ zpci_attr(pchid, "0x%04x\n", pchid);
zpci_attr(pfgid, "0x%02x\n", pfgid); zpci_attr(pfgid, "0x%02x\n", pfgid);
zpci_attr(vfn, "0x%04x\n", vfn); zpci_attr(vfn, "0x%04x\n", vfn);
zpci_attr(pft, "0x%02x\n", pft); zpci_attr(pft, "0x%02x\n", pft);
zpci_attr(port, "%d\n", port);
zpci_attr(uid, "0x%x\n", uid); zpci_attr(uid, "0x%x\n", uid);
zpci_attr(segment0, "0x%02x\n", pfip[0]); zpci_attr(segment0, "0x%02x\n", pfip[0]);
zpci_attr(segment1, "0x%02x\n", pfip[1]); zpci_attr(segment1, "0x%02x\n", pfip[1]);
...@@ -142,6 +143,7 @@ static struct attribute *zpci_dev_attrs[] = { ...@@ -142,6 +143,7 @@ static struct attribute *zpci_dev_attrs[] = {
&dev_attr_pchid.attr, &dev_attr_pchid.attr,
&dev_attr_pfgid.attr, &dev_attr_pfgid.attr,
&dev_attr_pft.attr, &dev_attr_pft.attr,
&dev_attr_port.attr,
&dev_attr_vfn.attr, &dev_attr_vfn.attr,
&dev_attr_uid.attr, &dev_attr_uid.attr,
&dev_attr_recover.attr, &dev_attr_recover.attr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment