diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2016-10-11 18:21:36 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2017-01-16 07:27:52 +0100 |
commit | 64dfdd4b539f0d2e552e8b83aab119c8eafbbc83 (patch) | |
tree | be99e802d9f32b6e77f5988bbd89e4265eab347c /drivers/s390/cio | |
parent | 15a2044d7f3c1ee16de92a45f035f3abbe1bb885 (diff) |
s390/cio: export real cssid
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r-- | drivers/s390/cio/css.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index 8b608e0d2d26..8faffed61092 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c @@ -722,6 +722,18 @@ static void channel_subsystem_release(struct device *dev) kfree(css); } +static ssize_t real_cssid_show(struct device *dev, struct device_attribute *a, + char *buf) +{ + struct channel_subsystem *css = to_css(dev); + + if (css->cssid < 0) + return -EINVAL; + + return sprintf(buf, "%x\n", css->cssid); +} +static DEVICE_ATTR_RO(real_cssid); + static ssize_t cm_enable_show(struct device *dev, struct device_attribute *a, char *buf) { @@ -766,6 +778,15 @@ static umode_t cm_enable_mode(struct kobject *kobj, struct attribute *attr, return css_chsc_characteristics.secm ? attr->mode : 0; } +static struct attribute *cssdev_attrs[] = { + &dev_attr_real_cssid.attr, + NULL, +}; + +static struct attribute_group cssdev_attr_group = { + .attrs = cssdev_attrs, +}; + static struct attribute *cssdev_cm_attrs[] = { &dev_attr_cm_enable.attr, NULL, @@ -777,6 +798,7 @@ static struct attribute_group cssdev_cm_attr_group = { }; static const struct attribute_group *cssdev_attr_groups[] = { + &cssdev_attr_group, &cssdev_cm_attr_group, NULL, }; |