crypto: qat - replace check based on DID
Modify condition in qat_uclo_wr_mimage() to use a capability of the device (sram_visible), rather than the device ID, so the check is not specific to devices of the same type. Signed-off-by: Jack Xu <jack.xu@intel.com> Co-developed-by: Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by: Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
@@ -1410,9 +1410,11 @@ int qat_uclo_wr_mimage(struct icp_qat_fw_loader_handle *handle,
|
|||||||
status = qat_uclo_auth_fw(handle, desc);
|
status = qat_uclo_auth_fw(handle, desc);
|
||||||
qat_uclo_ummap_auth_fw(handle, &desc);
|
qat_uclo_ummap_auth_fw(handle, &desc);
|
||||||
} else {
|
} else {
|
||||||
if (handle->pci_dev->device == PCI_DEVICE_ID_INTEL_QAT_C3XXX) {
|
if (!handle->chip_info->sram_visible) {
|
||||||
pr_err("QAT: C3XXX doesn't support unsigned MMP\n");
|
dev_dbg(&handle->pci_dev->dev,
|
||||||
return -EINVAL;
|
"QAT MMP fw not loaded for device 0x%x",
|
||||||
|
handle->pci_dev->device);
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
qat_uclo_wr_sram_by_words(handle, 0, addr_ptr, mem_size);
|
qat_uclo_wr_sram_by_words(handle, 0, addr_ptr, mem_size);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user