diff options
Diffstat (limited to 'drivers/s390/crypto/zcrypt_api.c')
-rw-r--r-- | drivers/s390/crypto/zcrypt_api.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/s390/crypto/zcrypt_api.c b/drivers/s390/crypto/zcrypt_api.c index 65b6a96afe6b..0d4d18bdd45c 100644 --- a/drivers/s390/crypto/zcrypt_api.c +++ b/drivers/s390/crypto/zcrypt_api.c | |||
@@ -299,9 +299,7 @@ static ssize_t zcrypt_write(struct file *filp, const char __user *buf, | |||
299 | */ | 299 | */ |
300 | static int zcrypt_open(struct inode *inode, struct file *filp) | 300 | static int zcrypt_open(struct inode *inode, struct file *filp) |
301 | { | 301 | { |
302 | lock_kernel(); | ||
303 | atomic_inc(&zcrypt_open_count); | 302 | atomic_inc(&zcrypt_open_count); |
304 | unlock_kernel(); | ||
305 | return 0; | 303 | return 0; |
306 | } | 304 | } |
307 | 305 | ||
@@ -1009,6 +1007,10 @@ static int zcrypt_status_read(char *resp_buff, char **start, off_t offset, | |||
1009 | zcrypt_count_type(ZCRYPT_CEX2C)); | 1007 | zcrypt_count_type(ZCRYPT_CEX2C)); |
1010 | len += sprintf(resp_buff + len, "CEX2A count: %d\n", | 1008 | len += sprintf(resp_buff + len, "CEX2A count: %d\n", |
1011 | zcrypt_count_type(ZCRYPT_CEX2A)); | 1009 | zcrypt_count_type(ZCRYPT_CEX2A)); |
1010 | len += sprintf(resp_buff + len, "CEX3C count: %d\n", | ||
1011 | zcrypt_count_type(ZCRYPT_CEX3C)); | ||
1012 | len += sprintf(resp_buff + len, "CEX3A count: %d\n", | ||
1013 | zcrypt_count_type(ZCRYPT_CEX3A)); | ||
1012 | len += sprintf(resp_buff + len, "requestq count: %d\n", | 1014 | len += sprintf(resp_buff + len, "requestq count: %d\n", |
1013 | zcrypt_requestq_count()); | 1015 | zcrypt_requestq_count()); |
1014 | len += sprintf(resp_buff + len, "pendingq count: %d\n", | 1016 | len += sprintf(resp_buff + len, "pendingq count: %d\n", |
@@ -1017,7 +1019,7 @@ static int zcrypt_status_read(char *resp_buff, char **start, off_t offset, | |||
1017 | atomic_read(&zcrypt_open_count)); | 1019 | atomic_read(&zcrypt_open_count)); |
1018 | zcrypt_status_mask(workarea); | 1020 | zcrypt_status_mask(workarea); |
1019 | len += sprinthx("Online devices: 1=PCICA 2=PCICC 3=PCIXCC(MCL2) " | 1021 | len += sprinthx("Online devices: 1=PCICA 2=PCICC 3=PCIXCC(MCL2) " |
1020 | "4=PCIXCC(MCL3) 5=CEX2C 6=CEX2A", | 1022 | "4=PCIXCC(MCL3) 5=CEX2C 6=CEX2A 7=CEX3C 8=CEX3A", |
1021 | resp_buff+len, workarea, AP_DEVICES); | 1023 | resp_buff+len, workarea, AP_DEVICES); |
1022 | zcrypt_qdepth_mask(workarea); | 1024 | zcrypt_qdepth_mask(workarea); |
1023 | len += sprinthx("Waiting work element counts", | 1025 | len += sprinthx("Waiting work element counts", |
@@ -1095,8 +1097,9 @@ static int zcrypt_status_write(struct file *file, const char __user *buffer, | |||
1095 | * '0' for no device, '1' for PCICA, '2' for PCICC, | 1097 | * '0' for no device, '1' for PCICA, '2' for PCICC, |
1096 | * '3' for PCIXCC_MCL2, '4' for PCIXCC_MCL3, | 1098 | * '3' for PCIXCC_MCL2, '4' for PCIXCC_MCL3, |
1097 | * '5' for CEX2C and '6' for CEX2A' | 1099 | * '5' for CEX2C and '6' for CEX2A' |
1100 | * '7' for CEX3C and '8' for CEX3A | ||
1098 | */ | 1101 | */ |
1099 | if (*ptr >= '0' && *ptr <= '6') | 1102 | if (*ptr >= '0' && *ptr <= '8') |
1100 | j++; | 1103 | j++; |
1101 | else if (*ptr == 'd' || *ptr == 'D') | 1104 | else if (*ptr == 'd' || *ptr == 'D') |
1102 | zcrypt_disable_card(j++); | 1105 | zcrypt_disable_card(j++); |