#include <target/target_core_base.h>
#include <target/target_core_fabric.h>
#include "efct_driver.h"
#include "efct_lio.h"
static struct workqueue_struct *lio_wq;
static int
efct_format_wwn(char *str, size_t len, const char *pre, u64 wwn)
{ … }
static int
efct_lio_parse_wwn(const char *name, u64 *wwp, u8 npiv)
{ … }
static int
efct_lio_parse_npiv_wwn(const char *name, size_t size, u64 *wwpn, u64 *wwnn)
{ … }
static ssize_t
efct_lio_tpg_enable_show(struct config_item *item, char *page)
{ … }
static ssize_t
efct_lio_tpg_enable_store(struct config_item *item, const char *page,
size_t count)
{ … }
static ssize_t
efct_lio_npiv_tpg_enable_show(struct config_item *item, char *page)
{ … }
static ssize_t
efct_lio_npiv_tpg_enable_store(struct config_item *item, const char *page,
size_t count)
{ … }
static char *efct_lio_get_fabric_wwn(struct se_portal_group *se_tpg)
{ … }
static char *efct_lio_get_npiv_fabric_wwn(struct se_portal_group *se_tpg)
{ … }
static u16 efct_lio_get_tag(struct se_portal_group *se_tpg)
{ … }
static u16 efct_lio_get_npiv_tag(struct se_portal_group *se_tpg)
{ … }
static int efct_lio_check_demo_mode(struct se_portal_group *se_tpg)
{ … }
static int efct_lio_check_demo_mode_cache(struct se_portal_group *se_tpg)
{ … }
static int efct_lio_check_demo_write_protect(struct se_portal_group *se_tpg)
{ … }
static int
efct_lio_npiv_check_demo_write_protect(struct se_portal_group *se_tpg)
{ … }
static int efct_lio_check_prod_write_protect(struct se_portal_group *se_tpg)
{ … }
static int
efct_lio_npiv_check_prod_write_protect(struct se_portal_group *se_tpg)
{ … }
static int efct_lio_check_stop_free(struct se_cmd *se_cmd)
{ … }
static int
efct_lio_abort_tgt_cb(struct efct_io *io,
enum efct_scsi_io_status scsi_status,
u32 flags, void *arg)
{ … }
static void
efct_lio_aborted_task(struct se_cmd *se_cmd)
{ … }
static void efct_lio_release_cmd(struct se_cmd *se_cmd)
{ … }
static void efct_lio_close_session(struct se_session *se_sess)
{ … }
static int efct_lio_get_cmd_state(struct se_cmd *cmd)
{ … }
static int
efct_lio_sg_map(struct efct_io *io)
{ … }
static void
efct_lio_sg_unmap(struct efct_io *io)
{ … }
static int
efct_lio_status_done(struct efct_io *io,
enum efct_scsi_io_status scsi_status,
u32 flags, void *arg)
{ … }
static int
efct_lio_datamove_done(struct efct_io *io, enum efct_scsi_io_status scsi_status,
u32 flags, void *arg);
static int
efct_lio_write_pending(struct se_cmd *cmd)
{ … }
static int
efct_lio_queue_data_in(struct se_cmd *cmd)
{ … }
static void
efct_lio_send_resp(struct efct_io *io, enum efct_scsi_io_status scsi_status,
u32 flags)
{ … }
static int
efct_lio_datamove_done(struct efct_io *io, enum efct_scsi_io_status scsi_status,
u32 flags, void *arg)
{ … }
static int
efct_lio_tmf_done(struct efct_io *io, enum efct_scsi_io_status scsi_status,
u32 flags, void *arg)
{ … }
static int
efct_lio_null_tmf_done(struct efct_io *tmfio,
enum efct_scsi_io_status scsi_status,
u32 flags, void *arg)
{ … }
static int
efct_lio_queue_status(struct se_cmd *cmd)
{ … }
static void efct_lio_queue_tm_rsp(struct se_cmd *cmd)
{ … }
static struct efct *efct_find_wwpn(u64 wwpn)
{ … }
static struct se_wwn *
efct_lio_make_nport(struct target_fabric_configfs *tf,
struct config_group *group, const char *name)
{ … }
static struct se_wwn *
efct_lio_npiv_make_nport(struct target_fabric_configfs *tf,
struct config_group *group, const char *name)
{ … }
static void
efct_lio_drop_nport(struct se_wwn *wwn)
{ … }
static void
efct_lio_npiv_drop_nport(struct se_wwn *wwn)
{ … }
static struct se_portal_group *
efct_lio_make_tpg(struct se_wwn *wwn, const char *name)
{ … }
static void
efct_lio_drop_tpg(struct se_portal_group *se_tpg)
{ … }
static struct se_portal_group *
efct_lio_npiv_make_tpg(struct se_wwn *wwn, const char *name)
{ … }
static void
efct_lio_npiv_drop_tpg(struct se_portal_group *se_tpg)
{ … }
static int
efct_lio_init_nodeacl(struct se_node_acl *se_nacl, const char *name)
{ … }
static int efct_lio_check_demo_mode_login_only(struct se_portal_group *stpg)
{ … }
static int
efct_lio_npiv_check_demo_mode_login_only(struct se_portal_group *stpg)
{ … }
static struct efct_lio_tpg *
efct_get_vport_tpg(struct efc_node *node)
{ … }
static void
_efct_tgt_node_free(struct kref *arg)
{ … }
static int efct_session_cb(struct se_portal_group *se_tpg,
struct se_session *se_sess, void *private)
{ … }
int efct_scsi_tgt_new_device(struct efct *efct)
{ … }
int efct_scsi_tgt_del_device(struct efct *efct)
{ … }
int
efct_scsi_tgt_new_nport(struct efc *efc, struct efc_nport *nport)
{ … }
void
efct_scsi_tgt_del_nport(struct efc *efc, struct efc_nport *nport)
{ … }
static void efct_lio_setup_session(struct work_struct *work)
{ … }
int efct_scsi_new_initiator(struct efc *efc, struct efc_node *node)
{ … }
static void efct_lio_remove_session(struct work_struct *work)
{ … }
int efct_scsi_del_initiator(struct efc *efc, struct efc_node *node, int reason)
{ … }
void efct_scsi_recv_cmd(struct efct_io *io, uint64_t lun, u8 *cdb,
u32 cdb_len, u32 flags)
{ … }
int
efct_scsi_recv_tmf(struct efct_io *tmfio, u32 lun, enum efct_scsi_tmf_cmd cmd,
struct efct_io *io_to_abort, u32 flags)
{ … }
#define DEF_EFCT_TPG_ATTRIB(name) …
DEF_EFCT_TPG_ATTRIB(…);
DEF_EFCT_TPG_ATTRIB(…);
DEF_EFCT_TPG_ATTRIB(…);
DEF_EFCT_TPG_ATTRIB(…);
DEF_EFCT_TPG_ATTRIB(…);
DEF_EFCT_TPG_ATTRIB(…);
static struct configfs_attribute *efct_lio_tpg_attrib_attrs[] = …;
#define DEF_EFCT_NPIV_TPG_ATTRIB(name) …
DEF_EFCT_NPIV_TPG_ATTRIB(…);
DEF_EFCT_NPIV_TPG_ATTRIB(…);
DEF_EFCT_NPIV_TPG_ATTRIB(…);
DEF_EFCT_NPIV_TPG_ATTRIB(…);
DEF_EFCT_NPIV_TPG_ATTRIB(…);
DEF_EFCT_NPIV_TPG_ATTRIB(…);
static struct configfs_attribute *efct_lio_npiv_tpg_attrib_attrs[] = …;
CONFIGFS_ATTR(…);
static struct configfs_attribute *efct_lio_tpg_attrs[] = …;
CONFIGFS_ATTR(…);
static struct configfs_attribute *efct_lio_npiv_tpg_attrs[] = …;
static const struct target_core_fabric_ops efct_lio_ops = …;
static const struct target_core_fabric_ops efct_lio_npiv_ops = …;
int efct_scsi_tgt_driver_init(void)
{ … }
int efct_scsi_tgt_driver_exit(void)
{ … }