1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
3 * Copyright(c) 2007 Intel Corporation. All rights reserved.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
18 * Maintained at www.Open-FCoE.org
24 #include <linux/types.h>
27 * Fibre Channel Services - Common Transport.
28 * From T11.org FC-GS-2 Rev 5.3 November 1998.
32 __u8 ct_rev
; /* revision */
33 __u8 ct_in_id
[3]; /* N_Port ID of original requestor */
34 __u8 ct_fs_type
; /* type of fibre channel service */
35 __u8 ct_fs_subtype
; /* subtype */
38 __be16 ct_cmd
; /* command / response code */
39 __be16 ct_mr_size
; /* maximum / residual size */
41 __u8 ct_reason
; /* reject reason */
42 __u8 ct_explan
; /* reason code explanation */
43 __u8 ct_vendor
; /* vendor unique data */
46 #define FC_CT_HDR_LEN 16 /* expected sizeof (struct fc_ct_hdr) */
49 FC_CT_REV
= 1 /* common transport revision */
56 FC_FST_ALIAS
= 0xf8, /* alias service */
57 FC_FST_MGMT
= 0xfa, /* management service */
58 FC_FST_TIME
= 0xfb, /* time service */
59 FC_FST_DIR
= 0xfc, /* directory service */
63 * ct_cmd: Command / response codes
66 FC_FS_RJT
= 0x8001, /* reject */
67 FC_FS_ACC
= 0x8002, /* accept */
71 * FS_RJT reason codes.
74 FC_FS_RJT_CMD
= 0x01, /* invalid command code */
75 FC_FS_RJT_VER
= 0x02, /* invalid version level */
76 FC_FS_RJT_LOG
= 0x03, /* logical error */
77 FC_FS_RJT_IUSIZ
= 0x04, /* invalid IU size */
78 FC_FS_RJT_BSY
= 0x05, /* logical busy */
79 FC_FS_RJT_PROTO
= 0x07, /* protocol error */
80 FC_FS_RJT_UNABL
= 0x09, /* unable to perform command request */
81 FC_FS_RJT_UNSUP
= 0x0b, /* command not supported */
85 * FS_RJT reason code explanations.
88 FC_FS_EXP_NONE
= 0x00, /* no additional explanation */
89 FC_FS_EXP_PID
= 0x01, /* port ID not registered */
90 FC_FS_EXP_PNAM
= 0x02, /* port name not registered */
91 FC_FS_EXP_NNAM
= 0x03, /* node name not registered */
92 FC_FS_EXP_COS
= 0x04, /* class of service not registered */
93 FC_FS_EXP_FTNR
= 0x07, /* FC-4 types not registered */
94 /* definitions not complete */
97 #endif /* _FC_GS_H_ */