[PATCH v1 1/1] s390/ap: Fix MAPML computation

Finn Callies <[email protected]>
Newsgroups org.kernel.vger.linux-s390
Message-ID <[email protected]>
When the TAPQ subfunction of PQAP returns a value between 0 and 3 in the
ml field the Principles of Operation states that the MAPML size is to be
12k bytes.

Reviewed-by: Harald Freudenberger <[email protected]>
Signed-off-by: Finn Callies <[email protected]>
---
 drivers/s390/crypto/ap_card.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/s390/crypto/ap_card.c b/drivers/s390/crypto/ap_card.c
index e827fbeb76fb..c86397f4ddcd 100644
--- a/drivers/s390/crypto/ap_card.c
+++ b/drivers/s390/crypto/ap_card.c
@@ -241,7 +241,7 @@ struct ap_card *ap_card_create(int id, struct ap_tapq_hwinfo hwinfo,
 	ac->ap_dev.device_type = comp_type;
 	ac->hwinfo = hwinfo;
 	ac->id = id;
-	ac->maxmsgsize = hwinfo.ml > 0 ?
+	ac->maxmsgsize = hwinfo.ml > 3 ?
 		hwinfo.ml * AP_TAPQ_ML_FIELD_CHUNK_SIZE : AP_DEFAULT_MAX_MSG_SIZE;
 
 	return ac;
-- 
Finn Callies <[email protected]>
Linux on Z - crypto
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.