2022-06-03 19:15:11 +00:00
|
|
|
/* SPDX-License-Identifier: BSD-3-Clause
|
2022-11-01 20:26:26 +00:00
|
|
|
* Copyright (C) 2017 Intel Corporation.
|
2017-06-13 17:38:16 +00:00
|
|
|
* All rights reserved.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "spdk/stdinc.h"
|
|
|
|
|
|
|
|
#include "iscsi/iscsi.h"
|
|
|
|
|
2021-02-26 22:00:03 +00:00
|
|
|
#include "spdk_internal/init.h"
|
2017-06-13 17:38:16 +00:00
|
|
|
|
2017-06-14 22:59:16 +00:00
|
|
|
static void
|
2020-05-10 19:18:56 +00:00
|
|
|
iscsi_subsystem_init_complete(void *cb_arg, int rc)
|
2017-06-14 22:59:16 +00:00
|
|
|
{
|
|
|
|
spdk_subsystem_init_next(rc);
|
|
|
|
}
|
|
|
|
|
2018-02-22 02:26:00 +00:00
|
|
|
static void
|
2020-05-10 19:18:56 +00:00
|
|
|
iscsi_subsystem_init(void)
|
2018-02-22 02:26:00 +00:00
|
|
|
{
|
2020-05-10 19:18:56 +00:00
|
|
|
spdk_iscsi_init(iscsi_subsystem_init_complete, NULL);
|
2018-02-22 02:26:00 +00:00
|
|
|
}
|
|
|
|
|
2017-10-06 14:17:38 +00:00
|
|
|
static void
|
2020-05-10 19:18:56 +00:00
|
|
|
iscsi_subsystem_fini_done(void *arg)
|
2017-06-14 22:59:16 +00:00
|
|
|
{
|
2017-10-25 13:58:02 +00:00
|
|
|
spdk_subsystem_fini_next();
|
2017-06-14 22:59:16 +00:00
|
|
|
}
|
|
|
|
|
2017-11-10 17:02:00 +00:00
|
|
|
static void
|
2020-05-10 19:18:56 +00:00
|
|
|
iscsi_subsystem_fini(void)
|
2017-11-10 17:02:00 +00:00
|
|
|
{
|
2020-05-10 19:18:56 +00:00
|
|
|
spdk_iscsi_fini(iscsi_subsystem_fini_done, NULL);
|
2017-11-10 17:02:00 +00:00
|
|
|
}
|
|
|
|
|
2018-05-07 23:33:15 +00:00
|
|
|
static void
|
2020-05-10 19:18:56 +00:00
|
|
|
iscsi_subsystem_config_json(struct spdk_json_write_ctx *w)
|
2018-05-07 23:33:15 +00:00
|
|
|
{
|
|
|
|
spdk_iscsi_config_json(w);
|
|
|
|
}
|
|
|
|
|
2018-02-28 18:15:52 +00:00
|
|
|
static struct spdk_subsystem g_spdk_subsystem_iscsi = {
|
|
|
|
.name = "iscsi",
|
2020-05-10 19:18:56 +00:00
|
|
|
.init = iscsi_subsystem_init,
|
|
|
|
.fini = iscsi_subsystem_fini,
|
|
|
|
.write_config_json = iscsi_subsystem_config_json,
|
2018-02-28 18:15:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
SPDK_SUBSYSTEM_REGISTER(g_spdk_subsystem_iscsi);
|
2017-06-13 17:38:16 +00:00
|
|
|
SPDK_SUBSYSTEM_DEPEND(iscsi, scsi)
|
2020-01-28 21:47:46 +00:00
|
|
|
SPDK_SUBSYSTEM_DEPEND(iscsi, sock)
|