modules/accel/ioat: remove duplicate call to free device
It's already done in ioat_destroy_cb(). Proper fix required moving the rest of the cleanup code in accel_engine_ioat_exit() to a new device unregister callback. Signed-off-by: paul luse <paul.e.luse@intel.com> Change-Id: Iaaa595cf5b51f7a4842315fc06270b0857ebf0c5 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11930 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
dacb66d7f4
commit
bc72388eb6
@ -290,20 +290,15 @@ accel_engine_ioat_init(void)
|
||||
}
|
||||
|
||||
static void
|
||||
accel_engine_ioat_exit(void *ctx)
|
||||
_device_unregister_cb(void *io_device)
|
||||
{
|
||||
struct ioat_device *dev;
|
||||
struct ioat_device *dev = io_device;
|
||||
struct pci_device *pci_dev;
|
||||
|
||||
if (g_ioat_initialized) {
|
||||
spdk_io_device_unregister(&ioat_accel_engine, NULL);
|
||||
}
|
||||
|
||||
while (!TAILQ_EMPTY(&g_devices)) {
|
||||
dev = TAILQ_FIRST(&g_devices);
|
||||
TAILQ_REMOVE(&g_devices, dev, tailq);
|
||||
spdk_ioat_detach(dev->ioat);
|
||||
ioat_free_device(dev);
|
||||
free(dev);
|
||||
}
|
||||
|
||||
@ -317,4 +312,14 @@ accel_engine_ioat_exit(void *ctx)
|
||||
spdk_accel_engine_module_finish();
|
||||
}
|
||||
|
||||
static void
|
||||
accel_engine_ioat_exit(void *ctx)
|
||||
{
|
||||
if (g_ioat_initialized) {
|
||||
spdk_io_device_unregister(&ioat_accel_engine, _device_unregister_cb);
|
||||
} else {
|
||||
spdk_accel_engine_module_finish();
|
||||
}
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT(accel_ioat)
|
||||
|
Loading…
Reference in New Issue
Block a user