[PATCH v2 3/4] crypto: hisilicon/zip - initialize operations about 'sqe' in 'acomp_alg.init'

2021-03-27 Thread Yang Shen
The operations about 'sqe' are different on some hardwares. Add a struct 'hisi_zip_sqe_ops' to describe the operations in a hardware. And choose the 'ops' in 'hisi_zip_acomp_init' according to the hardware. Signed-off-by: Yang Shen --- drivers

[PATCH v2 1/4] crypto: hisilicon/zip - adjust functions location

2021-03-27 Thread Yang Shen
in the same area. Here, we use the callback of 'acomp_alg' as the basis for dividing areas. Signed-off-by: Yang Shen --- drivers/crypto/hisilicon/zip/zip_crypto.c | 564 +++--- 1 file changed, 282 insertions(+), 282 deletions(-) diff --git a/drivers/crypto/his

[PATCH v2 0/4] crypto: hisilicon/zip - support new 'sqe' type in Kunpeng930

2021-03-27 Thread Yang Shen
The driver only need to choose the 'ops' once when call 'hisi_zip_acomp_init'. v1 -> v2: * fix a sparse warning Yang Shen (4): crypto: hisilicon/zip - adjust functions location crypto: hisilicon/zip - add comments for 'hisi_zip_sqe' crypto: hisilicon/zip - init

[PATCH v2 4/4] crypto: hisilicon/zip - support new 'sqe' type in Kunpeng930

2021-03-27 Thread Yang Shen
The Kunpeng930 changes some field meanings in 'sqe'. So add a new 'hisi_zip_sqe_ops' to describe the 'sqe' operations. Signed-off-by: Yang Shen --- drivers/crypto/hisilicon/zip/zip.h| 1 + drivers/crypto/hisilicon/zip/zip_crypto.c | 25

[PATCH v2 2/4] crypto: hisilicon/zip - add comments for 'hisi_zip_sqe'

2021-03-27 Thread Yang Shen
Some fields of 'hisi_zip_sqe' are unused, and some fields have misc utilities. So add comments for used fields and make others unnamed. Signed-off-by: Yang Shen --- drivers/crypto/hisilicon/zip/zip.h| 45 ++- drivers/crypto/hisilicon/zip/zip_cry

[PATCH 4/4] crypto: hisilicon/zip - support new 'sqe' type in Kunpeng930

2021-03-19 Thread Yang Shen
The Kunpeng930 changes some field meanings in 'sqe'. So add a new 'hisi_zip_sqe_ops' to describe the 'sqe' operations. Signed-off-by: Yang Shen --- drivers/crypto/hisilicon/zip/zip.h| 1 + drivers/crypto/hisilicon/zip/zip_crypto.c | 25

[PATCH 2/4] crypto: hisilicon/zip - add comments for 'hisi_zip_sqe'

2021-03-19 Thread Yang Shen
Some fields of 'hisi_zip_sqe' are unused, and some fields have misc utilities. So add comments for used fields and make others unnamed. Signed-off-by: Yang Shen --- drivers/crypto/hisilicon/zip/zip.h| 45 ++- drivers/crypto/hisilicon/zip/zip_cry

[PATCH 1/4] crypto: hisilicon/zip - adjust functions location

2021-03-19 Thread Yang Shen
in the same area. Here, we use the callback of 'acomp_alg' as the basis for dividing areas. Signed-off-by: Yang Shen --- drivers/crypto/hisilicon/zip/zip_crypto.c | 564 +++--- 1 file changed, 282 insertions(+), 282 deletions(-) diff --git a/drivers/crypto/his

[PATCH 3/4] crypto: hisilicon/zip - initialize operations about 'sqe' in 'acomp_alg.init'

2021-03-19 Thread Yang Shen
The operations about 'sqe' are different on some hardwares. Add a struct 'hisi_zip_sqe_ops' to describe the operations in a hardware. And choose the 'ops' in 'hisi_zip_acomp_init' according to the hardware. Signed-off-by: Yang Shen --- drivers

[PATCH 0/4]crypto: hisilicon/zip - support new 'sqe' type in Kunpeng930

2021-03-19 Thread Yang Shen
The driver only need to choose the 'ops' once when call 'hisi_zip_acomp_init'. Yang Shen (4): crypto: hisilicon/zip - adjust functions location crypto: hisilicon/zip - add comments for 'hisi_zip_sqe' crypto: hisilicon/zip - initialize operations about 'sqe&#

[PATCH] crypto: hisilicon/zip - add a work_queue for zip irq

2020-11-13 Thread Yang Shen
7; to do the back half work on some different CPUS. Signed-off-by: Yang Shen Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/zip/zip_main.c | 26 +++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/hisilicon/zip/zip_main.c b/drivers/crypto/

[PATCH RESEND 1/4] crypto: hisilicon/zip - fix the uncleared debug registers

2020-09-25 Thread Yang Shen
From: Hao Fang ZIP debug registers aren't cleared even if its driver is removed, so add a clearing operation when remove driver. Signed-off-by: Hao Fang Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_main.c | 18 ++ 1 file change

[PATCH RESEND 4/4] crypto: hisilicon/zip - fix the uninitalized 'curr_qm_qp_num'

2020-09-25 Thread Yang Shen
From: Sihang Chen The 'qm->curr_qm_qp_num' is not initialized, which will result in failure to write the current_q file. Signed-off-by: Sihang Chen Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_main.c | 1 + 1 file changed, 1 insertion(+)

[PATCH RESEND 3/4] crypto: hisilicon/zip - fix the return value when device is busy

2020-09-25 Thread Yang Shen
is failed. Fixes: 62c455ca853e("crypto: hisilicon - add HiSilicon ZIP...") Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_crypto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/hisilicon/zip/zip_crypto.c b/drive

[PATCH RESEND 2/4] crypto: hisilicon/zip - fix zero length input in GZIP decompress

2020-09-25 Thread Yang Shen
id. Fixes: 62c455ca853e("crypto: hisilicon - add HiSilicon ZIP...") Signed-off-by: Zhou Wang Signed-off-by: Yang Shen --- drivers/crypto/hisilicon/zip/zip_crypto.c | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/hisilicon/zip/zip

[PATCH RESEND 0/4] crypto: hisilicon/zip - misc clean up

2020-09-25 Thread Yang Shen
con/zip - fix the uninitalized 'curr_qm_qp_num' Yang Shen (1): crypto: hisilicon/zip - fix the return value when device is busy Zhou Wang (1): crypto: hisilicon/zip - fix zero length input in GZIP decompress drivers/crypto/hisilicon/zip/zip_crypto.c | 26 +++--- driver

[PATCH v2 10/10] crypto: hisilicon/zip - fix some coding styles

2020-09-07 Thread Yang Shen
1.Unified alignment styles 2.Remove unnecessary goto branch 3.Remove address printf Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_crypto.c | 14 +++--- drivers/crypto/hisilicon/zip/zip_main.c | 16 2 files changed, 11 insertions

[PATCH v2 04/10] crypto: hisilicon/zip - replace 'sprintf' with 'scnprintf'

2020-09-07 Thread Yang Shen
Replace 'sprintf' with 'scnprintf' to avoid overrun. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_main.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/hisilicon/zip/zip_main.c b/drivers/

[PATCH v2 03/10] crypto: hisilicon/zip - modify debugfs interface parameters

2020-09-07 Thread Yang Shen
From: Shukun Tan Update debugfs interface parameters Signed-off-by: Shukun Tan Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_main.c | 55 ++--- 1 file changed, 24 insertions(+), 31 deletions(-) diff --git a/drivers/crypto

[PATCH v2 05/10] crypto: hisilicon/zip - use a enum parameter instead of some macros

2020-09-07 Thread Yang Shen
Macros 'QPC_COMP', 'QPC_DECOMP' and 'HZIP_CTX_Q_NUM' are relative and incremental. So, use an enum instead. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_crypto.c | 23 +-- 1 file changed, 13 insertions(+

[PATCH v2 08/10] crypto: hisilicon/zip - move some private macros from 'zip.h' to 'zip_crypto.c'

2020-09-07 Thread Yang Shen
Some macros which are defined in 'zip.h' are related to the struct 'hisi_zip_sqe' and are only used in 'zip_crypto.c'. So move them from 'zip.h' to 'zip_crypto.c'. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zi

[PATCH v2 09/10] crypto: hisilicon/zip - supplement some comments

2020-09-07 Thread Yang Shen
Supplement some comments. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/hisilicon/zip/zip_main.c b/drivers/crypto/hisilicon/zip/zip_main.c index dddb51d

[PATCH v2 02/10] crypto: hisilicon/zip - unify naming style for functions and macros

2020-09-07 Thread Yang Shen
1.Add prefix 'HZIP' for some macros 2.Add prefix 'hisi_zip' for some functions Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_main.c | 35 + 1 file changed, 18 insertions(+), 17 deletions(-) diff --

[PATCH v2 01/10] crypto: hisilicon/zip - remove some useless parameters

2020-09-07 Thread Yang Shen
1.Remove the macro 'HZIP_VF_NUM'. 2.Remove 'list' of the struct 'hisi_zip' Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip.h | 1 - drivers/crypto/hisilicon/zip/zip_main.c | 1 - 2 files changed, 2 deletions(-) diff --

[PATCH v2 07/10] crypto: hisilicon/zip - fix static check warning

2020-09-07 Thread Yang Shen
Fix some code for PClint warning: Warning - Suspicious Cast Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_crypto.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/hisilicon/zip/zip_crypto.c b/drivers

[PATCH v2 00/10] crypto: hisilicon/zip - misc clean up

2020-09-07 Thread Yang Shen
crypto: hisilicon/zip - modify debugfs interface parameters Yang Shen (9): crypto: hisilicon/zip - remove some useless parameters crypto: hisilicon/zip - unify naming style for functions and macros crypto: hisilicon/zip - replace 'sprintf' with 'scnprintf' crypto: hisilicon

[PATCH v2 06/10] crypto: hisilicon/zip - add print for error branch

2020-09-07 Thread Yang Shen
Add print for some error branches. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_crypto.c | 53 +++ drivers/crypto/hisilicon/zip/zip_main.c | 8 +++-- 2 files changed, 45 insertions(+), 16 deletions(-) diff --git a/drivers

[PATCH RESEND 05/10] crypto: hisilicon/zip - use a enum parameter instead of some macros

2020-08-23 Thread Yang Shen
Macros 'QPC_COMP', 'QPC_DECOMP' and 'HZIP_CTX_Q_NUM' are relative and incremental. So, use an enum instead. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_crypto.c | 23 +-- 1 file changed, 13 insertions(+

[PATCH RESEND 08/10] crypto: hisilicon/zip - move some private macros from 'zip.h' to 'zip_crypto.c'

2020-08-23 Thread Yang Shen
Some macros which are defined in 'zip.h' are related to the struct 'hisi_zip_sqe' and are only used in 'zip_crypto.c'. So move them from 'zip.h' to 'zip_crypto.c'. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zi

[PATCH RESEND 02/10] crypto: hisilicon/zip - unify naming style for functions and macros

2020-08-23 Thread Yang Shen
1.Add prefix 'HZIP' for some macros 2.Add prefix 'hisi_zip' for some functions Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_main.c | 35 + 1 file changed, 18 insertions(+), 17 deletions(-) diff --

[PATCH RESEND 06/10] crypto: hisilicon/zip - add print for error branch

2020-08-23 Thread Yang Shen
Add print for some error branches. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_crypto.c | 68 +++ drivers/crypto/hisilicon/zip/zip_main.c | 8 ++-- 2 files changed, 56 insertions(+), 20 deletions(-) diff --git a/drivers

[PATCH RESEND 07/10] crypto: hisilicon/zip - fix static check warning

2020-08-23 Thread Yang Shen
Fix some code for PClint warning: Warning - Suspicious Cast Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_crypto.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/hisilicon/zip/zip_crypto.c b/drivers

[PATCH RESEND 10/10] crypto: hisilicon/zip - fix some coding styles

2020-08-23 Thread Yang Shen
1.Unified alignment styles 2.Remove unnecessary goto branch 3.Remove address printf Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_crypto.c | 13 ++--- drivers/crypto/hisilicon/zip/zip_main.c | 16 2 files changed, 10 insertions

[PATCH RESEND 03/10] crypto: hisilicon/zip - modify debugfs interface parameters

2020-08-23 Thread Yang Shen
From: Shukun Tan Update debugfs interface parameters Signed-off-by: Shukun Tan Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_main.c | 55 ++--- 1 file changed, 24 insertions(+), 31 deletions(-) diff --git a/drivers/crypto

[PATCH RESEND 04/10] crypto: hisilicon/zip - replace 'sprintf' with 'scnprintf'

2020-08-23 Thread Yang Shen
Replace 'sprintf' with 'scnprintf' to avoid overrun. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_main.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/hisilicon/zip/zip_main.c b/driv

[PATCH RESEND 01/10] crypto: hisilicon/zip - remove some useless parameters

2020-08-23 Thread Yang Shen
1.Remove the macro 'HZIP_VF_NUM'. 2.Remove 'list' of the struct 'hisi_zip' Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip.h | 1 - drivers/crypto/hisilicon/zip/zip_main.c | 1 - 2 files changed, 2 deletions(-) diff --

[PATCH RESEND 00/10] crypto: hisilicon/zip - misc clean up

2020-08-23 Thread Yang Shen
/ (crypto: hisilicon/qm - misc fixes). Now the patch series(crypto: hisilicon/qm - misc fixes) has been applied. So this patch series will apply against cryptodev. Shukun Tan (1): crypto: hisilicon/zip - modify debugfs interface parameters Yang Shen (9): crypto: hisilicon/zip - remove som

[PATCH RESEND 09/10] crypto: hisilicon/zip - supplement some comments

2020-08-23 Thread Yang Shen
Supplement some comments. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/hisilicon/zip/zip_main.c b/drivers/crypto/hisilicon/zip/zip_main.c index 7697fa5

[PATCH v5 00/10] crypto: hisilicon/qm - misc fixes

2020-08-15 Thread Yang Shen
erence count when start qp crypto: hisilicon/qm - fix event queue depth to 2048 crypto: hisilicon/qm - fix VF not available after PF FLR Sihang Chen (1): crypto: hisilicon/qm - fix wrong release after using strsep Weili Qian (1): crypto: hisilicon/qm - fix the call trace when unbind device

[PATCH v5 06/10] crypto: hisilicon/qm - fix no stop reason when use 'hisi_qm_stop'

2020-08-15 Thread Yang Shen
QM") Signed-off-by: Shukun Tan Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/hpre/hpre_main.c | 4 ++-- drivers/crypto/hisilicon/qm.c | 20 ++-- drivers/crypto/hisilicon/qm.h | 2 +- drivers/crypto/hisilicon/sec2/s

[PATCH v5 05/10] crypto: hisilicon/qm - fix event queue depth to 2048

2020-08-15 Thread Yang Shen
ypto: hisilicon - add queue management driver...") Signed-off-by: Shukun Tan Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/qm.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/

[PATCH v5 04/10] crypto: hisilicon/qm - fix judgement of queue is full

2020-08-15 Thread Yang Shen
From: Hui Tang The queue depth is 1024, so the condition for judging the queue full should be 1023, otherwise the hardware cannot judge whether the queue is empty or full. Fixes: 263c9959c937("crypto: hisilicon - add queue management driver...") Signed-off-by: Hui Tang Signed-off-by:

[PATCH v5 07/10] crypto: hisilicon/qm - fix VF not available after PF FLR

2020-08-15 Thread Yang Shen
From: Shukun Tan When PF FLR, the hardware will actively trigger the VF FLR. Configuration space of VF needs to be saved and restored to ensure that it is available after the PF FLR. Fixes: 7ce396fa12a9("crypto: hisilicon - add FLR support") Signed-off-by: Shukun Tan Signed-off-by:

[PATCH v5 10/10] crypto: hisilicon/qm - fix the process of register algorithms to crypto

2020-08-15 Thread Yang Shen
function 'hisi_qm_alg_register'. Each device will call 'hisi_qm_alg_register' to add itself to qm list in probe process and registering algs when the qm list is empty. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/hpre/hpre_crypto.c

[PATCH v5 09/10] crypto: hisilicon/qm - fix the call trace when unbind device

2020-08-15 Thread Yang Shen
two operations to avoid panic. The two operations will hold on in the driver remove function until the tasks release all their relative TFMs. Signed-off-by: Hui Tang Signed-off-by: Weili Qian Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/hpre/hpre_main.c | 3

[PATCH v5 02/10] crypto: hisilicon/qm - clear used reference count when start qp

2020-08-15 Thread Yang Shen
8f6600a39("crypto: hisilicon - QM memory management...") Signed-off-by: Shukun Tan Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/qm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c index fb389c0..

[PATCH v5 08/10] crypto: hisilicon/qm - register callback function to 'pci_driver.shutdown'

2020-08-15 Thread Yang Shen
is new API. So the running devices will be stopped when the OS reboot or shutdown. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/hpre/hpre_main.c | 1 + drivers/crypto/hisilicon/qm.c | 17 + drivers/crypto/hisilicon/qm.h

[PATCH v5 01/10] crypto: hisilicon/qm - fix wrong release after using strsep

2020-08-15 Thread Yang Shen
From: Sihang Chen Save the string address before pass to strsep, release it at end. Because strsep will update the string address to point after the token. Fixes: c31dc9fe165d("crypto: hisilicon/qm - add DebugFS for xQC and...") Signed-off-by: Sihang Chen Signed-off-by: Yang Shen R

[PATCH v5 03/10] crypto: hisilicon/qm - fix print frequence in hisi_qp_send

2020-08-15 Thread Yang Shen
Requests will be sent continuously as resetting, which will cause 'printk' flooding. Using 'dev_info_ratelimited' can solve this problem well. Fixes: b67202e8ed30("crypto: hisilicon/qm - add state machine for QM") Signed-off-by: Yang Shen Reviewed-by: Zhou Wang

[PATCH v4 01/10] crypto: hisilicon/qm - fix wrong release after using strsep

2020-08-04 Thread Yang Shen
From: Sihang Chen Save the string address before pass to strsep, release it at end. Because strsep will update the string address to point after the token. Fixes: c31dc9fe165d("crypto: hisilicon/qm - add DebugFS for xQC and...") Signed-off-by: Sihang Chen Signed-off-by: Yang Shen R

[PATCH v4 10/10] crypto: hisilicon/qm - fix the process of register algorithms to crypto

2020-08-04 Thread Yang Shen
function 'hisi_qm_alg_register'. Each device will call 'hisi_qm_alg_register' to add itself to qm list in probe process and registering algs when the qm list is empty. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/hpre/hpre_crypto.c

[PATCH v4 07/10] crypto: hisilicon/qm - fix VF not available after PF FLR

2020-08-04 Thread Yang Shen
From: Shukun Tan When PF FLR, the hardware will actively trigger the VF FLR. Configuration space of VF needs to be saved and restored to ensure that it is available after the PF FLR. Fixes: 7ce396fa12a9("crypto: hisilicon - add FLR support") Signed-off-by: Shukun Tan Signed-off-by:

[PATCH v4 04/10] crypto: hisilicon/qm - fix judgement of queue is full

2020-08-04 Thread Yang Shen
From: Hui Tang The queue depth is 1024, so the condition for judging the queue full should be 1023, otherwise the hardware cannot judge whether the queue is empty or full. Fixes: 263c9959c937("crypto: hisilicon - add queue management driver...") Signed-off-by: Hui Tang Signed-off-by:

[PATCH v4 03/10] crypto: hisilicon/qm - fix print frequence in hisi_qp_send

2020-08-04 Thread Yang Shen
Requests will be sent continuously as resetting, which will cause 'printk' flooding. Using 'dev_info_ratelimited' can solve this problem well. Fixes: b67202e8ed30("crypto: hisilicon/qm - add state machine for QM") Signed-off-by: Yang Shen Reviewed-by: Zhou Wang

[PATCH v4 08/10] crypto: hisilicon/qm - register callback function to 'pci_driver.shutdown'

2020-08-04 Thread Yang Shen
is new API. So the running devices will be stopped when the OS reboot or shutdown. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/hpre/hpre_main.c | 1 + drivers/crypto/hisilicon/qm.c | 17 + drivers/crypto/hisilicon/qm.h

[PATCH v4 00/10] crypto: hisilicon/qm - misc fixes

2020-08-04 Thread Yang Shen
ble after PF FLR Sihang Chen (1): crypto: hisilicon/qm - fix wrong release after using strsep Weili Qian (1): crypto: hisilicon/qm - fix the call trace when unbind device Yang Shen (4): crypto: hisilicon/qm - fix print frequence in hisi_qp_send crypto: hisilicon/qm - fix no stop reason

[PATCH v4 09/10] crypto: hisilicon/qm - fix the call trace when unbind device

2020-08-04 Thread Yang Shen
two operations to avoid panic. The two operations will hold on in the driver remove function until the tasks release all their relative TFMs. Signed-off-by: Hui Tang Signed-off-by: Weili Qian Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/hpre/hpre_main.c | 3

[PATCH v4 05/10] crypto: hisilicon/qm - fix event queue depth to 2048

2020-08-04 Thread Yang Shen
ypto: hisilicon - add queue management driver...") Signed-off-by: Shukun Tan Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/qm.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/

[PATCH v4 06/10] crypto: hisilicon/qm - fix no stop reason when use 'hisi_qm_stop'

2020-08-04 Thread Yang Shen
QM") Signed-off-by: Shukun Tan Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/hpre/hpre_main.c | 4 ++-- drivers/crypto/hisilicon/qm.c | 20 ++-- drivers/crypto/hisilicon/qm.h | 2 +- drivers/crypto/hisilicon/sec2/s

[PATCH v4 02/10] crypto: hisilicon/qm - clear used reference count when start qp

2020-08-04 Thread Yang Shen
8f6600a39("crypto: hisilicon - QM memory management...") Signed-off-by: Shukun Tan Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/qm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c index ffb28cc..

[PATCH 2/4] crypto: hisilicon/zip - fix zero length input in GZIP decompress

2020-07-24 Thread Yang Shen
is invalid. Fixes: 62c455ca853e("crypto: hisilicon - add HiSilicon ZIP...") Signed-off-by: Zhou Wang Signed-off-by: Yang Shen --- drivers/crypto/hisilicon/zip/zip_crypto.c | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/crypto/hisili

[PATCH 4/4] crypto: hisilicon/zip - fix the uninitalized 'curr_qm_qp_num'

2020-07-24 Thread Yang Shen
From: Sihang Chen The 'qm->curr_qm_qp_num' is not initialized, which will result in failure to write the current_q file. Signed-off-by: Sihang Chen Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_main.c | 1 + 1 file changed, 1 insertion(+)

[PATCH 3/4] crypto: hisilicon/zip - fix the return value when device is busy

2020-07-24 Thread Yang Shen
is failed. Fixes: 62c455ca853e("crypto: hisilicon - add HiSilicon ZIP...") Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_crypto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/hisilicon/zip/zip_crypto.c b/drive

[PATCH 0/4] crypto: hisilicon/zip - misc bugfix

2020-07-24 Thread Yang Shen
device This patchset depends on: https://patchwork.kernel.org/cover/11684785/ Hao Fang (1): crypto: hisilicon/zip - fix the uncleared debug registers Sihang Chen (1): crypto: hisilicon/zip - fix the uninitalized 'curr_qm_qp_num' Yang Shen (1): crypto: hisilicon/zip - fix the ret

[PATCH 1/4] crypto: hisilicon/zip - fix the uncleared debug registers

2020-07-24 Thread Yang Shen
From: Hao Fang ZIP debug registers aren't cleared even if its driver is removed, so add a clearing operation when remove driver. Signed-off-by: Hao Fang Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_main.c | 18 ++ 1 file change

[PATCH 03/10] crypto: hisilicon/zip - modify debugfs interface parameters

2020-07-24 Thread Yang Shen
From: Shukun Tan Update debugfs interface parameters Signed-off-by: Shukun Tan Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_main.c | 55 ++--- 1 file changed, 24 insertions(+), 31 deletions(-) diff --git a/drivers/crypto

[PATCH 10/10] crypto: hisilicon/zip - fix some coding styles

2020-07-24 Thread Yang Shen
1.Unified alignment styles 2.Remove unnecessary goto branch 3.Remove address printf Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_crypto.c | 13 ++--- drivers/crypto/hisilicon/zip/zip_main.c | 16 2 files changed, 10 insertions

[PATCH 05/10] crypto: hisilicon/zip - use a enum parameter instead of some macros

2020-07-24 Thread Yang Shen
Macros 'QPC_COMP', 'QPC_DECOMP' and 'HZIP_CTX_Q_NUM' are relative and incremental. So, use an enum instead. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_crypto.c | 23 +-- 1 file changed, 13 insertions(+

[PATCH 02/10] crypto: hisilicon/zip - unify naming style for functions and macros

2020-07-24 Thread Yang Shen
1.Add prefix 'HZIP' for some macros 2.Add prefix 'hisi_zip' for some functions Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_main.c | 35 + 1 file changed, 18 insertions(+), 17 deletions(-) diff --

[PATCH 09/10] crypto: hisilicon/zip - supplement some comments

2020-07-24 Thread Yang Shen
Supplement some comments. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/hisilicon/zip/zip_main.c b/drivers/crypto/hisilicon/zip/zip_main.c index 7697fa5

[PATCH 01/10] crypto: hisilicon/zip - remove some useless parameters

2020-07-24 Thread Yang Shen
1.Remove the macro 'HZIP_VF_NUM'. 2.Remove 'list' of the struct 'hisi_zip' Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip.h | 1 - drivers/crypto/hisilicon/zip/zip_main.c | 1 - 2 files changed, 2 deletions(-) diff --

[PATCH 06/10] crypto: hisilicon/zip - add print for error branch

2020-07-24 Thread Yang Shen
Add print for some error branches. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_crypto.c | 68 +++ drivers/crypto/hisilicon/zip/zip_main.c | 8 ++-- 2 files changed, 56 insertions(+), 20 deletions(-) diff --git a/drivers

[PATCH 04/10] crypto: hisilicon/zip - replace 'sprintf' with 'scnprintf'

2020-07-24 Thread Yang Shen
Replace 'sprintf' with 'scnprintf' to avoid overrun. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_main.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/hisilicon/zip/zip_main.c b/driv

[PATCH 00/10] crypto: hisilicon/zip - misc clean up

2020-07-24 Thread Yang Shen
rypto: hisilicon/zip - modify debugfs interface parameters Yang Shen (9): crypto: hisilicon/zip - remove some useless parameters crypto: hisilicon/zip - unify naming style for functions and macros crypto: hisilicon/zip - replace 'sprintf' with 'scnprintf' crypto: hisilic

[PATCH 08/10] crypto: hisilicon/zip - move some private macros from 'zip.h' to 'zip_crypto.c'

2020-07-24 Thread Yang Shen
Some macros which are defined in 'zip.h' are related to the struct 'hisi_zip_sqe' and are only used in 'zip_crypto.c'. So move them from 'zip.h' to 'zip_crypto.c'. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zi

[PATCH 07/10] crypto: hisilicon/zip - fix static check warning

2020-07-24 Thread Yang Shen
Fix some code for PClint warning: Warning - Suspicious Cast Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_crypto.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/hisilicon/zip/zip_crypto.c b/drivers

[PATCH v3 03/10] crypto: hisilicon/qm - fix print frequence in hisi_qp_send

2020-07-23 Thread Yang Shen
Requests will be sent continuously as resetting, which will cause 'printk' flooding. Using 'dev_info_ratelimited' can solve this problem well. Fixes: b67202e8ed30("crypto: hisilicon/qm - add state machine for QM") Signed-off-by: Yang Shen Reviewed-by: Zhou Wang

[PATCH v3 09/10] crypto: hisilicon/qm - register callback function to 'pci_driver.shutdown'

2020-07-23 Thread Yang Shen
I. So the running devices will be stopped when the OS reboot or shutdown. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/hpre/hpre_main.c | 1 + drivers/crypto/hisilicon/qm.c | 17 + drivers/crypto/hisilicon/qm.h | 1 + driv

[PATCH v3 07/10] crypto: hisilicon/qm - fix VF not available after PF FLR

2020-07-23 Thread Yang Shen
From: Shukun Tan When PF FLR, the hardware will actively trigger the VF FLR. Configuration space of VF needs to be saved and restored to ensure that it is available after the PF FLR. Fixes: 7ce396fa12a9("crypto: hisilicon - add FLR support") Signed-off-by: Shukun Tan Signed-off-by:

[PATCH v3 05/10] crypto: hisilicon/qm - fix event queue depth to 2048

2020-07-23 Thread Yang Shen
ypto: hisilicon - add queue management driver...") Signed-off-by: Shukun Tan Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/qm.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/

[PATCH v3 10/10] crypto: hisilicon - fix the call trace when unbind device

2020-07-23 Thread Yang Shen
[ 293.908117] start_kernel+0x490/0x4c4 Signed-off-by: Hui Tang Signed-off-by: Weili Qian Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/hpre/hpre_main.c | 3 +- drivers/crypto/hisilicon/qm.c | 95 +-- drivers/crypto/hisilicon

[PATCH v3 06/10] crypto: hisilicon/qm - fix no stop reason when use 'hisi_qm_stop'

2020-07-23 Thread Yang Shen
QM") Signed-off-by: Shukun Tan Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/hpre/hpre_main.c | 4 ++-- drivers/crypto/hisilicon/qm.c | 20 ++-- drivers/crypto/hisilicon/qm.h | 2 +- drivers/crypto/hisilicon/sec2/s

[PATCH v3 00/10] crypto: hisilicon/qm - misc fixes

2020-07-23 Thread Yang Shen
eference count when start qp crypto: hisilicon/qm - fix event queue depth to 2048 crypto: hisilicon/qm - fix VF not available after PF FLR Sihang Chen (1): crypto: hisilicon/qm - fix wrong release after using strsep Weili Qian (1): crypto: hisilicon - fix the call trace when unbind device Y

[PATCH v3 02/10] crypto: hisilicon/qm - clear used reference count when start qp

2020-07-23 Thread Yang Shen
8f6600a39("crypto: hisilicon - QM memory management...") Signed-off-by: Shukun Tan Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/qm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c index ffb28cc..

[PATCH v3 01/10] crypto: hisilicon/qm - fix wrong release after using strsep

2020-07-23 Thread Yang Shen
From: Sihang Chen Save the string address before pass to strsep, release it at end. Because strsep will update the string address to point after the token. Fixes: c31dc9fe165d("crypto: hisilicon/qm - add DebugFS for xQC and...") Signed-off-by: Sihang Chen Signed-off-by: Yang Shen R

[PATCH v3 04/10] crypto: hisilicon/qm - fix judgement of queue is full

2020-07-23 Thread Yang Shen
From: Hui Tang The queue depth is 1024, so the condition for judging the queue full should be 1023, otherwise the hardware cannot judge whether the queue is empty or full. Fixes: 263c9959c937("crypto: hisilicon - add queue management driver...") Signed-off-by: Hui Tang Signed-off-by:

[PATCH v3 08/10] crypto: hisilicon/qm - fix the process of register algorithms to crypto

2020-07-23 Thread Yang Shen
function 'hisi_qm_alg_register'. Each device will call 'hisi_qm_alg_register' to add itself to qm list in probe process and registering algs when the qm list is empty. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/hpre/hpre_crypto.c

[Patch v2 1/9] crypto: hisilicon/qm - fix wrong release after using strsep

2020-07-01 Thread Yang Shen
From: Sihang Chen Save the string address before pass to strsep, release it at end. Because strsep will update the string address to point after the token. Fixes: c31dc9fe165d("crypto: hisilicon/qm - add DebugFS for xQC and...") Signed-off-by: Sihang Chen Signed-off-by: Yang Shen R

[Patch v2 4/9] crypto: hisilicon/qm - fix judgement of queue is full

2020-07-01 Thread Yang Shen
From: Hui Tang The queue depth is 1024, so the condition for judging the queue full should be 1023, otherwise the hardware cannot judge whether the queue is empty or full. Fixes: 263c9959c937("crypto: hisilicon - add queue management driver...") Signed-off-by: Hui Tang Signed-off-by:

[Patch v2 0/9] crypto: hisilicon/qm - misc fixes

2020-07-01 Thread Yang Shen
- fix VF not available after PF FLR Sihang Chen (1): crypto: hisilicon/qm - fix wrong release after using strsep Yang Shen (4): crypto: hisilicon/qm - fix print frequence in hisi_qp_send crypto: hisilicon/qm - fix no stop reason when use hisi_qm_stop crypto: hisilicon/qm - fix the proc

[Patch v2 8/9] crypto: hisilicon/qm - fix the process of register algorithms to crypto

2020-07-01 Thread Yang Shen
function 'hisi_qm_alg_register'. Each device will call 'hisi_qm_alg_register' to add itself to qm list in probe process and registering algs when the qm list is empty. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/hpre/hpre_crypto.c

[Patch v2 6/9] crypto: hisilicon/qm - fix no stop reason when use hisi_qm_stop

2020-07-01 Thread Yang Shen
QM") Signed-off-by: Shukun Tan Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/hpre/hpre_main.c | 4 ++-- drivers/crypto/hisilicon/qm.c | 20 ++-- drivers/crypto/hisilicon/qm.h | 2 +- drivers/crypto/hisilicon/sec2/s

[Patch v2 7/9] crypto: hisilicon/qm - fix VF not available after PF FLR

2020-07-01 Thread Yang Shen
From: Shukun Tan When PF FLR, the hardware will actively trigger the VF FLR. Configuration space of VF needs to be saved and restored to ensure that it is available after the PF FLR. Fixes: 7ce396fa12a9("crypto: hisilicon - add FLR support") Signed-off-by: Shukun Tan Signed-off-by:

[Patch v2 9/9] crypto: hisilicon/qm - register callback function to 'pci_driver.shutdown'

2020-07-01 Thread Yang Shen
he running devices will be stopped when the OS reboot or shutdown. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/hpre/hpre_main.c | 1 + drivers/crypto/hisilicon/qm.c | 17 + drivers/crypto/hisilicon/qm.h | 1 + driv

[Patch v2 2/9] crypto: hisilicon/qm - clear used reference count when start qp

2020-07-01 Thread Yang Shen
8f6600a39("crypto: hisilicon - QM memory management...") Signed-off-by: Shukun Tan Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/qm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c index ad0adcc..

[Patch v2 5/9] crypto: hisilicon/qm - fix event queue depth to 2048

2020-07-01 Thread Yang Shen
ypto: hisilicon - add queue management driver...") Signed-off-by: Shukun Tan Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/qm.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/

[Patch v2 3/9] crypto: hisilicon/qm - fix print frequence in hisi_qp_send

2020-07-01 Thread Yang Shen
Requests will be sent continuously as resetting, which will cause 'printk' flooding. Using 'dev_info_ratelimited' can solve this problem well. Fixes: b67202e8ed30("crypto: hisilicon/qm - add state machine for QM") Signed-off-by: Yang Shen Reviewed-by: Zhou Wang

[PATCH 0/9] crypto: hisilicon/qm - misc fixes

2020-06-29 Thread Yang Shen
): crypto: hisilicon/qm - fix judgement of queue is full Shukun Tan (3): crypto: hisilicon/qm - clear used reference count when start qp crypto: hisilicon/qm - fix event queue depth to 2048 crypto: hisilicon/qm - fix VF not available after PF FLR Sihang Chen (1): crypto: hisilicon/qm

[PATCH 1/9] crypto: hisilicon/qm - fix wrong release after using strsep

2020-06-29 Thread Yang Shen
From: Sihang Chen Save the string address before pass to strsep, release it at end. Because strsep will update the string address to point after the token. Fixes: c31dc9fe165d("crypto: hisilicon/qm - add DebugFS for xQC and...") Signed-off-by: Sihang Chen Signed-off-by: Shukun Tan --- drivers

[PATCH 7/9] crypto: hisilicon/qm - fix VF not available after PF FLR

2020-06-29 Thread Yang Shen
From: Shukun Tan When PF FLR, the hardware will actively trigger the VF FLR. Configuration space of VF needs to be saved and restored to ensure that it is available after the PF FLR. Fixes: 7ce396fa12a9("crypto: hisilicon - add FLR support") Signed-off-by: Shukun Tan --- drivers/crypto/hisilic

  1   2   >