hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/s390/scsi/zfcp_fsf.h
....@@ -4,7 +4,7 @@
44 *
55 * Interface to the FSF support functions.
66 *
7
- * Copyright IBM Corp. 2002, 2018
7
+ * Copyright IBM Corp. 2002, 2020
88 */
99
1010 #ifndef FSF_H
....@@ -78,6 +78,7 @@
7878 #define FSF_BLOCK_GUARD_CHECK_FAILURE 0x00000081
7979 #define FSF_APP_TAG_CHECK_FAILURE 0x00000082
8080 #define FSF_REF_TAG_CHECK_FAILURE 0x00000083
81
+#define FSF_SECURITY_ERROR 0x00000090
8182 #define FSF_ADAPTER_STATUS_AVAILABLE 0x000000AD
8283 #define FSF_FCP_RSP_AVAILABLE 0x000000AF
8384 #define FSF_UNKNOWN_COMMAND 0x000000E2
....@@ -109,6 +110,14 @@
109110 #define FSF_PSQ_LINK_WWPN_ASSIGNMENT_CORRUPTED 0x00002000
110111 #define FSF_PSQ_LINK_MODE_TABLE_CURRUPTED 0x00004000
111112 #define FSF_PSQ_LINK_NO_WWPN_ASSIGNMENT 0x00008000
113
+
114
+/* FSF status qualifier, security error */
115
+#define FSF_SQ_SECURITY_REQUIRED 0x00000001
116
+#define FSF_SQ_SECURITY_TIMEOUT 0x00000002
117
+#define FSF_SQ_SECURITY_KM_UNAVAILABLE 0x00000003
118
+#define FSF_SQ_SECURITY_RKM_UNAVAILABLE 0x00000004
119
+#define FSF_SQ_SECURITY_AUTH_FAILURE 0x00000005
120
+#define FSF_SQ_SECURITY_ENC_FAILURE 0x00000010
112121
113122 /* payload size in status read buffer */
114123 #define FSF_STATUS_READ_PAYLOAD_SIZE 4032
....@@ -163,6 +172,9 @@
163172 #define FSF_FEATURE_ELS_CT_CHAINED_SBALS 0x00000020
164173 #define FSF_FEATURE_UPDATE_ALERT 0x00000100
165174 #define FSF_FEATURE_MEASUREMENT_DATA 0x00000200
175
+#define FSF_FEATURE_REQUEST_SFP_DATA 0x00000200
176
+#define FSF_FEATURE_REPORT_SFP_DATA 0x00000800
177
+#define FSF_FEATURE_FC_SECURITY 0x00001000
166178 #define FSF_FEATURE_DIF_PROT_TYPE1 0x00010000
167179 #define FSF_FEATURE_DIX_PROT_TCPIP 0x00020000
168180
....@@ -171,6 +183,11 @@
171183
172184 /* option */
173185 #define FSF_OPEN_LUN_SUPPRESS_BOXING 0x00000001
186
+
187
+/* FC security algorithms */
188
+#define FSF_FC_SECURITY_AUTH 0x00000001
189
+#define FSF_FC_SECURITY_ENC_FCSP2 0x00000002
190
+#define FSF_FC_SECURITY_ENC_ERAS 0x00000004
174191
175192 struct fsf_queue_designator {
176193 u8 cssid;
....@@ -336,7 +353,8 @@
336353 u8 res3[3];
337354 u8 timeout;
338355 u32 lun_access_info;
339
- u8 res4[180];
356
+ u32 connection_info;
357
+ u8 res4[176];
340358 u32 els1_length;
341359 u32 els2_length;
342360 u32 req_buf_length;
....@@ -407,7 +425,25 @@
407425 u8 cp_util;
408426 u8 cb_util;
409427 u8 a_util;
410
- u8 res2[253];
428
+ u8 res2;
429
+ s16 temperature;
430
+ u16 vcc;
431
+ u16 tx_bias;
432
+ u16 tx_power;
433
+ u16 rx_power;
434
+ union {
435
+ u16 raw;
436
+ struct {
437
+ u16 fec_active :1;
438
+ u16:7;
439
+ u16 connector_type :2;
440
+ u16 sfp_invalid :1;
441
+ u16 optical_port :1;
442
+ u16 port_tx_type :4;
443
+ };
444
+ } sfp_flags;
445
+ u32 fc_security_algorithms;
446
+ u8 res3[236];
411447 } __attribute__ ((packed));
412448
413449 union fsf_qtcb_bottom {
....@@ -438,8 +474,8 @@
438474
439475 /**
440476 * struct zfcp_fsf_ct_els - zfcp data for ct or els request
441
- * @req: scatter-gather list for request
442
- * @resp: scatter-gather list for response
477
+ * @req: scatter-gather list for request, points to &zfcp_fc_req.sg_req or BSG
478
+ * @resp: scatter-gather list for response, points to &zfcp_fc_req.sg_rsp or BSG
443479 * @handler: handler function (called for response to the request)
444480 * @handler_data: data passed to handler function
445481 * @port: Optional pointer to port for zfcp internal ELS (only test link ADISC)