aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2013-01-28 13:32:27 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-02-14 09:55:08 -0500
commit84c57ad5d938ff28d85ac93b79c1f918a767a23e (patch)
treea16bfed7f9871eba623f50b40605b22546f77534
parente6a0b7c90f9f2663f470bbfaf83afcf52f8459e8 (diff)
s390/cio: export vpm via sysfs
Add new attribute "vpm" to the subchannel sysfs directory of I/O subchannels. This attribute contains a path mask indicating which channel paths were successfully verified to be usable for I/O. Reviewed-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--drivers/s390/cio/device.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index 7cd5c6812ac7..c6767f5a58b2 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -632,6 +632,14 @@ initiate_logging(struct device *dev, struct device_attribute *attr,
632 return count; 632 return count;
633} 633}
634 634
635static ssize_t vpm_show(struct device *dev, struct device_attribute *attr,
636 char *buf)
637{
638 struct subchannel *sch = to_subchannel(dev);
639
640 return sprintf(buf, "%02x\n", sch->vpm);
641}
642
635static DEVICE_ATTR(chpids, 0444, chpids_show, NULL); 643static DEVICE_ATTR(chpids, 0444, chpids_show, NULL);
636static DEVICE_ATTR(pimpampom, 0444, pimpampom_show, NULL); 644static DEVICE_ATTR(pimpampom, 0444, pimpampom_show, NULL);
637static DEVICE_ATTR(devtype, 0444, devtype_show, NULL); 645static DEVICE_ATTR(devtype, 0444, devtype_show, NULL);
@@ -640,11 +648,13 @@ static DEVICE_ATTR(modalias, 0444, modalias_show, NULL);
640static DEVICE_ATTR(online, 0644, online_show, online_store); 648static DEVICE_ATTR(online, 0644, online_show, online_store);
641static DEVICE_ATTR(availability, 0444, available_show, NULL); 649static DEVICE_ATTR(availability, 0444, available_show, NULL);
642static DEVICE_ATTR(logging, 0200, NULL, initiate_logging); 650static DEVICE_ATTR(logging, 0200, NULL, initiate_logging);
651static DEVICE_ATTR(vpm, 0444, vpm_show, NULL);
643 652
644static struct attribute *io_subchannel_attrs[] = { 653static struct attribute *io_subchannel_attrs[] = {
645 &dev_attr_chpids.attr, 654 &dev_attr_chpids.attr,
646 &dev_attr_pimpampom.attr, 655 &dev_attr_pimpampom.attr,
647 &dev_attr_logging.attr, 656 &dev_attr_logging.attr,
657 &dev_attr_vpm.attr,
648 NULL, 658 NULL,
649}; 659};
650 660