diff options
Diffstat (limited to 'include/scsi/fc')
-rw-r--r-- | include/scsi/fc/fc_els.h | 11 | ||||
-rw-r--r-- | include/scsi/fc/fc_fcoe.h | 15 | ||||
-rw-r--r-- | include/scsi/fc/fc_fip.h | 46 | ||||
-rw-r--r-- | include/scsi/fc/fc_ns.h | 7 |
4 files changed, 65 insertions, 14 deletions
diff --git a/include/scsi/fc/fc_els.h b/include/scsi/fc/fc_els.h index f94328132a26..481abbd48e39 100644 --- a/include/scsi/fc/fc_els.h +++ b/include/scsi/fc/fc_els.h | |||
@@ -191,6 +191,7 @@ enum fc_els_rjt_reason { | |||
191 | ELS_RJT_UNAB = 0x09, /* unable to perform command request */ | 191 | ELS_RJT_UNAB = 0x09, /* unable to perform command request */ |
192 | ELS_RJT_UNSUP = 0x0b, /* command not supported */ | 192 | ELS_RJT_UNSUP = 0x0b, /* command not supported */ |
193 | ELS_RJT_INPROG = 0x0e, /* command already in progress */ | 193 | ELS_RJT_INPROG = 0x0e, /* command already in progress */ |
194 | ELS_RJT_FIP = 0x20, /* FIP error */ | ||
194 | ELS_RJT_VENDOR = 0xff, /* vendor specific error */ | 195 | ELS_RJT_VENDOR = 0xff, /* vendor specific error */ |
195 | }; | 196 | }; |
196 | 197 | ||
@@ -212,6 +213,7 @@ enum fc_els_rjt_explan { | |||
212 | ELS_EXPL_UNAB_DATA = 0x2a, /* unable to supply requested data */ | 213 | ELS_EXPL_UNAB_DATA = 0x2a, /* unable to supply requested data */ |
213 | ELS_EXPL_UNSUPR = 0x2c, /* Request not supported */ | 214 | ELS_EXPL_UNSUPR = 0x2c, /* Request not supported */ |
214 | ELS_EXPL_INV_LEN = 0x2d, /* Invalid payload length */ | 215 | ELS_EXPL_INV_LEN = 0x2d, /* Invalid payload length */ |
216 | ELS_EXPL_NOT_NEIGHBOR = 0x62, /* VN2VN_Port not in neighbor set */ | ||
215 | /* TBD - above definitions incomplete */ | 217 | /* TBD - above definitions incomplete */ |
216 | }; | 218 | }; |
217 | 219 | ||
@@ -405,6 +407,15 @@ struct fc_els_prli { | |||
405 | }; | 407 | }; |
406 | 408 | ||
407 | /* | 409 | /* |
410 | * ELS_PRLO - Process logout request and response. | ||
411 | */ | ||
412 | struct fc_els_prlo { | ||
413 | __u8 prlo_cmd; /* command */ | ||
414 | __u8 prlo_obs; /* obsolete, but shall be set to 10h */ | ||
415 | __be16 prlo_len; /* payload length */ | ||
416 | }; | ||
417 | |||
418 | /* | ||
408 | * ELS_ADISC payload | 419 | * ELS_ADISC payload |
409 | */ | 420 | */ |
410 | struct fc_els_adisc { | 421 | struct fc_els_adisc { |
diff --git a/include/scsi/fc/fc_fcoe.h b/include/scsi/fc/fc_fcoe.h index e6ad3d2ae475..d5dcd6062815 100644 --- a/include/scsi/fc/fc_fcoe.h +++ b/include/scsi/fc/fc_fcoe.h | |||
@@ -22,23 +22,18 @@ | |||
22 | 22 | ||
23 | /* | 23 | /* |
24 | * FCoE - Fibre Channel over Ethernet. | 24 | * FCoE - Fibre Channel over Ethernet. |
25 | * See T11 FC-BB-5 Rev 2.00 (09-056v5.pdf) | ||
25 | */ | 26 | */ |
26 | 27 | ||
27 | /* | 28 | /* |
28 | * FC_FCOE_OUI hasn't been standardized yet. XXX TBD. | 29 | * Default FC_FCOE_OUI / FC-MAP value. |
29 | */ | 30 | */ |
30 | #ifndef FC_FCOE_OUI | 31 | #define FC_FCOE_OUI 0x0efc00 /* upper 24 bits of FCOE MAC */ |
31 | #define FC_FCOE_OUI 0x0efc00 /* upper 24 bits of FCOE dest MAC TBD */ | ||
32 | #endif | ||
33 | 32 | ||
34 | /* | 33 | /* |
35 | * The destination MAC address for the fabric login may get a different OUI. | 34 | * Fabric Login (FLOGI) MAC for non-FIP use. Non-FIP use is deprecated. |
36 | * This isn't standardized yet. | ||
37 | */ | 35 | */ |
38 | #ifndef FC_FCOE_FLOGI_MAC | ||
39 | /* gateway MAC - TBD */ | ||
40 | #define FC_FCOE_FLOGI_MAC { 0x0e, 0xfc, 0x00, 0xff, 0xff, 0xfe } | 36 | #define FC_FCOE_FLOGI_MAC { 0x0e, 0xfc, 0x00, 0xff, 0xff, 0xfe } |
41 | #endif | ||
42 | 37 | ||
43 | #define FC_FCOE_VER 0 /* version */ | 38 | #define FC_FCOE_VER 0 /* version */ |
44 | 39 | ||
@@ -51,8 +46,6 @@ | |||
51 | 46 | ||
52 | /* | 47 | /* |
53 | * FCoE frame header - 14 bytes | 48 | * FCoE frame header - 14 bytes |
54 | * | ||
55 | * This is the August 2007 version of the FCoE header as defined by T11. | ||
56 | * This follows the VLAN header, which includes the ethertype. | 49 | * This follows the VLAN header, which includes the ethertype. |
57 | */ | 50 | */ |
58 | struct fcoe_hdr { | 51 | struct fcoe_hdr { |
diff --git a/include/scsi/fc/fc_fip.h b/include/scsi/fc/fc_fip.h index 17baa19380f0..ae25d4ab2548 100644 --- a/include/scsi/fc/fc_fip.h +++ b/include/scsi/fc/fc_fip.h | |||
@@ -17,9 +17,12 @@ | |||
17 | #ifndef _FC_FIP_H_ | 17 | #ifndef _FC_FIP_H_ |
18 | #define _FC_FIP_H_ | 18 | #define _FC_FIP_H_ |
19 | 19 | ||
20 | #include <scsi/fc/fc_ns.h> | ||
21 | |||
20 | /* | 22 | /* |
21 | * This version is based on: | 23 | * This version is based on: |
22 | * http://www.t11.org/ftp/t11/pub/fc/bb-5/08-543v1.pdf | 24 | * http://www.t11.org/ftp/t11/pub/fc/bb-5/08-543v1.pdf |
25 | * and T11 FC-BB-6 10-019v4.pdf (June 2010 VN2VN proposal) | ||
23 | */ | 26 | */ |
24 | 27 | ||
25 | #define FIP_DEF_PRI 128 /* default selection priority */ | 28 | #define FIP_DEF_PRI 128 /* default selection priority */ |
@@ -29,11 +32,24 @@ | |||
29 | #define FIP_FCF_FUZZ 100 /* random time added by FCF (mS) */ | 32 | #define FIP_FCF_FUZZ 100 /* random time added by FCF (mS) */ |
30 | 33 | ||
31 | /* | 34 | /* |
35 | * VN2VN proposed-standard values. | ||
36 | */ | ||
37 | #define FIP_VN_FC_MAP 0x0efd00 /* MAC OUI for VN2VN use */ | ||
38 | #define FIP_VN_PROBE_WAIT 100 /* interval between VN2VN probes (ms) */ | ||
39 | #define FIP_VN_ANN_WAIT 400 /* interval between VN2VN announcements (ms) */ | ||
40 | #define FIP_VN_RLIM_INT 10000 /* interval between probes when rate limited */ | ||
41 | #define FIP_VN_RLIM_COUNT 10 /* number of probes before rate limiting */ | ||
42 | #define FIP_VN_BEACON_INT 8000 /* interval between VN2VN beacons */ | ||
43 | #define FIP_VN_BEACON_FUZZ 100 /* random time to add to beacon period (ms) */ | ||
44 | |||
45 | /* | ||
32 | * Multicast MAC addresses. T11-adopted. | 46 | * Multicast MAC addresses. T11-adopted. |
33 | */ | 47 | */ |
34 | #define FIP_ALL_FCOE_MACS ((u8[6]) { 1, 0x10, 0x18, 1, 0, 0 }) | 48 | #define FIP_ALL_FCOE_MACS ((__u8[6]) { 1, 0x10, 0x18, 1, 0, 0 }) |
35 | #define FIP_ALL_ENODE_MACS ((u8[6]) { 1, 0x10, 0x18, 1, 0, 1 }) | 49 | #define FIP_ALL_ENODE_MACS ((__u8[6]) { 1, 0x10, 0x18, 1, 0, 1 }) |
36 | #define FIP_ALL_FCF_MACS ((u8[6]) { 1, 0x10, 0x18, 1, 0, 2 }) | 50 | #define FIP_ALL_FCF_MACS ((__u8[6]) { 1, 0x10, 0x18, 1, 0, 2 }) |
51 | #define FIP_ALL_VN2VN_MACS ((__u8[6]) { 1, 0x10, 0x18, 1, 0, 4 }) | ||
52 | #define FIP_ALL_P2P_MACS ((__u8[6]) { 1, 0x10, 0x18, 1, 0, 5 }) | ||
37 | 53 | ||
38 | #define FIP_VER 1 /* version for fip_header */ | 54 | #define FIP_VER 1 /* version for fip_header */ |
39 | 55 | ||
@@ -60,6 +76,7 @@ enum fip_opcode { | |||
60 | FIP_OP_LS = 2, /* Link Service request or reply */ | 76 | FIP_OP_LS = 2, /* Link Service request or reply */ |
61 | FIP_OP_CTRL = 3, /* Keep Alive / Link Reset */ | 77 | FIP_OP_CTRL = 3, /* Keep Alive / Link Reset */ |
62 | FIP_OP_VLAN = 4, /* VLAN discovery */ | 78 | FIP_OP_VLAN = 4, /* VLAN discovery */ |
79 | FIP_OP_VN2VN = 5, /* VN2VN operation */ | ||
63 | FIP_OP_VENDOR_MIN = 0xfff8, /* min vendor-specific opcode */ | 80 | FIP_OP_VENDOR_MIN = 0xfff8, /* min vendor-specific opcode */ |
64 | FIP_OP_VENDOR_MAX = 0xfffe, /* max vendor-specific opcode */ | 81 | FIP_OP_VENDOR_MAX = 0xfffe, /* max vendor-specific opcode */ |
65 | }; | 82 | }; |
@@ -97,11 +114,23 @@ enum fip_vlan_subcode { | |||
97 | }; | 114 | }; |
98 | 115 | ||
99 | /* | 116 | /* |
117 | * Subcodes for FIP_OP_VN2VN. | ||
118 | */ | ||
119 | enum fip_vn2vn_subcode { | ||
120 | FIP_SC_VN_PROBE_REQ = 1, /* probe request */ | ||
121 | FIP_SC_VN_PROBE_REP = 2, /* probe reply */ | ||
122 | FIP_SC_VN_CLAIM_NOTIFY = 3, /* claim notification */ | ||
123 | FIP_SC_VN_CLAIM_REP = 4, /* claim response */ | ||
124 | FIP_SC_VN_BEACON = 5, /* beacon */ | ||
125 | }; | ||
126 | |||
127 | /* | ||
100 | * flags in header fip_flags. | 128 | * flags in header fip_flags. |
101 | */ | 129 | */ |
102 | enum fip_flag { | 130 | enum fip_flag { |
103 | FIP_FL_FPMA = 0x8000, /* supports FPMA fabric-provided MACs */ | 131 | FIP_FL_FPMA = 0x8000, /* supports FPMA fabric-provided MACs */ |
104 | FIP_FL_SPMA = 0x4000, /* supports SPMA server-provided MACs */ | 132 | FIP_FL_SPMA = 0x4000, /* supports SPMA server-provided MACs */ |
133 | FIP_FL_REC_OR_P2P = 0x0008, /* configured addr or point-to-point */ | ||
105 | FIP_FL_AVAIL = 0x0004, /* available for FLOGI/ELP */ | 134 | FIP_FL_AVAIL = 0x0004, /* available for FLOGI/ELP */ |
106 | FIP_FL_SOL = 0x0002, /* this is a solicited message */ | 135 | FIP_FL_SOL = 0x0002, /* this is a solicited message */ |
107 | FIP_FL_FPORT = 0x0001, /* sent from an F port */ | 136 | FIP_FL_FPORT = 0x0001, /* sent from an F port */ |
@@ -130,6 +159,7 @@ enum fip_desc_type { | |||
130 | FIP_DT_FKA = 12, /* advertisement keep-alive period */ | 159 | FIP_DT_FKA = 12, /* advertisement keep-alive period */ |
131 | FIP_DT_VENDOR = 13, /* vendor ID */ | 160 | FIP_DT_VENDOR = 13, /* vendor ID */ |
132 | FIP_DT_VLAN = 14, /* vlan number */ | 161 | FIP_DT_VLAN = 14, /* vlan number */ |
162 | FIP_DT_FC4F = 15, /* FC-4 features */ | ||
133 | FIP_DT_LIMIT, /* max defined desc_type + 1 */ | 163 | FIP_DT_LIMIT, /* max defined desc_type + 1 */ |
134 | FIP_DT_VENDOR_BASE = 128, /* first vendor-specific desc_type */ | 164 | FIP_DT_VENDOR_BASE = 128, /* first vendor-specific desc_type */ |
135 | }; | 165 | }; |
@@ -229,6 +259,16 @@ enum fip_fka_flags { | |||
229 | /* FIP_DT_FKA flags */ | 259 | /* FIP_DT_FKA flags */ |
230 | 260 | ||
231 | /* | 261 | /* |
262 | * FIP_DT_FC4F - FC-4 features. | ||
263 | */ | ||
264 | struct fip_fc4_feat { | ||
265 | struct fip_desc fd_desc; | ||
266 | __u8 fd_resvd[2]; | ||
267 | struct fc_ns_fts fd_fts; | ||
268 | struct fc_ns_ff fd_ff; | ||
269 | } __attribute__((packed)); | ||
270 | |||
271 | /* | ||
232 | * FIP_DT_VENDOR descriptor. | 272 | * FIP_DT_VENDOR descriptor. |
233 | */ | 273 | */ |
234 | struct fip_vendor_desc { | 274 | struct fip_vendor_desc { |
diff --git a/include/scsi/fc/fc_ns.h b/include/scsi/fc/fc_ns.h index e7d3ac497d7d..185015dd1166 100644 --- a/include/scsi/fc/fc_ns.h +++ b/include/scsi/fc/fc_ns.h | |||
@@ -100,6 +100,13 @@ struct fc_ns_fts { | |||
100 | }; | 100 | }; |
101 | 101 | ||
102 | /* | 102 | /* |
103 | * FC4-features object. | ||
104 | */ | ||
105 | struct fc_ns_ff { | ||
106 | __be32 fd_feat[FC_NS_TYPES * 4 / FC_NS_BPW]; /* 4-bits per FC-type */ | ||
107 | }; | ||
108 | |||
109 | /* | ||
103 | * GID_PT request. | 110 | * GID_PT request. |
104 | */ | 111 | */ |
105 | struct fc_ns_gid_pt { | 112 | struct fc_ns_gid_pt { |