Branch data Line data Source code
1 : : /* SPDX-License-Identifier: BSD-3-Clause 2 : : * Copyright (C) 2017 Intel Corporation. 3 : : * All rights reserved. 4 : : */ 5 : : 6 : : #include "spdk/stdinc.h" 7 : : 8 : : #include "iscsi/iscsi.h" 9 : : 10 : : #include "spdk_internal/init.h" 11 : : 12 : : static void 13 : 615 : iscsi_subsystem_init_complete(void *cb_arg, int rc) 14 : : { 15 : 615 : spdk_subsystem_init_next(rc); 16 : 615 : } 17 : : 18 : : static void 19 : 615 : iscsi_subsystem_init(void) 20 : : { 21 : 615 : spdk_iscsi_init(iscsi_subsystem_init_complete, NULL); 22 : 615 : } 23 : : 24 : : static void 25 : 615 : iscsi_subsystem_fini_done(void *arg) 26 : : { 27 : 615 : spdk_subsystem_fini_next(); 28 : 615 : } 29 : : 30 : : static void 31 : 615 : iscsi_subsystem_fini(void) 32 : : { 33 : 615 : spdk_iscsi_fini(iscsi_subsystem_fini_done, NULL); 34 : 615 : } 35 : : 36 : : static void 37 : 101 : iscsi_subsystem_config_json(struct spdk_json_write_ctx *w) 38 : : { 39 : 101 : spdk_iscsi_config_json(w); 40 : 101 : } 41 : : 42 : : static struct spdk_subsystem g_spdk_subsystem_iscsi = { 43 : : .name = "iscsi", 44 : : .init = iscsi_subsystem_init, 45 : : .fini = iscsi_subsystem_fini, 46 : : .write_config_json = iscsi_subsystem_config_json, 47 : : }; 48 : : 49 : 697 : SPDK_SUBSYSTEM_REGISTER(g_spdk_subsystem_iscsi); 50 : 697 : SPDK_SUBSYSTEM_DEPEND(iscsi, scsi) 51 : 697 : SPDK_SUBSYSTEM_DEPEND(iscsi, sock)