/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */1/*2* Copyright(c) 2007 Intel Corporation. All rights reserved.3*4* Maintained at www.Open-FCoE.org5*/67#ifndef _FC_GS_H_8#define _FC_GS_H_910#include <linux/types.h>1112/*13* Fibre Channel Services - Common Transport.14* From T11.org FC-GS-2 Rev 5.3 November 1998.15*/1617struct fc_ct_hdr {18__u8 ct_rev; /* revision */19__u8 ct_in_id[3]; /* N_Port ID of original requestor */20__u8 ct_fs_type; /* type of fibre channel service */21__u8 ct_fs_subtype; /* subtype */22__u8 ct_options;23__u8 _ct_resvd1;24__be16 ct_cmd; /* command / response code */25__be16 ct_mr_size; /* maximum / residual size */26__u8 _ct_resvd2;27__u8 ct_reason; /* reject reason */28__u8 ct_explan; /* reason code explanation */29__u8 ct_vendor; /* vendor unique data */30};3132#define FC_CT_HDR_LEN 16 /* expected sizeof (struct fc_ct_hdr) */3334enum fc_ct_rev {35FC_CT_REV = 1 /* common transport revision */36};3738/*39* ct_fs_type values.40*/41enum fc_ct_fs_type {42FC_FST_ALIAS = 0xf8, /* alias service */43FC_FST_MGMT = 0xfa, /* management service */44FC_FST_TIME = 0xfb, /* time service */45FC_FST_DIR = 0xfc, /* directory service */46};4748/*49* ct_cmd: Command / response codes50*/51enum fc_ct_cmd {52FC_FS_RJT = 0x8001, /* reject */53FC_FS_ACC = 0x8002, /* accept */54};5556/*57* FS_RJT reason codes.58*/59enum fc_ct_reason {60FC_FS_RJT_CMD = 0x01, /* invalid command code */61FC_FS_RJT_VER = 0x02, /* invalid version level */62FC_FS_RJT_LOG = 0x03, /* logical error */63FC_FS_RJT_IUSIZ = 0x04, /* invalid IU size */64FC_FS_RJT_BSY = 0x05, /* logical busy */65FC_FS_RJT_PROTO = 0x07, /* protocol error */66FC_FS_RJT_UNABL = 0x09, /* unable to perform command request */67FC_FS_RJT_UNSUP = 0x0b, /* command not supported */68};6970/*71* FS_RJT reason code explanations.72*/73enum fc_ct_explan {74FC_FS_EXP_NONE = 0x00, /* no additional explanation */75FC_FS_EXP_PID = 0x01, /* port ID not registered */76FC_FS_EXP_PNAM = 0x02, /* port name not registered */77FC_FS_EXP_NNAM = 0x03, /* node name not registered */78FC_FS_EXP_COS = 0x04, /* class of service not registered */79FC_FS_EXP_FTNR = 0x07, /* FC-4 types not registered */80/* definitions not complete */81};8283#endif /* _FC_GS_H_ */848586