Skip to content

Commit a7dff3a

Browse files
jsmart-ghmartinkpetersen
authored andcommitted
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>
1 parent d964b3e commit a7dff3a

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

‎include/uapi/scsi/fc/fc_els.h‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ enum fc_els_cmd {
5252
ELS_RRQ = 0x12, /* reinstate recovery qualifier */
5353
ELS_REC = 0x13, /* read exchange concise */
5454
ELS_SRR = 0x14, /* sequence retransmission request */
55+
ELS_FPIN = 0x16, /* Fabric Performance Impact Notification */
5556
ELS_PRLI = 0x20, /* process login */
5657
ELS_PRLO = 0x21, /* process logout */
5758
ELS_SCN = 0x22, /* state change notification */
@@ -119,6 +120,7 @@ enum fc_els_cmd {
119120
[ELS_RRQ] = "RRQ", \
120121
[ELS_REC] = "REC", \
121122
[ELS_SRR] = "SRR", \
123+
[ELS_FPIN] = "FPIN", \
122124
[ELS_PRLI] = "PRLI", \
123125
[ELS_PRLO] = "PRLO", \
124126
[ELS_SCN] = "SCN", \
@@ -829,4 +831,35 @@ enum fc_els_clid_ic {
829831
ELS_CLID_IC_LIP = 8, /* receiving LIP */
830832
};
831833

834+
835+
/*
836+
* Fabric Notification Descriptor Tag values
837+
*/
838+
enum fc_fn_dtag {
839+
ELS_FN_DTAG_LNK_INTEGRITY = 0x00020001, /* Link Integrity */
840+
ELS_FN_DTAG_PEER_CONGEST = 0x00020003, /* Peer Congestion */
841+
ELS_FN_DTAG_CONGESTION = 0x00020004, /* Congestion */
842+
};
843+
844+
/*
845+
* Fabric Notification Descriptor
846+
*/
847+
struct fc_fn_desc {
848+
__be32 fn_desc_tag; /* Notification Descriptor Tag */
849+
__be32 fn_desc_value_len; /* Length of Descriptor Value field
850+
* (in bytes)
851+
*/
852+
__u8 fn_desc_value[0]; /* Descriptor Value */
853+
};
854+
855+
/*
856+
* ELS_FPIN - Fabric Performance Impact Notification
857+
*/
858+
struct fc_els_fpin {
859+
__u8 fpin_cmd; /* command (0x16) */
860+
__u8 fpin_zero[3]; /* specified as zero - part of cmd */
861+
__be32 fpin_desc_cnt; /* count of descriptors */
862+
struct fc_fn_desc fpin_desc[0]; /* Descriptor list */
863+
};
864+
832865
#endif /* _FC_ELS_H_ */

0 commit comments

Comments
 (0)