dasd_int.h (82814dbafdeef53e13e07134eb3b7be3c975fd21) dasd_int.h (20c644680af1ef9a6b36c0873f59498c98b07ab1)
1/*
2 * File...........: linux/drivers/s390/block/dasd_int.h
3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
4 * Horst Hummel <Horst.Hummel@de.ibm.com>
5 * Martin Schwidefsky <schwidefsky@de.ibm.com>
6 * Bugreports.to..: <Linux390@de.ibm.com>
7 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000
8 *

--- 254 unchanged lines hidden (view full) ---

263 /* i/o control functions. */
264 int (*fill_geometry) (struct dasd_device *, struct hd_geometry *);
265 int (*fill_info) (struct dasd_device *, struct dasd_information2_t *);
266 int (*ioctl) (struct dasd_device *, unsigned int, void __user *);
267};
268
269extern struct dasd_discipline *dasd_diag_discipline_pointer;
270
1/*
2 * File...........: linux/drivers/s390/block/dasd_int.h
3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
4 * Horst Hummel <Horst.Hummel@de.ibm.com>
5 * Martin Schwidefsky <schwidefsky@de.ibm.com>
6 * Bugreports.to..: <Linux390@de.ibm.com>
7 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000
8 *

--- 254 unchanged lines hidden (view full) ---

263 /* i/o control functions. */
264 int (*fill_geometry) (struct dasd_device *, struct hd_geometry *);
265 int (*fill_info) (struct dasd_device *, struct dasd_information2_t *);
266 int (*ioctl) (struct dasd_device *, unsigned int, void __user *);
267};
268
269extern struct dasd_discipline *dasd_diag_discipline_pointer;
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
271struct dasd_device {
272 /* Block device stuff. */
273 struct gendisk *gdp;
274 request_queue_t *request_queue;
275 spinlock_t request_queue_lock;
276 struct block_device *bdev;
277 unsigned int devindex;
278 unsigned long blocks; /* size of volume in blocks */
279 unsigned int bp_block; /* bytes per block */
280 unsigned int s2b_shift; /* log2 (bp_block/512) */
281 unsigned long flags; /* per device flags */
282 unsigned short features; /* copy of devmap-features (read-only!) */
283
288struct dasd_device {
289 /* Block device stuff. */
290 struct gendisk *gdp;
291 request_queue_t *request_queue;
292 spinlock_t request_queue_lock;
293 struct block_device *bdev;
294 unsigned int devindex;
295 unsigned long blocks; /* size of volume in blocks */
296 unsigned int bp_block; /* bytes per block */
297 unsigned int s2b_shift; /* log2 (bp_block/512) */
298 unsigned long flags; /* per device flags */
299 unsigned short features; /* copy of devmap-features (read-only!) */
300
301 /* extended error reporting stuff (eer) */
302 struct dasd_ccw_req *eer_cqr;
303
284 /* Device discipline stuff. */
285 struct dasd_discipline *discipline;
286 struct dasd_discipline *base_discipline;
287 char *private;
288
289 /* Device state and target state. */
290 int state, target;
291 int stopped; /* device (ccw_device_start) was stopped */

--- 29 unchanged lines hidden (view full) ---

321#define DASD_STOPPED_QUIESCE 2 /* Quiesced */
322#define DASD_STOPPED_PENDING 4 /* long busy */
323#define DASD_STOPPED_DC_WAIT 8 /* disconnected, wait */
324#define DASD_STOPPED_DC_EIO 16 /* disconnected, return -EIO */
325
326/* per device flags */
327#define DASD_FLAG_DSC_ERROR 2 /* return -EIO when disconnected */
328#define DASD_FLAG_OFFLINE 3 /* device is in offline processing */
304 /* Device discipline stuff. */
305 struct dasd_discipline *discipline;
306 struct dasd_discipline *base_discipline;
307 char *private;
308
309 /* Device state and target state. */
310 int state, target;
311 int stopped; /* device (ccw_device_start) was stopped */

--- 29 unchanged lines hidden (view full) ---

341#define DASD_STOPPED_QUIESCE 2 /* Quiesced */
342#define DASD_STOPPED_PENDING 4 /* long busy */
343#define DASD_STOPPED_DC_WAIT 8 /* disconnected, wait */
344#define DASD_STOPPED_DC_EIO 16 /* disconnected, return -EIO */
345
346/* per device flags */
347#define DASD_FLAG_DSC_ERROR 2 /* return -EIO when disconnected */
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
330void dasd_put_device_wake(struct dasd_device *);
331
332/*
333 * Reference count inliners
334 */
335static inline void
336dasd_get_device(struct dasd_device *device)

--- 203 unchanged lines hidden (view full) ---

540
541/* externals in dasd_9336_erp.c */
542dasd_era_t dasd_9336_erp_examine(struct dasd_ccw_req *, struct irb *);
543
544/* externals in dasd_9336_erp.c */
545dasd_era_t dasd_9343_erp_examine(struct dasd_ccw_req *, struct irb *);
546struct dasd_ccw_req *dasd_9343_erp_action(struct dasd_ccw_req *);
547
351
352void dasd_put_device_wake(struct dasd_device *);
353
354/*
355 * Reference count inliners
356 */
357static inline void
358dasd_get_device(struct dasd_device *device)

--- 203 unchanged lines hidden (view full) ---

562
563/* externals in dasd_9336_erp.c */
564dasd_era_t dasd_9336_erp_examine(struct dasd_ccw_req *, struct irb *);
565
566/* externals in dasd_9336_erp.c */
567dasd_era_t dasd_9343_erp_examine(struct dasd_ccw_req *, struct irb *);
568struct dasd_ccw_req *dasd_9343_erp_action(struct dasd_ccw_req *);
569
570/* externals in dasd_eer.c */
571#ifdef CONFIG_DASD_EER
572int dasd_eer_init(void);
573void dasd_eer_exit(void);
574int dasd_eer_enable(struct dasd_device *);
575void dasd_eer_disable(struct dasd_device *);
576void dasd_eer_write(struct dasd_device *, struct dasd_ccw_req *cqr,
577 unsigned int id);
578void dasd_eer_snss(struct dasd_device *);
579
580static 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__ */
549
550#endif /* DASD_H */
551
552/*
553 * Overrides for Emacs so that we follow Linus's tabbing style.
554 * Emacs will notice this stuff at the end of the file and automatically
555 * adjust the settings for this buffer only. This must remain at the end

--- 14 unchanged lines hidden ---
594#endif /* __KERNEL__ */
595
596#endif /* DASD_H */
597
598/*
599 * Overrides for Emacs so that we follow Linus's tabbing style.
600 * Emacs will notice this stuff at the end of the file and automatically
601 * adjust the settings for this buffer only. This must remain at the end

--- 14 unchanged lines hidden ---