aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/crypto/z90hardware.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/crypto/z90hardware.c')
-rw-r--r--drivers/s390/crypto/z90hardware.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/s390/crypto/z90hardware.c b/drivers/s390/crypto/z90hardware.c
index 4141919da805..be60795f4a74 100644
--- a/drivers/s390/crypto/z90hardware.c
+++ b/drivers/s390/crypto/z90hardware.c
@@ -2214,7 +2214,7 @@ ICACRT_msg_to_type50CRT_msg(struct ica_rsa_modexpo_crt *icaMsg_p,
2214 long_len = 128; 2214 long_len = 128;
2215 } 2215 }
2216 2216
2217 tmp_size = ((mod_len <= 128) ? TYPE50_CRB1_LEN : TYPE50_CRB2_LEN) + 2217 tmp_size = ((long_len <= 64) ? TYPE50_CRB1_LEN : TYPE50_CRB2_LEN) +
2218 CALLER_HEADER; 2218 CALLER_HEADER;
2219 2219
2220 memset(z90cMsg_p, 0, tmp_size); 2220 memset(z90cMsg_p, 0, tmp_size);
@@ -2479,8 +2479,16 @@ convert_response(unsigned char *response, unsigned char *buffer,
2479 2479
2480 if (reply_code) 2480 if (reply_code)
2481 switch (reply_code) { 2481 switch (reply_code) {
2482 case REP82_ERROR_MACHINE_FAILURE:
2483 if (errh_p->type == TYPE82_RSP_CODE)
2484 PRINTKW("Machine check failure\n");
2485 else
2486 PRINTKW("Module failure\n");
2487 return REC_HARDWAR_ERR;
2482 case REP82_ERROR_OPERAND_INVALID: 2488 case REP82_ERROR_OPERAND_INVALID:
2489 return REC_OPERAND_INV;
2483 case REP88_ERROR_MESSAGE_MALFORMD: 2490 case REP88_ERROR_MESSAGE_MALFORMD:
2491 PRINTKW("Message malformed\n");
2484 return REC_OPERAND_INV; 2492 return REC_OPERAND_INV;
2485 case REP82_ERROR_OPERAND_SIZE: 2493 case REP82_ERROR_OPERAND_SIZE:
2486 return REC_OPERAND_SIZE; 2494 return REC_OPERAND_SIZE;