2 * interface to the SCLP-read/write driver
4 * Copyright IBM Corporation 1999, 2009
6 * Author(s): Martin Peschke <mpeschke@de.ibm.com>
7 * Martin Schwidefsky <schwidefsky@de.ibm.com>
13 #include <linux/list.h>
21 } __attribute__((packed
));
32 u16 general_msg_flags
;
34 u8 originating_system_name
[8];
36 } __attribute__((packed
));
43 } __attribute__((packed
));
46 struct mdb_header header
;
49 } __attribute__((packed
));
52 struct evbuf_header header
;
54 } __attribute__((packed
));
56 /* The number of empty mto buffers that can be contained in a single sccb. */
57 #define NR_EMPTY_MSG_PER_SCCB ((PAGE_SIZE - sizeof(struct sclp_buffer) - \
58 sizeof(struct sccb_header)) / sizeof(struct msg_buf))
61 * data structure for information about list of SCCBs (only for writing),
62 * will be located at the end of a SCCBs page
65 struct list_head list
; /* list_head for sccb_info chain */
66 struct sclp_req request
;
68 struct msg_buf
*current_msg
;
72 /* output format settings */
73 unsigned short columns
;
75 /* statistics about this buffer */
76 unsigned int char_sum
; /* # chars in sccb */
77 unsigned int messages
; /* # messages in sccb */
78 /* Callback that is called after reaching final status. */
79 void (*callback
)(struct sclp_buffer
*, int);
82 int sclp_rw_init(void);
83 struct sclp_buffer
*sclp_make_buffer(void *, unsigned short, unsigned short);
84 void *sclp_unmake_buffer(struct sclp_buffer
*);
85 int sclp_buffer_space(struct sclp_buffer
*);
86 int sclp_write(struct sclp_buffer
*buffer
, const unsigned char *, int);
87 int sclp_emit_buffer(struct sclp_buffer
*,void (*)(struct sclp_buffer
*,int));
88 void sclp_set_columns(struct sclp_buffer
*, unsigned short);
89 void sclp_set_htab(struct sclp_buffer
*, unsigned short);
90 int sclp_chars_in_buffer(struct sclp_buffer
*);
92 #ifdef CONFIG_SCLP_CONSOLE
93 void sclp_console_pm_event(enum sclp_pm_event sclp_pm_event
);
95 static inline void sclp_console_pm_event(enum sclp_pm_event sclp_pm_event
) { }
98 #endif /* __SCLP_RW_H__ */