crypto: hisilicon/sec2 - Add new create qp process
authorKai Ye <yekai13@huawei.com>
Tue, 10 Mar 2020 08:42:52 +0000 (16:42 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 20 Mar 2020 03:36:50 +0000 (14:36 +1100)
commit0b5e43bc1258bb400378fed99beae032dbece045
treeed0230bc579e73029318c53611664618222a3b83
parent0f4146fadc580b7b479aa46a9991ed451ed911eb
crypto: hisilicon/sec2 - Add new create qp process

Combine found device and created qp into one operation instead of found
device and create qp both are independent operations. when execute
multiple tasks, the different threads may find same device at the same
time, but the number of queues is insufficient on the device. causing
one of threads fail to create a qp. Now fix this, First find device then
create qp, if result failure. the current thread will find next device.

Signed-off-by: Kai Ye <yekai13@huawei.com>
Signed-off-by: Shukun Tan <tanshukun1@huawei.com>
Reviewed-by: Zhou Wang <wangzhou1@hisilicon.com>
Reviewed-by: Zaibo Xu <xuzaibo@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/sec2/sec.h
drivers/crypto/hisilicon/sec2/sec_crypto.c
drivers/crypto/hisilicon/sec2/sec_main.c