mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
crypto: hisilicon - enable error reporting again
When an error occurs on the device, an interrupt is reported. When the firmware forwards the interrupt to the driver and masks the error. If the driver does not enable error reporting when an error does not need to be reset, the device does not report the error to the driver when the error occurs again. Therefore, after the driver obtains the information, the error reporting needs to be enabled again. Signed-off-by: Weili Qian <qianweili@huawei.com> Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
@@ -1188,6 +1188,15 @@ static void hisi_zip_disable_error_report(struct hisi_qm *qm, u32 err_type)
|
||||
writel(nfe_mask & (~err_type), qm->io_base + HZIP_CORE_INT_RAS_NFE_ENB);
|
||||
}
|
||||
|
||||
static void hisi_zip_enable_error_report(struct hisi_qm *qm)
|
||||
{
|
||||
u32 nfe_mask = qm->err_info.dev_err.nfe;
|
||||
u32 ce_mask = qm->err_info.dev_err.ce;
|
||||
|
||||
writel(nfe_mask, qm->io_base + HZIP_CORE_INT_RAS_NFE_ENB);
|
||||
writel(ce_mask, qm->io_base + HZIP_CORE_INT_RAS_CE_ENB);
|
||||
}
|
||||
|
||||
static void hisi_zip_open_axi_master_ooo(struct hisi_qm *qm)
|
||||
{
|
||||
u32 val;
|
||||
@@ -1236,6 +1245,8 @@ static enum acc_err_result hisi_zip_get_err_result(struct hisi_qm *qm)
|
||||
zip_result = ACC_ERR_NEED_RESET;
|
||||
} else {
|
||||
hisi_zip_clear_hw_err_status(qm, err_status);
|
||||
/* Avoid firmware disable error report, re-enable. */
|
||||
hisi_zip_enable_error_report(qm);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user