diff options
Diffstat (limited to 'drivers/s390/block/dasd_int.h')
-rw-r--r-- | drivers/s390/block/dasd_int.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/drivers/s390/block/dasd_int.h b/drivers/s390/block/dasd_int.h index 6d7fa30fa0b8..4293ba827523 100644 --- a/drivers/s390/block/dasd_int.h +++ b/drivers/s390/block/dasd_int.h | |||
@@ -268,6 +268,23 @@ struct dasd_discipline { | |||
268 | 268 | ||
269 | extern struct dasd_discipline *dasd_diag_discipline_pointer; | 269 | extern struct dasd_discipline *dasd_diag_discipline_pointer; |
270 | 270 | ||
271 | |||
272 | /* | ||
273 | * Notification numbers for extended error reporting notifications: | ||
274 | * The DASD_EER_DISABLE notification is sent before a dasd_device (and it's | ||
275 | * eer pointer) is freed. The error reporting module needs to do all necessary | ||
276 | * cleanup steps. | ||
277 | * The DASD_EER_TRIGGER notification sends the actual error reports (triggers). | ||
278 | */ | ||
279 | #define DASD_EER_DISABLE 0 | ||
280 | #define DASD_EER_TRIGGER 1 | ||
281 | |||
282 | /* Trigger IDs for extended error reporting DASD_EER_TRIGGER notification */ | ||
283 | #define DASD_EER_FATALERROR 1 | ||
284 | #define DASD_EER_NOPATH 2 | ||
285 | #define DASD_EER_STATECHANGE 3 | ||
286 | #define DASD_EER_PPRCSUSPEND 4 | ||
287 | |||
271 | struct dasd_device { | 288 | struct dasd_device { |
272 | /* Block device stuff. */ | 289 | /* Block device stuff. */ |
273 | struct gendisk *gdp; | 290 | struct gendisk *gdp; |
@@ -281,6 +298,9 @@ struct dasd_device { | |||
281 | unsigned long flags; /* per device flags */ | 298 | unsigned long flags; /* per device flags */ |
282 | unsigned short features; /* copy of devmap-features (read-only!) */ | 299 | unsigned short features; /* copy of devmap-features (read-only!) */ |
283 | 300 | ||
301 | /* extended error reporting stuff (eer) */ | ||
302 | struct dasd_ccw_req *eer_cqr; | ||
303 | |||
284 | /* Device discipline stuff. */ | 304 | /* Device discipline stuff. */ |
285 | struct dasd_discipline *discipline; | 305 | struct dasd_discipline *discipline; |
286 | struct dasd_discipline *base_discipline; | 306 | struct dasd_discipline *base_discipline; |
@@ -326,6 +346,8 @@ struct dasd_device { | |||
326 | /* per device flags */ | 346 | /* per device flags */ |
327 | #define DASD_FLAG_DSC_ERROR 2 /* return -EIO when disconnected */ | 347 | #define DASD_FLAG_DSC_ERROR 2 /* return -EIO when disconnected */ |
328 | #define DASD_FLAG_OFFLINE 3 /* device is in offline processing */ | 348 | #define DASD_FLAG_OFFLINE 3 /* device is in offline processing */ |
349 | #define DASD_FLAG_EER_SNSS 4 /* A SNSS is required */ | ||
350 | #define DASD_FLAG_EER_IN_USE 5 /* A SNSS request is running */ | ||
329 | 351 | ||
330 | void dasd_put_device_wake(struct dasd_device *); | 352 | void dasd_put_device_wake(struct dasd_device *); |
331 | 353 | ||
@@ -545,6 +567,30 @@ dasd_era_t dasd_9336_erp_examine(struct dasd_ccw_req *, struct irb *); | |||
545 | dasd_era_t dasd_9343_erp_examine(struct dasd_ccw_req *, struct irb *); | 567 | dasd_era_t dasd_9343_erp_examine(struct dasd_ccw_req *, struct irb *); |
546 | struct dasd_ccw_req *dasd_9343_erp_action(struct dasd_ccw_req *); | 568 | struct dasd_ccw_req *dasd_9343_erp_action(struct dasd_ccw_req *); |
547 | 569 | ||
570 | /* externals in dasd_eer.c */ | ||
571 | #ifdef CONFIG_DASD_EER | ||
572 | int dasd_eer_init(void); | ||
573 | void dasd_eer_exit(void); | ||
574 | int dasd_eer_enable(struct dasd_device *); | ||
575 | void dasd_eer_disable(struct dasd_device *); | ||
576 | void dasd_eer_write(struct dasd_device *, struct dasd_ccw_req *cqr, | ||
577 | unsigned int id); | ||
578 | void dasd_eer_snss(struct dasd_device *); | ||
579 | |||
580 | static inline int dasd_eer_enabled(struct dasd_device *device) | ||
581 | { | ||
582 | return device->eer_cqr != NULL; | ||
583 | } | ||
584 | #else | ||
585 | #define dasd_eer_init() (0) | ||
586 | #define dasd_eer_exit() do { } while (0) | ||
587 | #define dasd_eer_enable(d) (0) | ||
588 | #define dasd_eer_disable(d) do { } while (0) | ||
589 | #define dasd_eer_write(d,c,i) do { } while (0) | ||
590 | #define dasd_eer_snss(d) do { } while (0) | ||
591 | #define dasd_eer_enabled(d) (0) | ||
592 | #endif /* CONFIG_DASD_ERR */ | ||
593 | |||
548 | #endif /* __KERNEL__ */ | 594 | #endif /* __KERNEL__ */ |
549 | 595 | ||
550 | #endif /* DASD_H */ | 596 | #endif /* DASD_H */ |