2022-11-04 13:10:21

by Shashank Gupta

[permalink] [raw]
Subject: [PATCH] crypto: qat - remove ADF_STATUS_PF_RUNNING flag from probe

The ADF_STATUS_PF_RUNNING bit is set after the successful initialization
of the communication between VF to PF in adf_vf2pf_notify_init().
So, it is not required to be set after the execution of the function
adf_dev_init().

Signed-off-by: Shashank Gupta <[email protected]>
Reviewed-by: Giovanni Cabiddu <[email protected]>
Reviewed-by: Wojciech Ziemba <[email protected]>
---
drivers/crypto/qat/qat_c3xxxvf/adf_drv.c | 2 --
drivers/crypto/qat/qat_c62xvf/adf_drv.c | 2 --
drivers/crypto/qat/qat_dh895xccvf/adf_drv.c | 2 --
3 files changed, 6 deletions(-)

diff --git a/drivers/crypto/qat/qat_c3xxxvf/adf_drv.c b/drivers/crypto/qat/qat_c3xxxvf/adf_drv.c
index fa18d8009f53..cf4ef83e186f 100644
--- a/drivers/crypto/qat/qat_c3xxxvf/adf_drv.c
+++ b/drivers/crypto/qat/qat_c3xxxvf/adf_drv.c
@@ -177,8 +177,6 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if (ret)
goto out_err_dev_shutdown;

- set_bit(ADF_STATUS_PF_RUNNING, &accel_dev->status);
-
ret = adf_dev_start(accel_dev);
if (ret)
goto out_err_dev_stop;
diff --git a/drivers/crypto/qat/qat_c62xvf/adf_drv.c b/drivers/crypto/qat/qat_c62xvf/adf_drv.c
index 686ec752d0e9..0e642c94b929 100644
--- a/drivers/crypto/qat/qat_c62xvf/adf_drv.c
+++ b/drivers/crypto/qat/qat_c62xvf/adf_drv.c
@@ -177,8 +177,6 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if (ret)
goto out_err_dev_shutdown;

- set_bit(ADF_STATUS_PF_RUNNING, &accel_dev->status);
-
ret = adf_dev_start(accel_dev);
if (ret)
goto out_err_dev_stop;
diff --git a/drivers/crypto/qat/qat_dh895xccvf/adf_drv.c b/drivers/crypto/qat/qat_dh895xccvf/adf_drv.c
index 18756b2e1c91..c1485e702b3e 100644
--- a/drivers/crypto/qat/qat_dh895xccvf/adf_drv.c
+++ b/drivers/crypto/qat/qat_dh895xccvf/adf_drv.c
@@ -177,8 +177,6 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if (ret)
goto out_err_dev_shutdown;

- set_bit(ADF_STATUS_PF_RUNNING, &accel_dev->status);
-
ret = adf_dev_start(accel_dev);
if (ret)
goto out_err_dev_stop;
--
2.16.4



2022-11-11 10:20:36

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH] crypto: qat - remove ADF_STATUS_PF_RUNNING flag from probe

On Fri, Nov 04, 2022 at 01:21:07PM -0400, Shashank Gupta wrote:
> The ADF_STATUS_PF_RUNNING bit is set after the successful initialization
> of the communication between VF to PF in adf_vf2pf_notify_init().
> So, it is not required to be set after the execution of the function
> adf_dev_init().
>
> Signed-off-by: Shashank Gupta <[email protected]>
> Reviewed-by: Giovanni Cabiddu <[email protected]>
> Reviewed-by: Wojciech Ziemba <[email protected]>
> ---
> drivers/crypto/qat/qat_c3xxxvf/adf_drv.c | 2 --
> drivers/crypto/qat/qat_c62xvf/adf_drv.c | 2 --
> drivers/crypto/qat/qat_dh895xccvf/adf_drv.c | 2 --
> 3 files changed, 6 deletions(-)

Patch applied. Thanks.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt