aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/crypto/zcrypt_pcicc.c
diff options
context:
space:
mode:
authorFelix Beck <felix.beck@de.ibm.com>2011-01-05 12:47:47 +0100
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2011-01-05 12:47:27 +0100
commitc2567f8ffa2704f6f2f81013e9a590deca5a865f (patch)
tree83c71b7139d21b51166f085f08bcefcaaa808b93 /drivers/s390/crypto/zcrypt_pcicc.c
parent2ade1fab026b4a103f0105ec4b47654fc2f729c7 (diff)
downloadkernel_samsung_smdk4412-c2567f8ffa2704f6f2f81013e9a590deca5a865f.zip
kernel_samsung_smdk4412-c2567f8ffa2704f6f2f81013e9a590deca5a865f.tar.gz
kernel_samsung_smdk4412-c2567f8ffa2704f6f2f81013e9a590deca5a865f.tar.bz2
[S390] zcrypt: cope with cca restriction of cex3
The cca on the crypto adapter has a restriction in the size of the exponent if a key with a modulus bigger than 2048 bit is used. Thus in that case we have to avoid that the crypto device driver thinks the adapter is defect and sets it offline. Therfore a new member for the zcrypt_device struct called max_exp_bit_length is introduced. This will be set the first time the cca returns the error code function not implemented. If this is done with an adapter twice it will return -EINVAL. Signed-off-by: Felix Beck <felix.beck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/zcrypt_pcicc.c')
-rw-r--r--drivers/s390/crypto/zcrypt_pcicc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/s390/crypto/zcrypt_pcicc.c b/drivers/s390/crypto/zcrypt_pcicc.c
index 9dec5c7..aa4c050 100644
--- a/drivers/s390/crypto/zcrypt_pcicc.c
+++ b/drivers/s390/crypto/zcrypt_pcicc.c
@@ -579,6 +579,7 @@ static int zcrypt_pcicc_probe(struct ap_device *ap_dev)
zdev->min_mod_size = PCICC_MIN_MOD_SIZE;
zdev->max_mod_size = PCICC_MAX_MOD_SIZE;
zdev->speed_rating = PCICC_SPEED_RATING;
+ zdev->max_exp_bit_length = PCICC_MAX_MOD_SIZE;
ap_dev->reply = &zdev->reply;
ap_dev->private = zdev;
rc = zcrypt_device_register(zdev);