11 #include <linux/types.h>
13 #include <linux/string.h>
15 #include <linux/ctype.h>
16 #include <asm/uaccess.h>
26 #define MAX_SCCB_ROOM (PAGE_SIZE - sizeof(struct sclp_buffer))
37 .pm_event_fn = sclp_rw_pm_event,
72 sccb->
msg_buf.mdb.header.length =
sizeof(
struct mdb);
73 sccb->
msg_buf.mdb.header.type = 1;
74 sccb->
msg_buf.mdb.header.tag = 0xD4C4C240;
75 sccb->
msg_buf.mdb.header.revision_code = 1;
76 sccb->
msg_buf.mdb.go.length =
sizeof(
struct go);
104 mto_size =
sizeof(
struct mto) + max_len;
112 mto = (
struct mto *)(((
addr_t) sccb) + sccb->header.length);
118 memset(mto, 0,
sizeof(
struct mto));
119 mto->
length =
sizeof(
struct mto);
139 int str_len, mto_size;
146 mto_size =
sizeof(
struct mto) + str_len;
150 mto = (
struct mto *)(((
addr_t) sccb) + sccb->header.length);
159 sccb->header.length += mto_size;
160 sccb->msg_buf.header.length += mto_size;
161 sccb->msg_buf.mdb.header.length += mto_size;
208 for (i_msg = 0; i_msg <
count; i_msg++) {
209 switch (msg[i_msg]) {
213 rc = sclp_initialize_mto(buffer, 0);
217 sclp_finalize_mto(buffer);
221 buffer->
sccb->msg_buf.mdb.go.general_msg_flags |=
227 rc = sclp_initialize_mto(buffer,
247 sclp_finalize_mto(buffer);
248 rc = sclp_initialize_mto(buffer,
257 rc = sclp_initialize_mto(buffer,
261 sclp_finalize_mto(buffer);
277 sclp_finalize_mto(buffer);
287 rc = sclp_initialize_mto(buffer,
299 sclp_finalize_mto(buffer);
316 count -=
sizeof(
struct mto) + buffer->current_length;
343 sclp_finalize_mto(buffer);
358 static int init_done = 0;
370 #define SCLP_BUFFER_MAX_RETRY 1
392 switch (sccb->
header.response_code) {
406 sccb->
header.response_code = 0x0000;
422 sccb->
header.response_code = 0x0000;
429 if (sccb->
header.response_code == 0x71f0)
452 sclp_finalize_mto(buffer);
469 buffer->
request.callback = sclp_writedata_callback;