diff options
author | Stefan Weinhuber <wein@de.ibm.com> | 2011-01-05 06:48:03 -0500 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2011-01-05 06:47:30 -0500 |
commit | a4d26c6aeceea330ee5e0fb6b017d57e3b252d29 (patch) | |
tree | eed358de48ff28e4fba73d9925abafa2699a7b6c /drivers/s390/block/dasd_int.h | |
parent | ef19298b406f93af4bb249f0776deb8366e97532 (diff) |
[S390] dasd: do path verification for paths added at runtime
When a new path is added at runtime, the CIO layer will call the drivers
path_event callback. The DASD device driver uses this callback to trigger
a path verification for the new path. The driver will use only those
paths for I/O, which have been successfully verified.
Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block/dasd_int.h')
-rw-r--r-- | drivers/s390/block/dasd_int.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/s390/block/dasd_int.h b/drivers/s390/block/dasd_int.h index 500678d7116c..ba038ef57606 100644 --- a/drivers/s390/block/dasd_int.h +++ b/drivers/s390/block/dasd_int.h | |||
@@ -231,6 +231,7 @@ struct dasd_ccw_req { | |||
231 | /* per dasd_ccw_req flags */ | 231 | /* per dasd_ccw_req flags */ |
232 | #define DASD_CQR_FLAGS_USE_ERP 0 /* use ERP for this request */ | 232 | #define DASD_CQR_FLAGS_USE_ERP 0 /* use ERP for this request */ |
233 | #define DASD_CQR_FLAGS_FAILFAST 1 /* FAILFAST */ | 233 | #define DASD_CQR_FLAGS_FAILFAST 1 /* FAILFAST */ |
234 | #define DASD_CQR_VERIFY_PATH 2 /* path verification request */ | ||
234 | 235 | ||
235 | /* Signature for error recovery functions. */ | 236 | /* Signature for error recovery functions. */ |
236 | typedef struct dasd_ccw_req *(*dasd_erp_fn_t) (struct dasd_ccw_req *); | 237 | typedef struct dasd_ccw_req *(*dasd_erp_fn_t) (struct dasd_ccw_req *); |
@@ -287,6 +288,14 @@ struct dasd_discipline { | |||
287 | int (*do_analysis) (struct dasd_block *); | 288 | int (*do_analysis) (struct dasd_block *); |
288 | 289 | ||
289 | /* | 290 | /* |
291 | * This function is called, when new paths become available. | ||
292 | * Disciplins may use this callback to do necessary setup work, | ||
293 | * e.g. verify that new path is compatible with the current | ||
294 | * configuration. | ||
295 | */ | ||
296 | int (*verify_path)(struct dasd_device *, __u8); | ||
297 | |||
298 | /* | ||
290 | * Last things to do when a device is set online, and first things | 299 | * Last things to do when a device is set online, and first things |
291 | * when it is set offline. | 300 | * when it is set offline. |
292 | */ | 301 | */ |
@@ -362,6 +371,13 @@ extern struct dasd_discipline *dasd_diag_discipline_pointer; | |||
362 | #define DASD_EER_STATECHANGE 3 | 371 | #define DASD_EER_STATECHANGE 3 |
363 | #define DASD_EER_PPRCSUSPEND 4 | 372 | #define DASD_EER_PPRCSUSPEND 4 |
364 | 373 | ||
374 | struct dasd_path { | ||
375 | __u8 opm; | ||
376 | __u8 tbvpm; | ||
377 | __u8 ppm; | ||
378 | __u8 npm; | ||
379 | }; | ||
380 | |||
365 | struct dasd_device { | 381 | struct dasd_device { |
366 | /* Block device stuff. */ | 382 | /* Block device stuff. */ |
367 | struct dasd_block *block; | 383 | struct dasd_block *block; |
@@ -377,6 +393,7 @@ struct dasd_device { | |||
377 | struct dasd_discipline *discipline; | 393 | struct dasd_discipline *discipline; |
378 | struct dasd_discipline *base_discipline; | 394 | struct dasd_discipline *base_discipline; |
379 | char *private; | 395 | char *private; |
396 | struct dasd_path path_data; | ||
380 | 397 | ||
381 | /* Device state and target state. */ | 398 | /* Device state and target state. */ |
382 | int state, target; | 399 | int state, target; |
@@ -620,10 +637,15 @@ void dasd_generic_remove (struct ccw_device *cdev); | |||
620 | int dasd_generic_set_online(struct ccw_device *, struct dasd_discipline *); | 637 | int dasd_generic_set_online(struct ccw_device *, struct dasd_discipline *); |
621 | int dasd_generic_set_offline (struct ccw_device *cdev); | 638 | int dasd_generic_set_offline (struct ccw_device *cdev); |
622 | int dasd_generic_notify(struct ccw_device *, int); | 639 | int dasd_generic_notify(struct ccw_device *, int); |
640 | int dasd_generic_last_path_gone(struct dasd_device *); | ||
641 | int dasd_generic_path_operational(struct dasd_device *); | ||
642 | |||
623 | void dasd_generic_handle_state_change(struct dasd_device *); | 643 | void dasd_generic_handle_state_change(struct dasd_device *); |
624 | int dasd_generic_pm_freeze(struct ccw_device *); | 644 | int dasd_generic_pm_freeze(struct ccw_device *); |
625 | int dasd_generic_restore_device(struct ccw_device *); | 645 | int dasd_generic_restore_device(struct ccw_device *); |
626 | enum uc_todo dasd_generic_uc_handler(struct ccw_device *, struct irb *); | 646 | enum uc_todo dasd_generic_uc_handler(struct ccw_device *, struct irb *); |
647 | void dasd_generic_path_event(struct ccw_device *, int *); | ||
648 | int dasd_generic_verify_path(struct dasd_device *, __u8); | ||
627 | 649 | ||
628 | int dasd_generic_read_dev_chars(struct dasd_device *, int, void *, int); | 650 | int dasd_generic_read_dev_chars(struct dasd_device *, int, void *, int); |
629 | char *dasd_get_sense(struct irb *); | 651 | char *dasd_get_sense(struct irb *); |