| .. | .. |
|---|
| 50 | 50 | #define DASD_ECKD_CCW_PFX_READ 0xEA |
|---|
| 51 | 51 | #define DASD_ECKD_CCW_RSCK 0xF9 |
|---|
| 52 | 52 | #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 |
|---|
| 53 | 64 | |
|---|
| 54 | 65 | /* |
|---|
| 55 | 66 | * Perform Subsystem Function / Sub-Orders |
|---|
| 56 | 67 | */ |
|---|
| 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 */ |
|---|
| 61 | 71 | |
|---|
| 62 | 72 | /* |
|---|
| 63 | 73 | * CUIR response condition codes |
|---|
| .. | .. |
|---|
| 80 | 90 | #define CUIR_RESUME 0x02 |
|---|
| 81 | 91 | |
|---|
| 82 | 92 | /* |
|---|
| 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 | +/* |
|---|
| 83 | 103 | * attention message definitions |
|---|
| 84 | 104 | */ |
|---|
| 85 | 105 | #define ATTENTION_LENGTH_CUIR 0x0e |
|---|
| 86 | 106 | #define ATTENTION_FORMAT_CUIR 0x01 |
|---|
| 107 | +#define ATTENTION_LENGTH_OOS 0x10 |
|---|
| 108 | +#define ATTENTION_FORMAT_OOS 0x06 |
|---|
| 87 | 109 | |
|---|
| 88 | 110 | #define DASD_ECKD_PG_GROUPED 0x10 |
|---|
| 89 | 111 | |
|---|
| .. | .. |
|---|
| 98 | 120 | |
|---|
| 99 | 121 | #define DASD_ECKD_PATH_THRHLD 256 |
|---|
| 100 | 122 | #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 |
|---|
| 101 | 129 | |
|---|
| 102 | 130 | /***************************************************************************** |
|---|
| 103 | 131 | * SECTION: Type Definitions |
|---|
| .. | .. |
|---|
| 116 | 144 | __u16 head; |
|---|
| 117 | 145 | } __attribute__ ((packed)); |
|---|
| 118 | 146 | |
|---|
| 119 | | -struct chs_t { |
|---|
| 120 | | - __u16 cyl; |
|---|
| 121 | | - __u16 head; |
|---|
| 122 | | - __u32 sector; |
|---|
| 123 | | -} __attribute__ ((packed)); |
|---|
| 124 | | - |
|---|
| 125 | 147 | struct chr_t { |
|---|
| 126 | 148 | __u16 cyl; |
|---|
| 127 | 149 | __u16 head; |
|---|
| 128 | 150 | __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]; |
|---|
| 146 | 151 | } __attribute__ ((packed)); |
|---|
| 147 | 152 | |
|---|
| 148 | 153 | struct DE_eckd_data { |
|---|
| .. | .. |
|---|
| 215 | 220 | __u8 imbedded_count; |
|---|
| 216 | 221 | __u8 extended_operation; |
|---|
| 217 | 222 | __u16 extended_parameter_length; |
|---|
| 218 | | - __u8 extended_parameter[0]; |
|---|
| 223 | + __u8 extended_parameter[]; |
|---|
| 219 | 224 | } __attribute__ ((packed)); |
|---|
| 220 | 225 | |
|---|
| 221 | 226 | /* Prefix data for format 0x00 and 0x01 */ |
|---|
| .. | .. |
|---|
| 387 | 392 | char messages[4087]; |
|---|
| 388 | 393 | } __packed; |
|---|
| 389 | 394 | |
|---|
| 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 | + |
|---|
| 390 | 475 | struct dasd_cuir_message { |
|---|
| 391 | 476 | __u16 length; |
|---|
| 392 | 477 | __u8 format; |
|---|
| .. | .. |
|---|
| 460 | 545 | unsigned char suborder; |
|---|
| 461 | 546 | unsigned char reserved[59]; |
|---|
| 462 | 547 | } __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; |
|---|
| 463 | 584 | |
|---|
| 464 | 585 | |
|---|
| 465 | 586 | /* |
|---|
| .. | .. |
|---|
| 551 | 672 | int uses_cdl; |
|---|
| 552 | 673 | struct attrib_data_t attrib; /* e.g. cache operations */ |
|---|
| 553 | 674 | struct dasd_rssd_features features; |
|---|
| 675 | + struct dasd_rssd_vsq vsq; |
|---|
| 676 | + struct dasd_ext_pool_sum eps; |
|---|
| 554 | 677 | u32 real_cyl; |
|---|
| 555 | 678 | |
|---|
| 556 | 679 | /* alias managemnet */ |
|---|
| .. | .. |
|---|
| 572 | 695 | struct dasd_device *dasd_alias_get_start_dev(struct dasd_device *); |
|---|
| 573 | 696 | void dasd_alias_handle_summary_unit_check(struct work_struct *); |
|---|
| 574 | 697 | 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 *); |
|---|
| 577 | 698 | int dasd_alias_update_add_device(struct dasd_device *); |
|---|
| 578 | 699 | #endif /* DASD_ECKD_H */ |
|---|