Skip to content

Commit df018f8

Browse files
dmuszynsherbertx
authored andcommitted
crypto: qat - fix ring to service map for dcc in 4xxx
If a device is configured for data compression chaining (dcc), half of the engines are loaded with the symmetric crypto image and the rest are loaded with the compression image. However, in such configuration all rings can handle compression requests. Fix the ring to service mapping so that when a device is configured for dcc, the ring to service mapping reports that all rings in a bank can be used for compression. Fixes: a238487 ("crypto: qat - fix ring to service map for QAT GEN4") Signed-off-by: Damian Muszynski <damian.muszynski@intel.com> Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent bca79b9 commit df018f8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,13 @@ static u16 get_ring_to_svc_map(struct adf_accel_dev *accel_dev)
331331
if (!fw_config)
332332
return 0;
333333

334+
/* If dcc, all rings handle compression requests */
335+
if (adf_get_service_enabled(accel_dev) == SVC_DCC) {
336+
for (i = 0; i < RP_GROUP_COUNT; i++)
337+
rps[i] = COMP;
338+
goto set_mask;
339+
}
340+
334341
for (i = 0; i < RP_GROUP_COUNT; i++) {
335342
switch (fw_config[i].ae_mask) {
336343
case ADF_AE_GROUP_0:
@@ -359,6 +366,7 @@ static u16 get_ring_to_svc_map(struct adf_accel_dev *accel_dev)
359366
}
360367
}
361368

369+
set_mask:
362370
ring_to_svc_map = rps[RP_GROUP_0] << ADF_CFG_SERV_RING_PAIR_0_SHIFT |
363371
rps[RP_GROUP_1] << ADF_CFG_SERV_RING_PAIR_1_SHIFT |
364372
rps[RP_GROUP_0] << ADF_CFG_SERV_RING_PAIR_2_SHIFT |

0 commit comments

Comments
 (0)