Skip to contentSkip to conversation

crypto: qat - fix arbiter mapping generation algorithm for QAT 402xx

PATCH In review Damian Muszynski 3 participants 6 messages Jan 19, 2024 – Feb 20, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: qat - fix arbiter mapping generation algorithm for QAT 402xx

The commit "crypto: qat - generate dynamically arbiter mappings" introduced a regression on qat_402xx devices.
This is reported when the driver probes the device, as indicated by the following error messages:

4xxx 0000:0b:00.0: enabling device (0140 -> 0142)
4xxx 0000:0b:00.0: Generate of the thread to arbiter map failed
4xxx 0000:0b:00.0: Direct firmware load for qat_402xx_mmp.bin failed with error -2

The root cause of this issue was the omission of a necessary function pointer required by the mapping algorithm during the implementation. Fix it by adding the missing function pointer.

Fixes 5da6a2d5353e ("crypto: qat - generate dynamically arbiter mappings")
---
 drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c | 1 +
 1 file changed, 1 insertion(+)
drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c +1 -0
index 479062aa5e6b..94a0ebb03d8c 100644
@@ -463,6 +463,7 @@ void adf_init_hw_data_4xxx(struct adf_hw_device_data *hw_data, u32 dev_id)
 		hw_data->fw_name = ADF_402XX_FW;
 		hw_data->fw_mmp_name = ADF_402XX_MMP;
 		hw_data->uof_get_name = uof_get_name_402xx;
+		hw_data->get_ena_thd_mask = get_ena_thd_mask;
 		break;
 	case ADF_401XX_PCI_DEVICE_ID:
 		hw_data->fw_name = ADF_4XXX_FW;

base-commit: 71518f53f4c3c3fadafdf3af86c98fa4c6ca1abc

Signature · 1 line
2.43.0
#1 lore raw

Hi Herbert,

would it be possible to send this as a fix for 6.8?

Thanks,

Signature · 1 line
Giovanni
Quoted 37 lines · Damian Muszynski

The commit "crypto: qat - generate dynamically arbiter mappings" introduced a regression on qat_402xx devices.
This is reported when the driver probes the device, as indicated by the following error messages:

4xxx 0000:0b:00.0: enabling device (0140 -> 0142)
4xxx 0000:0b:00.0: Generate of the thread to arbiter map failed
4xxx 0000:0b:00.0: Direct firmware load for qat_402xx_mmp.bin failed with error -2

The root cause of this issue was the omission of a necessary function pointer required by the mapping algorithm during the implementation. Fix it by adding the missing function pointer.

Fixes 5da6a2d5353e ("crypto: qat - generate dynamically arbiter mappings")
---
 drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c | 1 +
 1 file changed, 1 insertion(+)
drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c +1 -0
index 479062aa5e6b..94a0ebb03d8c 100644
@@ -463,6 +463,7 @@ void adf_init_hw_data_4xxx(struct adf_hw_device_data *hw_data, u32 dev_id)
 		hw_data->fw_name = ADF_402XX_FW;
 		hw_data->fw_mmp_name = ADF_402XX_MMP;
 		hw_data->uof_get_name = uof_get_name_402xx;
+		hw_data->get_ena_thd_mask = get_ena_thd_mask;
 		break;
 	case ADF_401XX_PCI_DEVICE_ID:
 		hw_data->fw_name = ADF_4XXX_FW;

base-commit: 71518f53f4c3c3fadafdf3af86c98fa4c6ca1abc

Signature · 1 line
2.43.0
maintainer
#2 lore raw
Quoted 3 lines · Giovanni

Hi Herbert,

would it be possible to send this as a fix for 6.8?

Yes I will push it along.

Thanks,

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
maintainer
#3 lore raw
In reply to Cabiddu, Giovanni
Quoted 3 lines · Giovanni

Hi Herbert,

would it be possible to send this as a fix for 6.8?

Hi Giovanni:

The firmware file qat_402xx_mmp.bin does not appear in linux-firmware. Is it supposed to be there?

Thanks,

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
#4 lore raw

Hi Herbert,

Quoted 9 lines · Herbert Xu
Quoted 3 lines · Giovanni

Hi Herbert,

would it be possible to send this as a fix for 6.8?

Hi Giovanni:

The firmware file qat_402xx_mmp.bin does not appear in linux-firmware. Is it supposed to be there?

The firmware is published to linux-firmware as soon as a new device is released. QAT 402xx is not released yet.

A version of the firmware for 402xx can be obtained contacting [email protected] as reported in our documentation [1].

Regards,

[1] https://intel.github.io/quickassist/RN/In-Tree/in_tree_firmware_RN.html#qat-2-0-in-tree-kernel-requirements

Signature · 1 line
Giovanni
maintainer
#5 lore raw
In reply to Damian Muszynski
Quoted 33 lines · Damian Muszynski

The commit "crypto: qat - generate dynamically arbiter mappings" introduced a regression on qat_402xx devices.
This is reported when the driver probes the device, as indicated by the following error messages:

4xxx 0000:0b:00.0: enabling device (0140 -> 0142)
4xxx 0000:0b:00.0: Generate of the thread to arbiter map failed
4xxx 0000:0b:00.0: Direct firmware load for qat_402xx_mmp.bin failed with error -2

The root cause of this issue was the omission of a necessary function pointer required by the mapping algorithm during the implementation. Fix it by adding the missing function pointer.

Fixes 5da6a2d5353e ("crypto: qat - generate dynamically arbiter mappings")
---
 drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c | 1 +
 1 file changed, 1 insertion(+)
drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c +1 -0
index 479062aa5e6b..94a0ebb03d8c 100644
@@ -463,6 +463,7 @@ void adf_init_hw_data_4xxx(struct adf_hw_device_data *hw_data, u32 dev_id)
 		hw_data->fw_name = ADF_402XX_FW;
 		hw_data->fw_mmp_name = ADF_402XX_MMP;
 		hw_data->uof_get_name = uof_get_name_402xx;
+		hw_data->get_ena_thd_mask = get_ena_thd_mask;
 		break;
 	case ADF_401XX_PCI_DEVICE_ID:
 		hw_data->fw_name = ADF_4XXX_FW;
Quoted 3 lines

base-commit: 71518f53f4c3c3fadafdf3af86c98fa4c6ca1abc

Signature · 1 line
2.43.0

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt