diff options
Diffstat (limited to 'include/scsi/fc')
-rw-r--r-- | include/scsi/fc/Kbuild | 4 | ||||
-rw-r--r-- | include/scsi/fc/fc_els.h | 6 | ||||
-rw-r--r-- | include/scsi/fc/fc_fcoe.h | 12 | ||||
-rw-r--r-- | include/scsi/fc/fc_fcp.h | 8 | ||||
-rw-r--r-- | include/scsi/fc/fc_fip.h | 12 | ||||
-rw-r--r-- | include/scsi/fc/fc_fs.h | 2 | ||||
-rw-r--r-- | include/scsi/fc/fc_gs.h | 2 | ||||
-rw-r--r-- | include/scsi/fc/fc_ns.h | 35 |
8 files changed, 78 insertions, 3 deletions
diff --git a/include/scsi/fc/Kbuild b/include/scsi/fc/Kbuild new file mode 100644 index 000000000000..56603813c6cd --- /dev/null +++ b/include/scsi/fc/Kbuild | |||
@@ -0,0 +1,4 @@ | |||
1 | header-y += fc_els.h | ||
2 | header-y += fc_fs.h | ||
3 | header-y += fc_gs.h | ||
4 | header-y += fc_ns.h | ||
diff --git a/include/scsi/fc/fc_els.h b/include/scsi/fc/fc_els.h index 195ca014d3ce..f94328132a26 100644 --- a/include/scsi/fc/fc_els.h +++ b/include/scsi/fc/fc_els.h | |||
@@ -20,6 +20,8 @@ | |||
20 | #ifndef _FC_ELS_H_ | 20 | #ifndef _FC_ELS_H_ |
21 | #define _FC_ELS_H_ | 21 | #define _FC_ELS_H_ |
22 | 22 | ||
23 | #include <linux/types.h> | ||
24 | |||
23 | /* | 25 | /* |
24 | * Fibre Channel Switch - Enhanced Link Services definitions. | 26 | * Fibre Channel Switch - Enhanced Link Services definitions. |
25 | * From T11 FC-LS Rev 1.2 June 7, 2005. | 27 | * From T11 FC-LS Rev 1.2 June 7, 2005. |
@@ -248,10 +250,12 @@ struct fc_els_csp { | |||
248 | /* | 250 | /* |
249 | * sp_features | 251 | * sp_features |
250 | */ | 252 | */ |
251 | #define FC_SP_FT_CIRO 0x8000 /* continuously increasing rel. off. */ | 253 | #define FC_SP_FT_NPIV 0x8000 /* multiple N_Port_ID support (FLOGI) */ |
254 | #define FC_SP_FT_CIRO 0x8000 /* continuously increasing rel off (PLOGI) */ | ||
252 | #define FC_SP_FT_CLAD 0x8000 /* clean address (in FLOGI LS_ACC) */ | 255 | #define FC_SP_FT_CLAD 0x8000 /* clean address (in FLOGI LS_ACC) */ |
253 | #define FC_SP_FT_RAND 0x4000 /* random relative offset */ | 256 | #define FC_SP_FT_RAND 0x4000 /* random relative offset */ |
254 | #define FC_SP_FT_VAL 0x2000 /* valid vendor version level */ | 257 | #define FC_SP_FT_VAL 0x2000 /* valid vendor version level */ |
258 | #define FC_SP_FT_NPIV_ACC 0x2000 /* NPIV assignment (FLOGI LS_ACC) */ | ||
255 | #define FC_SP_FT_FPORT 0x1000 /* F port (1) vs. N port (0) */ | 259 | #define FC_SP_FT_FPORT 0x1000 /* F port (1) vs. N port (0) */ |
256 | #define FC_SP_FT_ABB 0x0800 /* alternate BB_credit management */ | 260 | #define FC_SP_FT_ABB 0x0800 /* alternate BB_credit management */ |
257 | #define FC_SP_FT_EDTR 0x0400 /* E_D_TOV Resolution is nanoseconds */ | 261 | #define FC_SP_FT_EDTR 0x0400 /* E_D_TOV Resolution is nanoseconds */ |
diff --git a/include/scsi/fc/fc_fcoe.h b/include/scsi/fc/fc_fcoe.h index ccb3dbe90463..e6ad3d2ae475 100644 --- a/include/scsi/fc/fc_fcoe.h +++ b/include/scsi/fc/fc_fcoe.h | |||
@@ -86,6 +86,18 @@ struct fcoe_crc_eof { | |||
86 | #define FCOE_MIN_FRAME 46 | 86 | #define FCOE_MIN_FRAME 46 |
87 | 87 | ||
88 | /* | 88 | /* |
89 | * FCoE Link Error Status Block: T11 FC-BB-5 Rev2.0, Clause 7.10. | ||
90 | */ | ||
91 | struct fcoe_fc_els_lesb { | ||
92 | __be32 lesb_link_fail; /* link failure count */ | ||
93 | __be32 lesb_vlink_fail; /* virtual link failure count */ | ||
94 | __be32 lesb_miss_fka; /* missing FIP keep-alive count */ | ||
95 | __be32 lesb_symb_err; /* symbol error during carrier count */ | ||
96 | __be32 lesb_err_block; /* errored block count */ | ||
97 | __be32 lesb_fcs_error; /* frame check sequence error count */ | ||
98 | }; | ||
99 | |||
100 | /* | ||
89 | * fc_fcoe_set_mac - Store OUI + DID into MAC address field. | 101 | * fc_fcoe_set_mac - Store OUI + DID into MAC address field. |
90 | * @mac: mac address to be set | 102 | * @mac: mac address to be set |
91 | * @did: fc dest id to use | 103 | * @did: fc dest id to use |
diff --git a/include/scsi/fc/fc_fcp.h b/include/scsi/fc/fc_fcp.h index 5d38f1989f37..747e2c7d88d6 100644 --- a/include/scsi/fc/fc_fcp.h +++ b/include/scsi/fc/fc_fcp.h | |||
@@ -83,6 +83,8 @@ struct fcp_cmnd32 { | |||
83 | * fc_tm_flags - task management flags field. | 83 | * fc_tm_flags - task management flags field. |
84 | */ | 84 | */ |
85 | #define FCP_TMF_CLR_ACA 0x40 /* clear ACA condition */ | 85 | #define FCP_TMF_CLR_ACA 0x40 /* clear ACA condition */ |
86 | #define FCP_TMF_TGT_RESET 0x20 /* target reset task management, | ||
87 | deprecated as of FCP-3 */ | ||
86 | #define FCP_TMF_LUN_RESET 0x10 /* logical unit reset task management */ | 88 | #define FCP_TMF_LUN_RESET 0x10 /* logical unit reset task management */ |
87 | #define FCP_TMF_CLR_TASK_SET 0x04 /* clear task set */ | 89 | #define FCP_TMF_CLR_TASK_SET 0x04 /* clear task set */ |
88 | #define FCP_TMF_ABT_TASK_SET 0x02 /* abort task set */ | 90 | #define FCP_TMF_ABT_TASK_SET 0x02 /* abort task set */ |
@@ -196,4 +198,10 @@ struct fcp_srr { | |||
196 | __u8 srr_resvd2[3]; /* reserved */ | 198 | __u8 srr_resvd2[3]; /* reserved */ |
197 | }; | 199 | }; |
198 | 200 | ||
201 | /* | ||
202 | * Feature bits in name server FC-4 Features object. | ||
203 | */ | ||
204 | #define FCP_FEAT_TARG (1 << 0) /* target function supported */ | ||
205 | #define FCP_FEAT_INIT (1 << 1) /* initiator function supported */ | ||
206 | |||
199 | #endif /* _FC_FCP_H_ */ | 207 | #endif /* _FC_FCP_H_ */ |
diff --git a/include/scsi/fc/fc_fip.h b/include/scsi/fc/fc_fip.h index 3d138c1fcf8a..17baa19380f0 100644 --- a/include/scsi/fc/fc_fip.h +++ b/include/scsi/fc/fc_fip.h | |||
@@ -214,11 +214,21 @@ struct fip_vn_desc { | |||
214 | */ | 214 | */ |
215 | struct fip_fka_desc { | 215 | struct fip_fka_desc { |
216 | struct fip_desc fd_desc; | 216 | struct fip_desc fd_desc; |
217 | __u8 fd_resvd[2]; | 217 | __u8 fd_resvd; |
218 | __u8 fd_flags; /* bit0 is fka disable flag */ | ||
218 | __be32 fd_fka_period; /* adv./keep-alive period in mS */ | 219 | __be32 fd_fka_period; /* adv./keep-alive period in mS */ |
219 | } __attribute__((packed)); | 220 | } __attribute__((packed)); |
220 | 221 | ||
221 | /* | 222 | /* |
223 | * flags for fip_fka_desc.fd_flags | ||
224 | */ | ||
225 | enum fip_fka_flags { | ||
226 | FIP_FKA_ADV_D = 0x01, /* no need for FKA from ENode */ | ||
227 | }; | ||
228 | |||
229 | /* FIP_DT_FKA flags */ | ||
230 | |||
231 | /* | ||
222 | * FIP_DT_VENDOR descriptor. | 232 | * FIP_DT_VENDOR descriptor. |
223 | */ | 233 | */ |
224 | struct fip_vendor_desc { | 234 | struct fip_vendor_desc { |
diff --git a/include/scsi/fc/fc_fs.h b/include/scsi/fc/fc_fs.h index ac4cd38c860e..50f28b143451 100644 --- a/include/scsi/fc/fc_fs.h +++ b/include/scsi/fc/fc_fs.h | |||
@@ -20,6 +20,8 @@ | |||
20 | #ifndef _FC_FS_H_ | 20 | #ifndef _FC_FS_H_ |
21 | #define _FC_FS_H_ | 21 | #define _FC_FS_H_ |
22 | 22 | ||
23 | #include <linux/types.h> | ||
24 | |||
23 | /* | 25 | /* |
24 | * Fibre Channel Framing and Signalling definitions. | 26 | * Fibre Channel Framing and Signalling definitions. |
25 | * From T11 FC-FS-2 Rev 0.90 - 9 August 2005. | 27 | * From T11 FC-FS-2 Rev 0.90 - 9 August 2005. |
diff --git a/include/scsi/fc/fc_gs.h b/include/scsi/fc/fc_gs.h index 324dd0e3c622..a37346d47eb1 100644 --- a/include/scsi/fc/fc_gs.h +++ b/include/scsi/fc/fc_gs.h | |||
@@ -20,6 +20,8 @@ | |||
20 | #ifndef _FC_GS_H_ | 20 | #ifndef _FC_GS_H_ |
21 | #define _FC_GS_H_ | 21 | #define _FC_GS_H_ |
22 | 22 | ||
23 | #include <linux/types.h> | ||
24 | |||
23 | /* | 25 | /* |
24 | * Fibre Channel Services - Common Transport. | 26 | * Fibre Channel Services - Common Transport. |
25 | * From T11.org FC-GS-2 Rev 5.3 November 1998. | 27 | * From T11.org FC-GS-2 Rev 5.3 November 1998. |
diff --git a/include/scsi/fc/fc_ns.h b/include/scsi/fc/fc_ns.h index 790d7b97d4bc..e7d3ac497d7d 100644 --- a/include/scsi/fc/fc_ns.h +++ b/include/scsi/fc/fc_ns.h | |||
@@ -20,6 +20,8 @@ | |||
20 | #ifndef _FC_NS_H_ | 20 | #ifndef _FC_NS_H_ |
21 | #define _FC_NS_H_ | 21 | #define _FC_NS_H_ |
22 | 22 | ||
23 | #include <linux/types.h> | ||
24 | |||
23 | /* | 25 | /* |
24 | * Fibre Channel Services - Name Service (dNS) | 26 | * Fibre Channel Services - Name Service (dNS) |
25 | * From T11.org FC-GS-2 Rev 5.3 November 1998. | 27 | * From T11.org FC-GS-2 Rev 5.3 November 1998. |
@@ -44,9 +46,12 @@ enum fc_ns_req { | |||
44 | FC_NS_GID_FT = 0x0171, /* get IDs by FC4 type */ | 46 | FC_NS_GID_FT = 0x0171, /* get IDs by FC4 type */ |
45 | FC_NS_GPN_FT = 0x0172, /* get port names by FC4 type */ | 47 | FC_NS_GPN_FT = 0x0172, /* get port names by FC4 type */ |
46 | FC_NS_GID_PT = 0x01a1, /* get IDs by port type */ | 48 | FC_NS_GID_PT = 0x01a1, /* get IDs by port type */ |
47 | FC_NS_RFT_ID = 0x0217, /* reg FC4 type for ID */ | ||
48 | FC_NS_RPN_ID = 0x0212, /* reg port name for ID */ | 49 | FC_NS_RPN_ID = 0x0212, /* reg port name for ID */ |
49 | FC_NS_RNN_ID = 0x0213, /* reg node name for ID */ | 50 | FC_NS_RNN_ID = 0x0213, /* reg node name for ID */ |
51 | FC_NS_RFT_ID = 0x0217, /* reg FC4 type for ID */ | ||
52 | FC_NS_RSPN_ID = 0x0218, /* reg symbolic port name */ | ||
53 | FC_NS_RFF_ID = 0x021f, /* reg FC4 Features for ID */ | ||
54 | FC_NS_RSNN_NN = 0x0239, /* reg symbolic node name */ | ||
50 | }; | 55 | }; |
51 | 56 | ||
52 | /* | 57 | /* |
@@ -156,4 +161,32 @@ struct fc_ns_rn_id { | |||
156 | __be64 fr_wwn; /* node name or port name */ | 161 | __be64 fr_wwn; /* node name or port name */ |
157 | } __attribute__((__packed__)); | 162 | } __attribute__((__packed__)); |
158 | 163 | ||
164 | /* | ||
165 | * RSNN_NN request - register symbolic node name | ||
166 | */ | ||
167 | struct fc_ns_rsnn { | ||
168 | __be64 fr_wwn; /* node name */ | ||
169 | __u8 fr_name_len; | ||
170 | char fr_name[]; | ||
171 | } __attribute__((__packed__)); | ||
172 | |||
173 | /* | ||
174 | * RSPN_ID request - register symbolic port name | ||
175 | */ | ||
176 | struct fc_ns_rspn { | ||
177 | struct fc_ns_fid fr_fid; /* port ID object */ | ||
178 | __u8 fr_name_len; | ||
179 | char fr_name[]; | ||
180 | } __attribute__((__packed__)); | ||
181 | |||
182 | /* | ||
183 | * RFF_ID request - register FC-4 Features for ID. | ||
184 | */ | ||
185 | struct fc_ns_rff_id { | ||
186 | struct fc_ns_fid fr_fid; /* port ID object */ | ||
187 | __u8 fr_resvd[2]; | ||
188 | __u8 fr_feat; /* FC-4 Feature bits */ | ||
189 | __u8 fr_type; /* FC-4 type */ | ||
190 | } __attribute__((__packed__)); | ||
191 | |||
159 | #endif /* _FC_NS_H_ */ | 192 | #endif /* _FC_NS_H_ */ |