diff options
| author | Giovanni Cabiddu <giovanni.cabiddu@intel.com> | 2023-09-14 10:55:45 +0100 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2023-09-20 13:15:30 +0800 |
| commit | c9ca9756f376f51f985130a0e599d956065d4c44 (patch) | |
| tree | d193efe9900933a60dd7a55fdfbd124ff76b3065 /tools/perf/scripts/python/bin/stackcollapse-record | |
| parent | 1a9e6f59caeea35d157f91b452ae75f251d8255b (diff) | |
| download | linux-c9ca9756f376f51f985130a0e599d956065d4c44.tar.gz linux-c9ca9756f376f51f985130a0e599d956065d4c44.zip | |
crypto: qat - fix state machines cleanup paths
Commit 1bdc85550a2b ("crypto: qat - fix concurrency issue when device
state changes") introduced the function adf_dev_down() which wraps the
functions adf_dev_stop() and adf_dev_shutdown().
In a subsequent change, the sequence adf_dev_stop() followed by
adf_dev_shutdown() was then replaced across the driver with just a call
to the function adf_dev_down().
The functions adf_dev_stop() and adf_dev_shutdown() are called in error
paths to stop the accelerator and free up resources and can be called
even if the counterparts adf_dev_init() and adf_dev_start() did not
complete successfully.
However, the implementation of adf_dev_down() prevents the stop/shutdown
sequence if the device is found already down.
For example, if adf_dev_init() fails, the device status is not set as
started and therefore a call to adf_dev_down() won't be calling
adf_dev_shutdown() to undo what adf_dev_init() did.
Do not check if a device is started in adf_dev_down() but do the
equivalent check in adf_sysfs.c when handling a DEV_DOWN command from
the user.
Fixes: 2b60f79c7b81 ("crypto: qat - replace state machine calls")
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Adam Guerin <adam.guerin@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions
