hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/s390/block/dasd_eckd.h
....@@ -50,14 +50,24 @@
5050 #define DASD_ECKD_CCW_PFX_READ 0xEA
5151 #define DASD_ECKD_CCW_RSCK 0xF9
5252 #define DASD_ECKD_CCW_RCD 0xFA
53
+#define DASD_ECKD_CCW_DSO 0xF7
54
+
55
+/* Define Subssystem Function / Orders */
56
+#define DSO_ORDER_RAS 0x81
57
+
58
+/*
59
+ * Perform Subsystem Function / Orders
60
+ */
61
+#define PSF_ORDER_PRSSD 0x18
62
+#define PSF_ORDER_CUIR_RESPONSE 0x1A
63
+#define PSF_ORDER_SSC 0x1D
5364
5465 /*
5566 * Perform Subsystem Function / Sub-Orders
5667 */
57
-#define PSF_ORDER_PRSSD 0x18
58
-#define PSF_ORDER_CUIR_RESPONSE 0x1A
59
-#define PSF_SUBORDER_QHA 0x1C
60
-#define PSF_ORDER_SSC 0x1D
68
+#define PSF_SUBORDER_QHA 0x1C /* Query Host Access */
69
+#define PSF_SUBORDER_VSQ 0x52 /* Volume Storage Query */
70
+#define PSF_SUBORDER_LCQ 0x53 /* Logical Configuration Query */
6171
6272 /*
6373 * CUIR response condition codes
....@@ -80,10 +90,22 @@
8090 #define CUIR_RESUME 0x02
8191
8292 /*
93
+ * Out-of-space (OOS) Codes
94
+ */
95
+#define REPO_WARN 0x01
96
+#define REPO_EXHAUST 0x02
97
+#define POOL_WARN 0x03
98
+#define POOL_EXHAUST 0x04
99
+#define REPO_RELIEVE 0x05
100
+#define POOL_RELIEVE 0x06
101
+
102
+/*
83103 * attention message definitions
84104 */
85105 #define ATTENTION_LENGTH_CUIR 0x0e
86106 #define ATTENTION_FORMAT_CUIR 0x01
107
+#define ATTENTION_LENGTH_OOS 0x10
108
+#define ATTENTION_FORMAT_OOS 0x06
87109
88110 #define DASD_ECKD_PG_GROUPED 0x10
89111
....@@ -98,6 +120,12 @@
98120
99121 #define DASD_ECKD_PATH_THRHLD 256
100122 #define DASD_ECKD_PATH_INTERVAL 300
123
+
124
+/*
125
+ * Maximum number of blocks to be chained
126
+ */
127
+#define DASD_ECKD_MAX_BLOCKS 190
128
+#define DASD_ECKD_MAX_BLOCKS_RAW 256
101129
102130 /*****************************************************************************
103131 * SECTION: Type Definitions
....@@ -116,33 +144,10 @@
116144 __u16 head;
117145 } __attribute__ ((packed));
118146
119
-struct chs_t {
120
- __u16 cyl;
121
- __u16 head;
122
- __u32 sector;
123
-} __attribute__ ((packed));
124
-
125147 struct chr_t {
126148 __u16 cyl;
127149 __u16 head;
128150 __u8 record;
129
-} __attribute__ ((packed));
130
-
131
-struct geom_t {
132
- __u16 cyl;
133
- __u16 head;
134
- __u32 sector;
135
-} __attribute__ ((packed));
136
-
137
-struct eckd_home {
138
- __u8 skip_control[14];
139
- __u16 cell_number;
140
- __u8 physical_addr[3];
141
- __u8 flag;
142
- struct ch_t track_addr;
143
- __u8 reserved;
144
- __u8 key_length;
145
- __u8 reserved2[2];
146151 } __attribute__ ((packed));
147152
148153 struct DE_eckd_data {
....@@ -215,7 +220,7 @@
215220 __u8 imbedded_count;
216221 __u8 extended_operation;
217222 __u16 extended_parameter_length;
218
- __u8 extended_parameter[0];
223
+ __u8 extended_parameter[];
219224 } __attribute__ ((packed));
220225
221226 /* Prefix data for format 0x00 and 0x01 */
....@@ -387,6 +392,86 @@
387392 char messages[4087];
388393 } __packed;
389394
395
+/*
396
+ * Read Subsystem Data - Volume Storage Query
397
+ */
398
+struct dasd_rssd_vsq {
399
+ struct {
400
+ __u8 tse:1;
401
+ __u8 space_not_available:1;
402
+ __u8 ese:1;
403
+ __u8 unused:5;
404
+ } __packed vol_info;
405
+ __u8 unused1;
406
+ __u16 extent_pool_id;
407
+ __u8 warn_cap_limit;
408
+ __u8 warn_cap_guaranteed;
409
+ __u16 unused2;
410
+ __u32 limit_capacity;
411
+ __u32 guaranteed_capacity;
412
+ __u32 space_allocated;
413
+ __u32 space_configured;
414
+ __u32 logical_capacity;
415
+} __packed;
416
+
417
+/*
418
+ * Extent Pool Summary
419
+ */
420
+struct dasd_ext_pool_sum {
421
+ __u16 pool_id;
422
+ __u8 repo_warn_thrshld;
423
+ __u8 warn_thrshld;
424
+ struct {
425
+ __u8 type:1; /* 0 - CKD / 1 - FB */
426
+ __u8 track_space_efficient:1;
427
+ __u8 extent_space_efficient:1;
428
+ __u8 standard_volume:1;
429
+ __u8 extent_size_valid:1;
430
+ __u8 capacity_at_warnlevel:1;
431
+ __u8 pool_oos:1;
432
+ __u8 unused0:1;
433
+ __u8 unused1;
434
+ } __packed flags;
435
+ struct {
436
+ __u8 reserved0:1;
437
+ __u8 size_1G:1;
438
+ __u8 reserved1:5;
439
+ __u8 size_16M:1;
440
+ } __packed extent_size;
441
+ __u8 unused;
442
+} __packed;
443
+
444
+/*
445
+ * Read Subsystem Data-Response - Logical Configuration Query - Header
446
+ */
447
+struct dasd_rssd_lcq {
448
+ __u16 data_length; /* Length of data returned */
449
+ __u16 pool_count; /* Count of extent pools returned - Max: 448 */
450
+ struct {
451
+ __u8 pool_info_valid:1; /* Detailed Information valid */
452
+ __u8 pool_id_volume:1;
453
+ __u8 pool_id_cec:1;
454
+ __u8 unused0:5;
455
+ __u8 unused1;
456
+ } __packed header_flags;
457
+ char sfi_type[6]; /* Storage Facility Image Type (EBCDIC) */
458
+ char sfi_model[3]; /* Storage Facility Image Model (EBCDIC) */
459
+ __u8 sfi_seq_num[10]; /* Storage Facility Image Sequence Number */
460
+ __u8 reserved[7];
461
+ struct dasd_ext_pool_sum ext_pool_sum[448];
462
+} __packed;
463
+
464
+struct dasd_oos_message {
465
+ __u16 length;
466
+ __u8 format;
467
+ __u8 code;
468
+ __u8 percentage_empty;
469
+ __u8 reserved;
470
+ __u16 ext_pool_id;
471
+ __u16 token;
472
+ __u8 unused[6];
473
+} __packed;
474
+
390475 struct dasd_cuir_message {
391476 __u16 length;
392477 __u8 format;
....@@ -460,6 +545,42 @@
460545 unsigned char suborder;
461546 unsigned char reserved[59];
462547 } __attribute__((packed));
548
+
549
+/* Maximum number of extents for a single Release Allocated Space command */
550
+#define DASD_ECKD_RAS_EXTS_MAX 110U
551
+
552
+struct dasd_dso_ras_ext_range {
553
+ struct ch_t beg_ext;
554
+ struct ch_t end_ext;
555
+} __packed;
556
+
557
+/*
558
+ * Define Subsytem Operation - Release Allocated Space
559
+ */
560
+struct dasd_dso_ras_data {
561
+ __u8 order;
562
+ struct {
563
+ __u8 message:1; /* Must be zero */
564
+ __u8 reserved1:2;
565
+ __u8 vol_type:1; /* 0 - CKD/FBA, 1 - FB */
566
+ __u8 reserved2:4;
567
+ } __packed flags;
568
+ /* Operation Flags to specify scope */
569
+ struct {
570
+ __u8 reserved1:2;
571
+ /* Release Space by Extent */
572
+ __u8 by_extent:1; /* 0 - entire volume, 1 - specified extents */
573
+ __u8 guarantee_init:1;
574
+ __u8 force_release:1; /* Internal - will be ignored */
575
+ __u16 reserved2:11;
576
+ } __packed op_flags;
577
+ __u8 lss;
578
+ __u8 dev_addr;
579
+ __u32 reserved1;
580
+ __u8 reserved2[10];
581
+ __u16 nr_exts; /* Defines number of ext_scope - max 110 */
582
+ __u16 reserved3;
583
+} __packed;
463584
464585
465586 /*
....@@ -551,6 +672,8 @@
551672 int uses_cdl;
552673 struct attrib_data_t attrib; /* e.g. cache operations */
553674 struct dasd_rssd_features features;
675
+ struct dasd_rssd_vsq vsq;
676
+ struct dasd_ext_pool_sum eps;
554677 u32 real_cyl;
555678
556679 /* alias managemnet */
....@@ -572,7 +695,5 @@
572695 struct dasd_device *dasd_alias_get_start_dev(struct dasd_device *);
573696 void dasd_alias_handle_summary_unit_check(struct work_struct *);
574697 void dasd_eckd_reset_ccw_to_base_io(struct dasd_ccw_req *);
575
-void dasd_alias_lcu_setup_complete(struct dasd_device *);
576
-void dasd_alias_wait_for_lcu_setup(struct dasd_device *);
577698 int dasd_alias_update_add_device(struct dasd_device *);
578699 #endif /* DASD_ECKD_H */