diff options
author | Harald Freudenberger <freude@linux.vnet.ibm.com> | 2016-10-27 08:57:39 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2016-12-14 16:33:39 +0100 |
commit | 148784246ef2d85f000713cf56e1c90b405228e8 (patch) | |
tree | e90dba07f8ee0ec52d4da9b62f3476a1e544e913 /drivers/s390/crypto/zcrypt_api.c | |
parent | e47de21dd35bad6d1e71482a66699cd04e83ea40 (diff) |
s390/zcrypt: Correct function bits for CEX2x and CEX3x cards.
For the older CEX2x and CEX3x cards the function bits returned
by TAPQ do not reflect the functions of the card. Instead the
functionality is implicit by the type of the card. The reworked
zcrypt requires to have the function bits set correct, so this
patch fixes this. The queue selection is not only based on these
function bits but also on function pointers set by the individual
drivers.
Signed-off-by: Harald Freudenberger <freude@linux.vnet.ibm.com>
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/zcrypt_api.c')
-rw-r--r-- | drivers/s390/crypto/zcrypt_api.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/s390/crypto/zcrypt_api.c b/drivers/s390/crypto/zcrypt_api.c index c7b5e70f2938..71e298fe339f 100644 --- a/drivers/s390/crypto/zcrypt_api.c +++ b/drivers/s390/crypto/zcrypt_api.c @@ -257,7 +257,7 @@ static long zcrypt_rsa_modexpo(struct ica_rsa_modexpo *mex) continue; for_each_zcrypt_queue(zq, zc) { /* check if device is online and eligible */ - if (!zq->online) + if (!zq->online || !zq->ops->rsa_modexpo) continue; if (zcrypt_queue_compare(zq, pref_zq, weight, pref_weight)) @@ -320,7 +320,7 @@ static long zcrypt_rsa_crt(struct ica_rsa_modexpo_crt *crt) continue; for_each_zcrypt_queue(zq, zc) { /* check if device is online and eligible */ - if (!zq->online) + if (!zq->online || !zq->ops->rsa_modexpo_crt) continue; if (zcrypt_queue_compare(zq, pref_zq, weight, pref_weight)) @@ -377,6 +377,7 @@ static long zcrypt_send_cprb(struct ica_xcRB *xcRB) for_each_zcrypt_queue(zq, zc) { /* check if device is online and eligible */ if (!zq->online || + !zq->ops->send_cprb || ((*domain != (unsigned short) AUTOSELECT) && (*domain != AP_QID_QUEUE(zq->queue->qid)))) continue; @@ -480,6 +481,7 @@ static long zcrypt_send_ep11_cprb(struct ep11_urb *xcrb) for_each_zcrypt_queue(zq, zc) { /* check if device is online and eligible */ if (!zq->online || + !zq->ops->send_ep11_cprb || (targets && !is_desired_ep11_queue(zq->queue->qid, target_num, targets))) @@ -538,7 +540,7 @@ static long zcrypt_rng(char *buffer) continue; for_each_zcrypt_queue(zq, zc) { /* check if device is online and eligible */ - if (!zq->online) + if (!zq->online || !zq->ops->rng) continue; if (zcrypt_queue_compare(zq, pref_zq, weight, pref_weight)) |