aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_fw.h
diff options
context:
space:
mode:
authorSeokmann Ju <seokmann.ju@qlogic.com>2007-07-05 16:16:51 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-07-14 20:08:05 -0400
commit2c3dfe3f6ad8daff5acdb01713e4f2b116e78136 (patch)
tree8d95e2356c0f5121ceab48ab564d2796b6530d29 /drivers/scsi/qla2xxx/qla_fw.h
parent968a5763fb7247feb0e69573a2975a7a0c094267 (diff)
[SCSI] qla2xxx: add support for NPIV
Following patch adds support for NPIV (N-Port ID Virtualization) to the qla2xxx. - supported within switched-fabric topologies only. - supports up to 63 virtual ports on each physical port. Signed-off-by: Seokmann Ju <seokmann.ju@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_fw.h')
-rw-r--r--drivers/scsi/qla2xxx/qla_fw.h91
1 files changed, 79 insertions, 12 deletions
diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h
index a0a722cf4237..63a11fef5d1b 100644
--- a/drivers/scsi/qla2xxx/qla_fw.h
+++ b/drivers/scsi/qla2xxx/qla_fw.h
@@ -69,6 +69,16 @@ struct port_database_24xx {
69 uint8_t reserved_3[24]; 69 uint8_t reserved_3[24];
70}; 70};
71 71
72struct vp_database_24xx {
73 uint16_t vp_status;
74 uint8_t options;
75 uint8_t id;
76 uint8_t port_name[WWN_SIZE];
77 uint8_t node_name[WWN_SIZE];
78 uint16_t port_id_low;
79 uint16_t port_id_high;
80};
81
72struct nvram_24xx { 82struct nvram_24xx {
73 /* NVRAM header. */ 83 /* NVRAM header. */
74 uint8_t id[4]; 84 uint8_t id[4];
@@ -962,6 +972,25 @@ struct mid_db_24xx {
962 struct mid_db_entry_24xx entries[MAX_MID_VPS]; 972 struct mid_db_entry_24xx entries[MAX_MID_VPS];
963}; 973};
964 974
975 /*
976 * Virtual Fabric ID type definition.
977 */
978typedef struct vf_id {
979 uint16_t id : 12;
980 uint16_t priority : 4;
981} vf_id_t;
982
983/*
984 * Virtual Fabric HopCt type definition.
985 */
986typedef struct vf_hopct {
987 uint16_t reserved : 8;
988 uint16_t hopct : 8;
989} vf_hopct_t;
990
991/*
992 * Virtual Port Control IOCB
993 */
965#define VP_CTRL_IOCB_TYPE 0x30 /* Vitual Port Control entry. */ 994#define VP_CTRL_IOCB_TYPE 0x30 /* Vitual Port Control entry. */
966struct vp_ctrl_entry_24xx { 995struct vp_ctrl_entry_24xx {
967 uint8_t entry_type; /* Entry type. */ 996 uint8_t entry_type; /* Entry type. */
@@ -974,6 +1003,7 @@ struct vp_ctrl_entry_24xx {
974 uint16_t vp_idx_failed; 1003 uint16_t vp_idx_failed;
975 1004
976 uint16_t comp_status; /* Completion status. */ 1005 uint16_t comp_status; /* Completion status. */
1006#define CS_VCE_IOCB_ERROR 0x01 /* Error processing IOCB */
977#define CS_VCE_ACQ_ID_ERROR 0x02 /* Error while acquireing ID. */ 1007#define CS_VCE_ACQ_ID_ERROR 0x02 /* Error while acquireing ID. */
978#define CS_VCE_BUSY 0x05 /* Firmware not ready to accept cmd. */ 1008#define CS_VCE_BUSY 0x05 /* Firmware not ready to accept cmd. */
979 1009
@@ -982,24 +1012,34 @@ struct vp_ctrl_entry_24xx {
982#define VCE_COMMAND_DISABLE_VPS 0x08 /* Disable VPs. */ 1012#define VCE_COMMAND_DISABLE_VPS 0x08 /* Disable VPs. */
983#define VCE_COMMAND_DISABLE_VPS_REINIT 0x09 /* Disable VPs and reinit link. */ 1013#define VCE_COMMAND_DISABLE_VPS_REINIT 0x09 /* Disable VPs and reinit link. */
984#define VCE_COMMAND_DISABLE_VPS_LOGO 0x0a /* Disable VPs and LOGO ports. */ 1014#define VCE_COMMAND_DISABLE_VPS_LOGO 0x0a /* Disable VPs and LOGO ports. */
1015#define VCE_COMMAND_DISABLE_VPS_LOGO_ALL 0x0b /* Disable VPs and LOGO ports. */
985 1016
986 uint16_t vp_count; 1017 uint16_t vp_count;
987 1018
988 uint8_t vp_idx_map[16]; 1019 uint8_t vp_idx_map[16];
989 1020 uint16_t flags;
990 uint8_t reserved_4[32]; 1021 struct vf_id id;
1022 uint16_t reserved_4;
1023 struct vf_hopct hopct;
1024 uint8_t reserved_5[8];
991}; 1025};
992 1026
1027/*
1028 * Modify Virtual Port Configuration IOCB
1029 */
993#define VP_CONFIG_IOCB_TYPE 0x31 /* Vitual Port Config entry. */ 1030#define VP_CONFIG_IOCB_TYPE 0x31 /* Vitual Port Config entry. */
994struct vp_config_entry_24xx { 1031struct vp_config_entry_24xx {
995 uint8_t entry_type; /* Entry type. */ 1032 uint8_t entry_type; /* Entry type. */
996 uint8_t entry_count; /* Entry count. */ 1033 uint8_t entry_count; /* Entry count. */
997 uint8_t sys_define; /* System defined. */ 1034 uint8_t handle_count;
998 uint8_t entry_status; /* Entry Status. */ 1035 uint8_t entry_status; /* Entry Status. */
999 1036
1000 uint32_t handle; /* System handle. */ 1037 uint32_t handle; /* System handle. */
1001 1038
1002 uint16_t reserved_1; 1039 uint16_t flags;
1040#define CS_VF_BIND_VPORTS_TO_VF BIT_0
1041#define CS_VF_SET_QOS_OF_VPORTS BIT_1
1042#define CS_VF_SET_HOPS_OF_VPORTS BIT_2
1003 1043
1004 uint16_t comp_status; /* Completion status. */ 1044 uint16_t comp_status; /* Completion status. */
1005#define CS_VCT_STS_ERROR 0x01 /* Specified VPs were not disabled. */ 1045#define CS_VCT_STS_ERROR 0x01 /* Specified VPs were not disabled. */
@@ -1009,27 +1049,29 @@ struct vp_config_entry_24xx {
1009#define CS_VCT_BUSY 0x05 /* Firmware not ready to accept cmd. */ 1049#define CS_VCT_BUSY 0x05 /* Firmware not ready to accept cmd. */
1010 1050
1011 uint8_t command; 1051 uint8_t command;
1012#define VCT_COMMAND_MOD_VPS 0x00 /* Enable VPs. */ 1052#define VCT_COMMAND_MOD_VPS 0x00 /* Modify VP configurations. */
1013#define VCT_COMMAND_MOD_ENABLE_VPS 0x08 /* Disable VPs. */ 1053#define VCT_COMMAND_MOD_ENABLE_VPS 0x01 /* Modify configuration & enable VPs. */
1014 1054
1015 uint8_t vp_count; 1055 uint8_t vp_count;
1016 1056
1017 uint8_t vp_idx1; 1057 uint8_t vp_index1;
1018 uint8_t vp_idx2; 1058 uint8_t vp_index2;
1019 1059
1020 uint8_t options_idx1; 1060 uint8_t options_idx1;
1021 uint8_t hard_address_idx1; 1061 uint8_t hard_address_idx1;
1022 uint16_t reserved_2; 1062 uint16_t reserved_vp1;
1023 uint8_t port_name_idx1[WWN_SIZE]; 1063 uint8_t port_name_idx1[WWN_SIZE];
1024 uint8_t node_name_idx1[WWN_SIZE]; 1064 uint8_t node_name_idx1[WWN_SIZE];
1025 1065
1026 uint8_t options_idx2; 1066 uint8_t options_idx2;
1027 uint8_t hard_address_idx2; 1067 uint8_t hard_address_idx2;
1028 uint16_t reserved_3; 1068 uint16_t reserved_vp2;
1029 uint8_t port_name_idx2[WWN_SIZE]; 1069 uint8_t port_name_idx2[WWN_SIZE];
1030 uint8_t node_name_idx2[WWN_SIZE]; 1070 uint8_t node_name_idx2[WWN_SIZE];
1031 1071 struct vf_id id;
1032 uint8_t reserved_4[8]; 1072 uint16_t reserved_4;
1073 struct vf_hopct hopct;
1074 uint8_t reserved_5;
1033}; 1075};
1034 1076
1035#define VP_RPT_ID_IOCB_TYPE 0x32 /* Report ID Acquisition entry. */ 1077#define VP_RPT_ID_IOCB_TYPE 0x32 /* Report ID Acquisition entry. */
@@ -1054,5 +1096,30 @@ struct vp_rpt_id_entry_24xx {
1054 uint8_t reserved_4[32]; 1096 uint8_t reserved_4[32];
1055}; 1097};
1056 1098
1099#define VF_EVFP_IOCB_TYPE 0x26 /* Exchange Virtual Fabric Parameters entry. */
1100struct vf_evfp_entry_24xx {
1101 uint8_t entry_type; /* Entry type. */
1102 uint8_t entry_count; /* Entry count. */
1103 uint8_t sys_define; /* System defined. */
1104 uint8_t entry_status; /* Entry Status. */
1105
1106 uint32_t handle; /* System handle. */
1107 uint16_t comp_status; /* Completion status. */
1108 uint16_t timeout; /* timeout */
1109 uint16_t adim_tagging_mode;
1110
1111 uint16_t vfport_id;
1112 uint32_t exch_addr;
1113
1114 uint16_t nport_handle; /* N_PORT handle. */
1115 uint16_t control_flags;
1116 uint32_t io_parameter_0;
1117 uint32_t io_parameter_1;
1118 uint32_t tx_address[2]; /* Data segment 0 address. */
1119 uint32_t tx_len; /* Data segment 0 length. */
1120 uint32_t rx_address[2]; /* Data segment 1 address. */
1121 uint32_t rx_len; /* Data segment 1 length. */
1122};
1123
1057/* END MID Support ***********************************************************/ 1124/* END MID Support ***********************************************************/
1058#endif 1125#endif