提交 78b4267a 编写于 作者: J Jack Xu 提交者: Herbert Xu

crypto: qat - report an error if MMP file size is too large

Change the return status to error if MMP file size is too large so the
driver load fails early if a large MMP firmware is loaded.
Signed-off-by: NJack Xu <jack.xu@intel.com>
Co-developed-by: NZhehui Xiang <zhehui.xiang@intel.com>
Signed-off-by: NZhehui Xiang <zhehui.xiang@intel.com>
Reviewed-by: NGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 b9f7c36d
......@@ -1552,10 +1552,8 @@ int qat_uclo_wr_mimage(struct icp_qat_fw_loader_handle *handle,
qat_uclo_ummap_auth_fw(handle, &desc);
} else {
if (handle->chip_info->mmp_sram_size < mem_size) {
dev_dbg(&handle->pci_dev->dev,
"QAT MMP fw not loaded for device 0x%x",
handle->pci_dev->device);
return status;
pr_err("QAT: MMP size is too large: 0x%x\n", mem_size);
return -EFBIG;
}
qat_uclo_wr_sram_by_words(handle, 0, addr_ptr, mem_size);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册