Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

James Smart and committed by
Martin K. Petersen
a7dff3ad d964b3e5

+33
+33
include/uapi/scsi/fc/fc_els.h
··· 52 52 ELS_RRQ = 0x12, /* reinstate recovery qualifier */ 53 53 ELS_REC = 0x13, /* read exchange concise */ 54 54 ELS_SRR = 0x14, /* sequence retransmission request */ 55 + ELS_FPIN = 0x16, /* Fabric Performance Impact Notification */ 55 56 ELS_PRLI = 0x20, /* process login */ 56 57 ELS_PRLO = 0x21, /* process logout */ 57 58 ELS_SCN = 0x22, /* state change notification */ ··· 120 119 [ELS_RRQ] = "RRQ", \ 121 120 [ELS_REC] = "REC", \ 122 121 [ELS_SRR] = "SRR", \ 122 + [ELS_FPIN] = "FPIN", \ 123 123 [ELS_PRLI] = "PRLI", \ 124 124 [ELS_PRLO] = "PRLO", \ 125 125 [ELS_SCN] = "SCN", \ ··· 829 827 ELS_CLID_IC_INVAL = 6, /* invalid primitive sequence */ 830 828 ELS_CLID_IC_LOOP_TO = 7, /* loop initialization time out */ 831 829 ELS_CLID_IC_LIP = 8, /* receiving LIP */ 830 + }; 831 + 832 + 833 + /* 834 + * Fabric Notification Descriptor Tag values 835 + */ 836 + enum fc_fn_dtag { 837 + ELS_FN_DTAG_LNK_INTEGRITY = 0x00020001, /* Link Integrity */ 838 + ELS_FN_DTAG_PEER_CONGEST = 0x00020003, /* Peer Congestion */ 839 + ELS_FN_DTAG_CONGESTION = 0x00020004, /* Congestion */ 840 + }; 841 + 842 + /* 843 + * Fabric Notification Descriptor 844 + */ 845 + struct fc_fn_desc { 846 + __be32 fn_desc_tag; /* Notification Descriptor Tag */ 847 + __be32 fn_desc_value_len; /* Length of Descriptor Value field 848 + * (in bytes) 849 + */ 850 + __u8 fn_desc_value[0]; /* Descriptor Value */ 851 + }; 852 + 853 + /* 854 + * ELS_FPIN - Fabric Performance Impact Notification 855 + */ 856 + struct fc_els_fpin { 857 + __u8 fpin_cmd; /* command (0x16) */ 858 + __u8 fpin_zero[3]; /* specified as zero - part of cmd */ 859 + __be32 fpin_desc_cnt; /* count of descriptors */ 860 + struct fc_fn_desc fpin_desc[0]; /* Descriptor list */ 832 861 }; 833 862 834 863 #endif /* _FC_ELS_H_ */