From: Christof Schmitt <christof.schmitt@de.ibm.com>
To: linux-scsi@vger.kernel.org
Subject: [RFC] Common header file for FC definitions
Date: Tue, 8 Jan 2008 09:09:36 +0100 [thread overview]
Message-ID: <20080108080924.GA6993@schmichrtp.de.ibm.com> (raw)
zfcp has a couple of definitions to describe the FC protocol. Grepping
through the complete source tree shows that e.g. the lpfc module makes
similar private definitions. It think that it would make sense to
introduce a global header file for FC related definitions that each FC
driver can use.
The attached patch contains some definitons that i found in zfcp and
could be reused by other drivers.
What do others think? Would this be useful?
Christof
---
include/scsi/fc.h | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ b/include/scsi/fc.h 2008-01-08 08:56:32.000000000 +0100
@@ -0,0 +1,47 @@
+/*
+ * Public definitions that are used by Fibre Channel (FC)
+ * device drivers.
+ */
+
+/* FC-PH/FC-GS well-known address identifiers for generic services */
+#define FC_DID_KEY_DISTRIBUTION_SERVICE 0xFFFFF7
+#define FC_DID_ALIAS_SERVICE 0xFFFFF8
+#define FC_DID_MANAGEMENT_SERVICE 0xFFFFFA
+#define FC_DID_TIME_SERVICE 0xFFFFFB
+#define FC_DID_DIRECTORY_SERVICE 0xFFFFFC
+
+#define FC_DID_MASK 0x00FFFFFF
+
+/* task attribute values in FCP-2 FCP_CMND IU */
+#define SIMPLE_Q 0
+#define HEAD_OF_Q 1
+#define ORDERED_Q 2
+#define ACA_Q 4
+#define UNTAGGED 5
+
+/* task management flags in FCP-2 FCP_CMND IU */
+#define FCP_ABORT_TASK_SET 0x02
+#define FCP_CLEAR_TASK_SET 0x04
+#define FCP_LOGICAL_UNIT_RESET 0x10
+#define FCP_TARGET_RESET 0x20
+#define FCP_CLEAR_ACA 0x40
+
+/* FC-LS */
+#define FC_LS_RLS 0x0f
+#define FC_LS_ADISC 0x52
+#define FC_LS_RPS 0x56
+#define FC_LS_RSCN 0x61
+#define FC_LS_RNID 0x78
+
+/*
+ * FC-GS-2
+ */
+#define FC_CT_REVISION 0x01
+#define FC_CT_DIRECTORY_SERVICE 0xFC
+#define FC_CT_NAME_SERVER 0x02
+#define FC_CT_SYNCHRONOUS 0x00
+#define FC_CT_GID_PN 0x0121
+#define FC_CT_MAX_SIZE 0x1020
+#define FC_CT_ACCEPT 0x8002
+#define FC_CT_REJECT 0x8001
+
next reply other threads:[~2008-01-08 8:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-08 8:09 Christof Schmitt [this message]
2008-01-08 13:14 ` [RFC] Common header file for FC definitions Christoph Hellwig
2008-01-08 15:46 ` James Smart
2008-01-08 16:53 ` Christof Schmitt
2008-01-08 13:59 ` Seokmann Ju
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080108080924.GA6993@schmichrtp.de.ibm.com \
--to=christof.schmitt@de.ibm.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.