0001
0002 #include <target/target_core_base.h>
0003 #include <linux/btree.h>
0004
0005
0006 #define TCM_QLA2XXX_NAMELEN 32
0007
0008
0009
0010
0011 #define TCM_QLA2XXX_DEFAULT_TAGS 2088
0012
0013 #include "qla_target.h"
0014
0015 struct tcm_qla2xxx_nacl {
0016 struct se_node_acl se_node_acl;
0017
0018
0019 u32 nport_id;
0020
0021 u64 nport_wwnn;
0022
0023 char nport_name[TCM_QLA2XXX_NAMELEN];
0024
0025 struct fc_port *fc_port;
0026
0027 struct se_session *nport_nexus;
0028 };
0029
0030 struct tcm_qla2xxx_tpg_attrib {
0031 int generate_node_acls;
0032 int cache_dynamic_acls;
0033 int demo_mode_write_protect;
0034 int prod_mode_write_protect;
0035 int demo_mode_login_only;
0036 int fabric_prot_type;
0037 int jam_host;
0038 };
0039
0040 struct tcm_qla2xxx_tpg {
0041
0042 u16 lport_tpgt;
0043
0044 atomic_t lport_tpg_enabled;
0045
0046 struct tcm_qla2xxx_lport *lport;
0047
0048 struct tcm_qla2xxx_tpg_attrib tpg_attrib;
0049
0050 struct se_portal_group se_tpg;
0051 };
0052
0053 struct tcm_qla2xxx_fc_loopid {
0054 struct se_node_acl *se_nacl;
0055 };
0056
0057 struct tcm_qla2xxx_lport {
0058
0059 u64 lport_wwpn;
0060
0061 u64 lport_npiv_wwpn;
0062
0063 u64 lport_npiv_wwnn;
0064
0065 char lport_name[TCM_QLA2XXX_NAMELEN];
0066
0067 char lport_naa_name[TCM_QLA2XXX_NAMELEN];
0068
0069 struct btree_head32 lport_fcport_map;
0070
0071 struct tcm_qla2xxx_fc_loopid *lport_loopid_map;
0072
0073 struct scsi_qla_host *qla_vha;
0074
0075 struct qla_tgt lport_qla_tgt;
0076
0077 struct tcm_qla2xxx_tpg *tpg_1;
0078
0079 struct se_wwn lport_wwn;
0080 };