summaryrefslogtreecommitdiff
path: root/drivers/s390/cio/orb.h
blob: 14d2a1822b50600396193f02426ab87e36135b0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Orb related data structures.
 *
 * Copyright IBM Corp. 2007, 2011
 *
 * Author(s): Cornelia Huck <cornelia.huck@de.ibm.com>
 *	      Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
 *	      Sebastian Ott <sebott@linux.vnet.ibm.com>
 */

#ifndef S390_ORB_H
#define S390_ORB_H

#include <linux/types.h>
#include <asm/dma-types.h>

/*
 * Command-mode operation request block
 */
struct cmd_orb {
	u32 intparm;	/* interruption parameter */
	u32 key:4;	/* flags, like key, suspend control, etc. */
	u32 spnd:1;	/* suspend control */
	u32 res1:1;	/* reserved */
	u32 mod:1;	/* modification control */
	u32 sync:1;	/* synchronize control */
	u32 fmt:1;	/* format control */
	u32 pfch:1;	/* prefetch control */
	u32 isic:1;	/* initial-status-interruption control */
	u32 alcc:1;	/* address-limit-checking control */
	u32 ssic:1;	/* suppress-suspended-interr. control */
	u32 res2:1;	/* reserved */
	u32 c64:1;	/* IDAW/QDIO 64 bit control  */
	u32 i2k:1;	/* IDAW 2/4kB block size control */
	u32 lpm:8;	/* logical path mask */
	u32 ils:1;	/* incorrect length */
	u32 zero:6;	/* reserved zeros */
	u32 orbx:1;	/* ORB extension control */
	dma32_t cpa;	/* channel program address */
}  __packed __aligned(4);

/*
 * Transport-mode operation request block
 */
struct tm_orb {
	u32 intparm;
	u32 key:4;
	u32:9;
	u32 b:1;
	u32:2;
	u32 lpm:8;
	u32:7;
	u32 x:1;
	dma32_t tcw;
	u32 prio:8;
	u32:8;
	u32 rsvpgm:8;
	u32:8;
	u32:32;
	u32:32;
	u32:32;
	u32:32;
}  __packed __aligned(4);

/*
 * eadm operation request block
 */
struct eadm_orb {
	u32 intparm;
	u32 key:4;
	u32:4;
	u32 compat1:1;
	u32 compat2:1;
	u32:21;
	u32 x:1;
	dma32_t aob;
	u32 css_prio:8;
	u32:8;
	u32 scm_prio:8;
	u32:8;
	u32:29;
	u32 fmt:3;
	u32:32;
	u32:32;
	u32:32;
}  __packed __aligned(4);

union orb {
	struct cmd_orb cmd;
	struct tm_orb tm;
	struct eadm_orb eadm;
}  __packed __aligned(4);

#endif /* S390_ORB_H */