hc
2024-05-10 61598093bbdd283a7edc367d900f223070ead8d2
kernel/arch/s390/pci/pci_sysfs.c
....@@ -33,11 +33,21 @@
3333 zpci_attr(pfgid, "0x%02x\n", pfgid);
3434 zpci_attr(vfn, "0x%04x\n", vfn);
3535 zpci_attr(pft, "0x%02x\n", pft);
36
+zpci_attr(port, "%d\n", port);
3637 zpci_attr(uid, "0x%x\n", uid);
3738 zpci_attr(segment0, "0x%02x\n", pfip[0]);
3839 zpci_attr(segment1, "0x%02x\n", pfip[1]);
3940 zpci_attr(segment2, "0x%02x\n", pfip[2]);
4041 zpci_attr(segment3, "0x%02x\n", pfip[3]);
42
+
43
+static ssize_t mio_enabled_show(struct device *dev,
44
+ struct device_attribute *attr, char *buf)
45
+{
46
+ struct zpci_dev *zdev = to_zpci(to_pci_dev(dev));
47
+
48
+ return sprintf(buf, zpci_use_mio(zdev) ? "1\n" : "0\n");
49
+}
50
+static DEVICE_ATTR_RO(mio_enabled);
4151
4252 static ssize_t recover_store(struct device *dev, struct device_attribute *attr,
4353 const char *buf, size_t count)
....@@ -79,7 +89,7 @@
7989 ret = zpci_enable_device(zdev);
8090 if (ret)
8191 goto out;
82
- pci_rescan_bus(zdev->bus);
92
+ pci_rescan_bus(zdev->zbus->bus);
8393 }
8494 out:
8595 pci_unlock_rescan_remove();
....@@ -133,9 +143,11 @@
133143 &dev_attr_pchid.attr,
134144 &dev_attr_pfgid.attr,
135145 &dev_attr_pft.attr,
146
+ &dev_attr_port.attr,
136147 &dev_attr_vfn.attr,
137148 &dev_attr_uid.attr,
138149 &dev_attr_recover.attr,
150
+ &dev_attr_mio_enabled.attr,
139151 NULL,
140152 };
141153 static struct attribute_group zpci_attr_group = {