diff options
Diffstat (limited to 'drivers/s390/block/dasd_eckd.h')
-rw-r--r-- | drivers/s390/block/dasd_eckd.h | 125 |
1 files changed, 124 insertions, 1 deletions
diff --git a/drivers/s390/block/dasd_eckd.h b/drivers/s390/block/dasd_eckd.h index 712ff1650134..fc2509c939bc 100644 --- a/drivers/s390/block/dasd_eckd.h +++ b/drivers/s390/block/dasd_eckd.h | |||
@@ -39,6 +39,8 @@ | |||
39 | #define DASD_ECKD_CCW_READ_CKD_MT 0x9e | 39 | #define DASD_ECKD_CCW_READ_CKD_MT 0x9e |
40 | #define DASD_ECKD_CCW_WRITE_CKD_MT 0x9d | 40 | #define DASD_ECKD_CCW_WRITE_CKD_MT 0x9d |
41 | #define DASD_ECKD_CCW_RESERVE 0xB4 | 41 | #define DASD_ECKD_CCW_RESERVE 0xB4 |
42 | #define DASD_ECKD_CCW_PFX 0xE7 | ||
43 | #define DASD_ECKD_CCW_RSCK 0xF9 | ||
42 | 44 | ||
43 | /* | 45 | /* |
44 | * Perform Subsystem Function / Sub-Orders | 46 | * Perform Subsystem Function / Sub-Orders |
@@ -137,6 +139,25 @@ struct LO_eckd_data { | |||
137 | __u16 length; | 139 | __u16 length; |
138 | } __attribute__ ((packed)); | 140 | } __attribute__ ((packed)); |
139 | 141 | ||
142 | /* Prefix data for format 0x00 and 0x01 */ | ||
143 | struct PFX_eckd_data { | ||
144 | unsigned char format; | ||
145 | struct { | ||
146 | unsigned char define_extend:1; | ||
147 | unsigned char time_stamp:1; | ||
148 | unsigned char verify_base:1; | ||
149 | unsigned char hyper_pav:1; | ||
150 | unsigned char reserved:4; | ||
151 | } __attribute__ ((packed)) validity; | ||
152 | __u8 base_address; | ||
153 | __u8 aux; | ||
154 | __u8 base_lss; | ||
155 | __u8 reserved[7]; | ||
156 | struct DE_eckd_data define_extend; | ||
157 | struct LO_eckd_data locate_record; | ||
158 | __u8 LO_extended_data[4]; | ||
159 | } __attribute__ ((packed)); | ||
160 | |||
140 | struct dasd_eckd_characteristics { | 161 | struct dasd_eckd_characteristics { |
141 | __u16 cu_type; | 162 | __u16 cu_type; |
142 | struct { | 163 | struct { |
@@ -254,7 +275,9 @@ struct dasd_eckd_confdata { | |||
254 | } __attribute__ ((packed)) ned; | 275 | } __attribute__ ((packed)) ned; |
255 | struct { | 276 | struct { |
256 | unsigned char flags; /* byte 0 */ | 277 | unsigned char flags; /* byte 0 */ |
257 | unsigned char res2[7]; /* byte 1- 7 */ | 278 | unsigned char res1; /* byte 1 */ |
279 | __u16 format; /* byte 2-3 */ | ||
280 | unsigned char res2[4]; /* byte 4-7 */ | ||
258 | unsigned char sua_flags; /* byte 8 */ | 281 | unsigned char sua_flags; /* byte 8 */ |
259 | __u8 base_unit_addr; /* byte 9 */ | 282 | __u8 base_unit_addr; /* byte 9 */ |
260 | unsigned char res3[22]; /* byte 10-31 */ | 283 | unsigned char res3[22]; /* byte 10-31 */ |
@@ -343,6 +366,11 @@ struct dasd_eckd_path { | |||
343 | __u8 npm; | 366 | __u8 npm; |
344 | }; | 367 | }; |
345 | 368 | ||
369 | struct dasd_rssd_features { | ||
370 | char feature[256]; | ||
371 | } __attribute__((packed)); | ||
372 | |||
373 | |||
346 | /* | 374 | /* |
347 | * Perform Subsystem Function - Prepare for Read Subsystem Data | 375 | * Perform Subsystem Function - Prepare for Read Subsystem Data |
348 | */ | 376 | */ |
@@ -365,4 +393,99 @@ struct dasd_psf_ssc_data { | |||
365 | unsigned char reserved[59]; | 393 | unsigned char reserved[59]; |
366 | } __attribute__((packed)); | 394 | } __attribute__((packed)); |
367 | 395 | ||
396 | |||
397 | /* | ||
398 | * some structures and definitions for alias handling | ||
399 | */ | ||
400 | struct dasd_unit_address_configuration { | ||
401 | struct { | ||
402 | char ua_type; | ||
403 | char base_ua; | ||
404 | } unit[256]; | ||
405 | } __attribute__((packed)); | ||
406 | |||
407 | |||
408 | #define MAX_DEVICES_PER_LCU 256 | ||
409 | |||
410 | /* flags on the LCU */ | ||
411 | #define NEED_UAC_UPDATE 0x01 | ||
412 | #define UPDATE_PENDING 0x02 | ||
413 | |||
414 | enum pavtype {NO_PAV, BASE_PAV, HYPER_PAV}; | ||
415 | |||
416 | |||
417 | struct alias_root { | ||
418 | struct list_head serverlist; | ||
419 | spinlock_t lock; | ||
420 | }; | ||
421 | |||
422 | struct alias_server { | ||
423 | struct list_head server; | ||
424 | struct dasd_uid uid; | ||
425 | struct list_head lculist; | ||
426 | }; | ||
427 | |||
428 | struct summary_unit_check_work_data { | ||
429 | char reason; | ||
430 | struct dasd_device *device; | ||
431 | struct work_struct worker; | ||
432 | }; | ||
433 | |||
434 | struct read_uac_work_data { | ||
435 | struct dasd_device *device; | ||
436 | struct delayed_work dwork; | ||
437 | }; | ||
438 | |||
439 | struct alias_lcu { | ||
440 | struct list_head lcu; | ||
441 | struct dasd_uid uid; | ||
442 | enum pavtype pav; | ||
443 | char flags; | ||
444 | spinlock_t lock; | ||
445 | struct list_head grouplist; | ||
446 | struct list_head active_devices; | ||
447 | struct list_head inactive_devices; | ||
448 | struct dasd_unit_address_configuration *uac; | ||
449 | struct summary_unit_check_work_data suc_data; | ||
450 | struct read_uac_work_data ruac_data; | ||
451 | struct dasd_ccw_req *rsu_cqr; | ||
452 | }; | ||
453 | |||
454 | struct alias_pav_group { | ||
455 | struct list_head group; | ||
456 | struct dasd_uid uid; | ||
457 | struct alias_lcu *lcu; | ||
458 | struct list_head baselist; | ||
459 | struct list_head aliaslist; | ||
460 | struct dasd_device *next; | ||
461 | }; | ||
462 | |||
463 | |||
464 | struct dasd_eckd_private { | ||
465 | struct dasd_eckd_characteristics rdc_data; | ||
466 | struct dasd_eckd_confdata conf_data; | ||
467 | struct dasd_eckd_path path_data; | ||
468 | struct eckd_count count_area[5]; | ||
469 | int init_cqr_status; | ||
470 | int uses_cdl; | ||
471 | struct attrib_data_t attrib; /* e.g. cache operations */ | ||
472 | struct dasd_rssd_features features; | ||
473 | |||
474 | /* alias managemnet */ | ||
475 | struct dasd_uid uid; | ||
476 | struct alias_pav_group *pavgroup; | ||
477 | struct alias_lcu *lcu; | ||
478 | int count; | ||
479 | }; | ||
480 | |||
481 | |||
482 | |||
483 | int dasd_alias_make_device_known_to_lcu(struct dasd_device *); | ||
484 | void dasd_alias_disconnect_device_from_lcu(struct dasd_device *); | ||
485 | int dasd_alias_add_device(struct dasd_device *); | ||
486 | int dasd_alias_remove_device(struct dasd_device *); | ||
487 | struct dasd_device *dasd_alias_get_start_dev(struct dasd_device *); | ||
488 | void dasd_alias_handle_summary_unit_check(struct dasd_device *, struct irb *); | ||
489 | void dasd_eckd_reset_ccw_to_base_io(struct dasd_ccw_req *); | ||
490 | |||
368 | #endif /* DASD_ECKD_H */ | 491 | #endif /* DASD_ECKD_H */ |