diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2006-03-06 15:43:02 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-06 18:40:45 -0800 |
commit | 15730ddbf745fbda9001b8bbd71977ac66bf5f41 (patch) | |
tree | 37860475502b1ecef34cd98900cc8af3aac6952b /drivers | |
parent | de1d9c033f32ce39bf60e25be3b8624225fa9181 (diff) | |
download | op-kernel-dev-15730ddbf745fbda9001b8bbd71977ac66bf5f41.zip op-kernel-dev-15730ddbf745fbda9001b8bbd71977ac66bf5f41.tar.gz |
[PATCH] s390: improve response code handling in chsc_enable_facility()
Rather than checking for some known failures, check positively for the
success response code 0x0001 and return -EIO for unrecognized failure
response codes.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Greg Smith <gsmith@nc.rr.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/s390/cio/chsc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c index 8cf9905..f4183d6 100644 --- a/drivers/s390/cio/chsc.c +++ b/drivers/s390/cio/chsc.c @@ -1115,6 +1115,9 @@ chsc_enable_facility(int operation_code) goto out; } switch (sda_area->response.code) { + case 0x0001: /* everything ok */ + ret = 0; + break; case 0x0003: /* invalid request block */ case 0x0007: ret = -EINVAL; @@ -1123,6 +1126,8 @@ chsc_enable_facility(int operation_code) case 0x0101: /* facility not provided */ ret = -EOPNOTSUPP; break; + default: /* something went wrong */ + ret = -EIO; } out: free_page((unsigned long)sda_area); |