2 * drivers/s390/char/sclp_rw.h
3 * interface to the SCLP-read/write driver
6 * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
7 * Author(s): Martin Peschke <mpeschke@de.ibm.com>
8 * Martin Schwidefsky <schwidefsky@de.ibm.com>
14 #include <linux/list.h>
15 #include <linux/timer.h>
23 } __attribute__((packed
));
34 u16 general_msg_flags
;
36 u8 originating_system_name
[8];
38 } __attribute__((packed
));
45 } __attribute__((packed
));
48 struct mdb_header header
;
50 } __attribute__((packed
));
53 struct evbuf_header header
;
55 } __attribute__((packed
));
58 struct sccb_header header
;
59 struct msg_buf msg_buf
;
60 } __attribute__((packed
));
62 /* The number of empty mto buffers that can be contained in a single sccb. */
63 #define NR_EMPTY_MTO_PER_SCCB ((PAGE_SIZE - sizeof(struct sclp_buffer) - \
64 sizeof(struct write_sccb)) / sizeof(struct mto))
67 * data structure for information about list of SCCBs (only for writing),
68 * will be located at the end of a SCCBs page
71 struct list_head list
; /* list_head for sccb_info chain */
72 struct sclp_req request
;
73 struct write_sccb
*sccb
;
77 struct timer_list retry_timer
;
78 /* output format settings */
79 unsigned short columns
;
81 /* statistics about this buffer */
82 unsigned int mto_char_sum
; /* # chars in sccb */
83 unsigned int mto_number
; /* # mtos in sccb */
84 /* Callback that is called after reaching final status. */
85 void (*callback
)(struct sclp_buffer
*, int);
88 int sclp_rw_init(void);
89 struct sclp_buffer
*sclp_make_buffer(void *, unsigned short, unsigned short);
90 void *sclp_unmake_buffer(struct sclp_buffer
*);
91 int sclp_buffer_space(struct sclp_buffer
*);
92 int sclp_write(struct sclp_buffer
*buffer
, const unsigned char *, int);
93 void sclp_emit_buffer(struct sclp_buffer
*,void (*)(struct sclp_buffer
*,int));
94 void sclp_set_columns(struct sclp_buffer
*, unsigned short);
95 void sclp_set_htab(struct sclp_buffer
*, unsigned short);
96 int sclp_chars_in_buffer(struct sclp_buffer
*);
98 #endif /* __SCLP_RW_H__ */