aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/chsc.c
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2016-07-14 11:30:37 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2016-07-15 14:31:59 +0200
commit0b601373778c770d7536b1d1761c3b2c06e4eb24 (patch)
tree5f7003c8e117db1bffacaa3102352e422cfb8f48 /drivers/s390/cio/chsc.c
parents390/chsc: fix ioctl CHSC_INFO_CU command (diff)
downloadlinux-dev-0b601373778c770d7536b1d1761c3b2c06e4eb24.tar.xz
linux-dev-0b601373778c770d7536b1d1761c3b2c06e4eb24.zip
s390/cio: make fmt1 channel path descriptor optional
Not all machines / hypervisors support the chsc commands to fetch the fmt1 descriptor. When these commands fail the channel path would currently not be available to linux. Since users of these descriptors can already deal with invalid data make fetching it optional. The only data that is mandatory for us is the fmt0 channel path descriptor. Also make the return code for missing facilities in chsc_get_channel_measurement_chars consistent to other functions. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/chsc.c')
-rw-r--r--drivers/s390/cio/chsc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c
index 452193f7298c..39bb2ea7b78f 100644
--- a/drivers/s390/cio/chsc.c
+++ b/drivers/s390/cio/chsc.c
@@ -1020,7 +1020,7 @@ int chsc_get_channel_measurement_chars(struct channel_path *chp)
chp->cmg = -1;
if (!css_chsc_characteristics.scmc || !css_chsc_characteristics.secm)
- return 0;
+ return -EINVAL;
spin_lock_irq(&chsc_page_lock);
memset(chsc_page, 0, PAGE_SIZE);