[PATCH v2 02/12] crypto: hisilicon/hpre - modify the HPRE probe process

2020-05-09 Thread Shukun Tan
From: Longfang Liu Misc fixes on coding style: 1.Merge pre-initialization and initialization of QM 2.Package the initialization of QM's PF and VF into a function Signed-off-by: Longfang Liu Signed-off-by: Zaibo Xu Signed-off-by: Shukun Tan --- drivers/crypto/hisilicon/hpre/hpre_main.c | 42 +

[PATCH v2 08/12] crypto: hisilicon - unify initial value assignment into QM

2020-05-09 Thread Shukun Tan
From: Weili Qian Some initial value assignment of struct hisi_qm could put into QM. Signed-off-by: Weili Qian Signed-off-by: Shukun Tan Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/hpre/hpre_main.c | 22 +++--- drivers/crypto/hisilicon/qm.c | 44 +++

[PATCH v2 00/12] crypto: hisilicon - misc cleanup and optimizations

2020-05-09 Thread Shukun Tan
This patchset includes some misc updates. patch 1-3: modify the accelerator probe process. patch 4: refactor module parameter pf_q_num. patch 5-6: add state machine and FLR support. patch 7: remove use_dma_api related useless codes. patch 8-9: QM initialization process and memory management optimiz

[PATCH v2 07/12] crypto: hisilicon - remove use_dma_api related codes

2020-05-09 Thread Shukun Tan
The codes related use_dma_api is useless which should be removed. Signed-off-by: Shukun Tan Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/hpre/hpre_main.c | 1 - drivers/crypto/hisilicon/qm.c | 34 --- drivers/crypto/hisilicon/qm.h | 1

[PATCH v2 12/12] crypto: hisilicon/zip - Use temporary sqe when doing work

2020-05-09 Thread Shukun Tan
From: Zhou Wang Currently zip sqe is stored in hisi_zip_qp_ctx, which will bring corruption with multiple parallel users of the crypto tfm. This patch removes the zip_sqe in hisi_zip_qp_ctx and uses a temporary sqe instead. Signed-off-by: Zhou Wang Signed-off-by: Jonathan Cameron Signed-off-b

[PATCH v2 03/12] crypto: hisilicon/zip - modify the ZIP probe process

2020-05-09 Thread Shukun Tan
From: Longfang Liu Misc fixes on coding style: 1.Merge QM initialization code into a function 2.Merge QM's PF and VF initialization into a function Signed-off-by: Longfang Liu Signed-off-by: Zaibo Xu Signed-off-by: Shukun Tan Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_main.

[PATCH v2 10/12] crypto: hisilicon - remove codes of directly report device errors through MSI

2020-05-09 Thread Shukun Tan
The hardware device can be configured to report directly through MSI, but this method will not go through RAS, configure all hardware errors that should be processed by driver to NFE. Signed-off-by: Shukun Tan --- drivers/crypto/hisilicon/hpre/hpre_main.c | 1 - drivers/crypto/hisilicon/qm.c

[PATCH v2 05/12] crypto: hisilicon/qm - add state machine for QM

2020-05-09 Thread Shukun Tan
From: Zhou Wang Add specific states for qm and qp, every state change under critical region to prevent from race condition. Meanwhile, qp state change will also depend on qm state. Due to the introduction of these states, it is necessary to pay attention to the calls of public logic, such as con

[PATCH v2 04/12] crypto: hisilicon - refactor module parameter pf_q_num related code

2020-05-09 Thread Shukun Tan
put q_num_set similar code into qm to reduce the redundancy. Signed-off-by: Shukun Tan Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/hpre/hpre_main.c | 39 ++- drivers/crypto/hisilicon/qm.h | 39 +++ drivers/crypto/hisili

[PATCH v2 01/12] crypto: hisilicon/sec2 - modify the SEC probe process

2020-05-09 Thread Shukun Tan
From: Longfang Liu Adjust the position of SMMU status check and SEC queue initialization in SEC probe Signed-off-by: Longfang Liu Signed-off-by: Zaibo Xu Signed-off-by: Shukun Tan Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/sec2/sec_main.c | 67 ++-- 1 fi

[PATCH v2 09/12] crypto: hisilicon - QM memory management optimization

2020-05-09 Thread Shukun Tan
From: Weili Qian Put all the code for the memory allocation into the QM initialization process. Before, The qp memory was allocated when the qp was created, and released when the qp was released, It is now changed to allocate all the qp memory once. Signed-off-by: Weili Qian Signed-off-by: Shuk

[PATCH v2 06/12] crypto: hisilicon - add FLR support

2020-05-09 Thread Shukun Tan
Add callback reset_prepare and reset_done in QM, The callback reset_prepare will uninit device error configuration and stop the QM, the callback reset_done will init the device error configuration and restart the QM. Uninit the error configuration will disable device block master OOO when Multi-bi

[PATCH v2 11/12] crypto: hisilicon - add device error report through abnormal irq

2020-05-09 Thread Shukun Tan
By configuring the device error in firmware to report through abnormal interruption, process all NFE errors in irq handler. Signed-off-by: Shukun Tan Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/qm.c | 339 +++--- drivers/crypto/hisilicon/qm.h | 1 +

RE: [PATCH 12/13] crypto: hisilicon/zip - Use temporary sqe when doing work

2020-05-09 Thread Song Bao Hua
> > > >> From: Zhou Wang > > > >> Currently zip sqe is stored in hisi_zip_qp_ctx, which will bring > >> corruption with multiple parallel users of the crypto tfm. > > > >> This patch removes the zip_sqe in hisi_zip_qp_ctx and uses a temporary sqe > >> instead. > > > > This looks like a quite

[PATCH -next] cxgb4/chcr: Fix error return code in chcr_ktls_dev_add()

2020-05-09 Thread Wei Yongjun
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 34aba2c45024 ("cxgb4/chcr : Register to tls add and del callback") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- drivers/crypto/chelsio/chcr_ktls.c | 3 +++ 1 file