aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/crypto/zcrypt_cex4.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/crypto/zcrypt_cex4.c')
-rw-r--r--drivers/s390/crypto/zcrypt_cex4.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/s390/crypto/zcrypt_cex4.c b/drivers/s390/crypto/zcrypt_cex4.c
index ce1226398ac9..569f8b1d86c0 100644
--- a/drivers/s390/crypto/zcrypt_cex4.c
+++ b/drivers/s390/crypto/zcrypt_cex4.c
@@ -30,7 +30,12 @@
30#define CEX4A_MAX_MESSAGE_SIZE MSGTYPE50_CRB3_MAX_MSG_SIZE 30#define CEX4A_MAX_MESSAGE_SIZE MSGTYPE50_CRB3_MAX_MSG_SIZE
31#define CEX4C_MAX_MESSAGE_SIZE MSGTYPE06_MAX_MSG_SIZE 31#define CEX4C_MAX_MESSAGE_SIZE MSGTYPE06_MAX_MSG_SIZE
32 32
33#define CEX4_CLEANUP_TIME (15*HZ) 33/* Waiting time for requests to be processed.
34 * Currently there are some types of request which are not deterministic.
35 * But the maximum time limit managed by the stomper code is set to 60sec.
36 * Hence we have to wait at least that time period.
37 */
38#define CEX4_CLEANUP_TIME (61*HZ)
34 39
35static struct ap_device_id zcrypt_cex4_ids[] = { 40static struct ap_device_id zcrypt_cex4_ids[] = {
36 { AP_DEVICE(AP_DEVICE_TYPE_CEX4) }, 41 { AP_DEVICE(AP_DEVICE_TYPE_CEX4) },
@@ -101,6 +106,19 @@ static int zcrypt_cex4_probe(struct ap_device *ap_dev)
101 zdev->speed_rating = CEX4C_SPEED_RATING; 106 zdev->speed_rating = CEX4C_SPEED_RATING;
102 zdev->ops = zcrypt_msgtype_request(MSGTYPE06_NAME, 107 zdev->ops = zcrypt_msgtype_request(MSGTYPE06_NAME,
103 MSGTYPE06_VARIANT_DEFAULT); 108 MSGTYPE06_VARIANT_DEFAULT);
109 } else if (ap_test_bit(&ap_dev->functions, AP_FUNC_EP11)) {
110 zdev = zcrypt_device_alloc(CEX4C_MAX_MESSAGE_SIZE);
111 if (!zdev)
112 return -ENOMEM;
113 zdev->type_string = "CEX4P";
114 zdev->user_space_type = ZCRYPT_CEX4;
115 zdev->min_mod_size = CEX4C_MIN_MOD_SIZE;
116 zdev->max_mod_size = CEX4C_MAX_MOD_SIZE;
117 zdev->max_exp_bit_length = CEX4C_MAX_MOD_SIZE;
118 zdev->short_crt = 0;
119 zdev->speed_rating = CEX4C_SPEED_RATING;
120 zdev->ops = zcrypt_msgtype_request(MSGTYPE06_NAME,
121 MSGTYPE06_VARIANT_EP11);
104 } 122 }
105 break; 123 break;
106 } 124 }