aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/scsi
diff options
context:
space:
mode:
authorJames Smart <jsmart2021@gmail.com>2019-04-05 16:04:20 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2019-04-08 21:29:16 -0400
commita7dff3ad4787381a3aa831d558fb720b8f354435 (patch)
treea8983897b4576e16cabb4ca3c1e650931d61635b /include/uapi/scsi
parentscsi: lpfc: Fix a recently introduced compiler warning (diff)
downloadlinux-dev-a7dff3ad4787381a3aa831d558fb720b8f354435.tar.xz
linux-dev-a7dff3ad4787381a3aa831d558fb720b8f354435.zip
scsi: fc: add FPIN ELS definition
T11 has introduced a new Fabric Notifications mechanism whereby the fabric can notify a port of events occurring in the fabric. The notifications are given by the FPIN ELS. Add the FPIN ELS definitions to the kernel. Signed-off-by: James Smart <jsmart2021@gmail.com> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/uapi/scsi')
-rw-r--r--include/uapi/scsi/fc/fc_els.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/include/uapi/scsi/fc/fc_els.h b/include/uapi/scsi/fc/fc_els.h
index b7e0a5ed40de..a81c53508cc6 100644
--- a/include/uapi/scsi/fc/fc_els.h
+++ b/include/uapi/scsi/fc/fc_els.h
@@ -52,6 +52,7 @@ enum fc_els_cmd {
ELS_RRQ = 0x12, /* reinstate recovery qualifier */
ELS_REC = 0x13, /* read exchange concise */
ELS_SRR = 0x14, /* sequence retransmission request */
+ ELS_FPIN = 0x16, /* Fabric Performance Impact Notification */
ELS_PRLI = 0x20, /* process login */
ELS_PRLO = 0x21, /* process logout */
ELS_SCN = 0x22, /* state change notification */
@@ -119,6 +120,7 @@ enum fc_els_cmd {
[ELS_RRQ] = "RRQ", \
[ELS_REC] = "REC", \
[ELS_SRR] = "SRR", \
+ [ELS_FPIN] = "FPIN", \
[ELS_PRLI] = "PRLI", \
[ELS_PRLO] = "PRLO", \
[ELS_SCN] = "SCN", \
@@ -829,4 +831,35 @@ enum fc_els_clid_ic {
ELS_CLID_IC_LIP = 8, /* receiving LIP */
};
+
+/*
+ * Fabric Notification Descriptor Tag values
+ */
+enum fc_fn_dtag {
+ ELS_FN_DTAG_LNK_INTEGRITY = 0x00020001, /* Link Integrity */
+ ELS_FN_DTAG_PEER_CONGEST = 0x00020003, /* Peer Congestion */
+ ELS_FN_DTAG_CONGESTION = 0x00020004, /* Congestion */
+};
+
+/*
+ * Fabric Notification Descriptor
+ */
+struct fc_fn_desc {
+ __be32 fn_desc_tag; /* Notification Descriptor Tag */
+ __be32 fn_desc_value_len; /* Length of Descriptor Value field
+ * (in bytes)
+ */
+ __u8 fn_desc_value[0]; /* Descriptor Value */
+};
+
+/*
+ * ELS_FPIN - Fabric Performance Impact Notification
+ */
+struct fc_els_fpin {
+ __u8 fpin_cmd; /* command (0x16) */
+ __u8 fpin_zero[3]; /* specified as zero - part of cmd */
+ __be32 fpin_desc_cnt; /* count of descriptors */
+ struct fc_fn_desc fpin_desc[0]; /* Descriptor list */
+};
+
#endif /* _FC_ELS_H_ */