aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/sclp_diag.h
diff options
context:
space:
mode:
authorRalf Hoppe <rhoppe@de.ibm.com>2013-04-08 03:52:57 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2014-09-25 04:52:02 -0400
commit8f933b1043e1e51f4776fc1ffe86752c7785fd4e (patch)
tree9549e4659cd027279b213bab4e735e1ccd5b15d7 /drivers/s390/char/sclp_diag.h
parentea61a579ab87f1620b14777afc32cf3827f07bc8 (diff)
s390/hmcdrv: HMC drive CD/DVD access
This device driver allows accessing a HMC drive CD/DVD-ROM. It can be used in a LPAR and z/VM environment. Reviewed-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Ralf Hoppe <rhoppe@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/char/sclp_diag.h')
-rw-r--r--drivers/s390/char/sclp_diag.h89
1 files changed, 89 insertions, 0 deletions
diff --git a/drivers/s390/char/sclp_diag.h b/drivers/s390/char/sclp_diag.h
new file mode 100644
index 000000000000..59c4afa5e670
--- /dev/null
+++ b/drivers/s390/char/sclp_diag.h
@@ -0,0 +1,89 @@
1/*
2 * Copyright IBM Corp. 2013
3 * Author(s): Ralf Hoppe (rhoppe@de.ibm.com)
4 */
5
6#ifndef _SCLP_DIAG_H
7#define _SCLP_DIAG_H
8
9#include <linux/types.h>
10
11/* return codes for Diagnostic Test FTP Service, as indicated in member
12 * sclp_diag_ftp::ldflg
13 */
14#define SCLP_DIAG_FTP_OK 0x80U /* success */
15#define SCLP_DIAG_FTP_LDFAIL 0x01U /* load failed */
16#define SCLP_DIAG_FTP_LDNPERM 0x02U /* not allowed */
17#define SCLP_DIAG_FTP_LDRUNS 0x03U /* LD runs */
18#define SCLP_DIAG_FTP_LDNRUNS 0x04U /* LD does not run */
19
20#define SCLP_DIAG_FTP_XPCX 0x80 /* PCX communication code */
21#define SCLP_DIAG_FTP_ROUTE 4 /* routing code for new FTP service */
22
23/*
24 * length of Diagnostic Test FTP Service event buffer
25 */
26#define SCLP_DIAG_FTP_EVBUF_LEN \
27 (offsetof(struct sclp_diag_evbuf, mdd) + \
28 sizeof(struct sclp_diag_ftp))
29
30/**
31 * struct sclp_diag_ftp - Diagnostic Test FTP Service model-dependent data
32 * @pcx: code for PCX communication (should be 0x80)
33 * @ldflg: load flag (see defines above)
34 * @cmd: FTP command
35 * @pgsize: page size (0 = 4kB, 1 = large page size)
36 * @srcflg: source flag
37 * @spare: reserved (zeroes)
38 * @offset: file offset
39 * @fsize: file size
40 * @length: buffer size resp. bytes transferred
41 * @failaddr: failing address
42 * @bufaddr: buffer address, virtual
43 * @asce: region or segment table designation
44 * @fident: file name (ASCII, zero-terminated)
45 */
46struct sclp_diag_ftp {
47 u8 pcx;
48 u8 ldflg;
49 u8 cmd;
50 u8 pgsize;
51 u8 srcflg;
52 u8 spare;
53 u64 offset;
54 u64 fsize;
55 u64 length;
56 u64 failaddr;
57 u64 bufaddr;
58 u64 asce;
59
60 u8 fident[256];
61} __packed;
62
63/**
64 * struct sclp_diag_evbuf - Diagnostic Test (ET7) Event Buffer
65 * @hdr: event buffer header
66 * @route: diagnostic route
67 * @mdd: model-dependent data (@route dependent)
68 */
69struct sclp_diag_evbuf {
70 struct evbuf_header hdr;
71 u16 route;
72
73 union {
74 struct sclp_diag_ftp ftp;
75 } mdd;
76} __packed;
77
78/**
79 * struct sclp_diag_sccb - Diagnostic Test (ET7) SCCB
80 * @hdr: SCCB header
81 * @evbuf: event buffer
82 */
83struct sclp_diag_sccb {
84
85 struct sccb_header hdr;
86 struct sclp_diag_evbuf evbuf;
87} __packed;
88
89#endif /* _SCLP_DIAG_H */