Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390: add eadm related structures

Add structures to be used by the eadm subchannel driver.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

authored by

Sebastian Ott and committed by
Martin Schwidefsky
d2fc439b 382b7366

+159 -3
+27 -1
arch/s390/include/asm/cio.h
··· 80 80 } __attribute__ ((packed)); 81 81 82 82 /** 83 + * struct erw_eadm - EADM Subchannel extended report word 84 + * @b: aob error 85 + * @r: arsb error 86 + */ 87 + struct erw_eadm { 88 + __u32 : 16; 89 + __u32 b : 1; 90 + __u32 r : 1; 91 + __u32 : 14; 92 + } __packed; 93 + 94 + /** 83 95 * struct sublog - subchannel logout area 84 96 * @res0: reserved 85 97 * @esf: extended status flags ··· 182 170 } __attribute__ ((packed)); 183 171 184 172 /** 173 + * struct esw_eadm - EADM Subchannel Extended Status Word (ESW) 174 + * @sublog: subchannel logout 175 + * @erw: extended report word 176 + */ 177 + struct esw_eadm { 178 + __u32 sublog; 179 + struct erw_eadm erw; 180 + __u32 : 32; 181 + __u32 : 32; 182 + __u32 : 32; 183 + } __packed; 184 + 185 + /** 185 186 * struct irb - interruption response block 186 187 * @scsw: subchannel status word 187 - * @esw: extened status word, 4 formats 188 + * @esw: extened status word 188 189 * @ecw: extended control word 189 190 * 190 191 * The irb that is handed to the device driver when an interrupt occurs. For ··· 216 191 struct esw1 esw1; 217 192 struct esw2 esw2; 218 193 struct esw3 esw3; 194 + struct esw_eadm eadm; 219 195 } esw; 220 196 __u8 ecw[32]; 221 197 } __attribute__ ((packed,aligned(4)));
+74
arch/s390/include/asm/eadm.h
··· 1 + #ifndef _ASM_S390_EADM_H 2 + #define _ASM_S390_EADM_H 3 + 4 + #include <linux/types.h> 5 + 6 + struct arqb { 7 + u64 data; 8 + u16 fmt:4; 9 + u16:12; 10 + u16 cmd_code; 11 + u16:16; 12 + u16 msb_count; 13 + u32 reserved[12]; 14 + } __packed; 15 + 16 + #define ARQB_CMD_MOVE 1 17 + 18 + struct arsb { 19 + u16 fmt:4; 20 + u32:28; 21 + u8 ef; 22 + u8:8; 23 + u8 ecbi; 24 + u8:8; 25 + u8 fvf; 26 + u16:16; 27 + u8 eqc; 28 + u32:32; 29 + u64 fail_msb; 30 + u64 fail_aidaw; 31 + u64 fail_ms; 32 + u64 fail_scm; 33 + u32 reserved[4]; 34 + } __packed; 35 + 36 + struct msb { 37 + u8 fmt:4; 38 + u8 oc:4; 39 + u8 flags; 40 + u16:12; 41 + u16 bs:4; 42 + u32 blk_count; 43 + u64 data_addr; 44 + u64 scm_addr; 45 + u64:64; 46 + } __packed; 47 + 48 + struct aidaw { 49 + u8 flags; 50 + u32 :24; 51 + u32 :32; 52 + u64 data_addr; 53 + } __packed; 54 + 55 + #define MSB_OC_CLEAR 0 56 + #define MSB_OC_READ 1 57 + #define MSB_OC_WRITE 2 58 + #define MSB_OC_RELEASE 3 59 + 60 + #define MSB_FLAG_BNM 0x80 61 + #define MSB_FLAG_IDA 0x40 62 + 63 + #define MSB_BS_4K 0 64 + #define MSB_BS_1M 1 65 + 66 + #define AOB_NR_MSB 124 67 + 68 + struct aob { 69 + struct arqb request; 70 + struct arsb response; 71 + struct msb msb[AOB_NR_MSB]; 72 + } __packed __aligned(PAGE_SIZE); 73 + 74 + #endif /* _ASM_S390_EADM_H */
+34 -2
arch/s390/include/asm/scsw.h
··· 1 1 /* 2 2 * Helper functions for scsw access. 3 3 * 4 - * Copyright IBM Corp. 2008, 2009 4 + * Copyright IBM Corp. 2008, 2012 5 5 * Author(s): Peter Oberparleiter <peter.oberparleiter@de.ibm.com> 6 6 */ 7 7 ··· 100 100 } __attribute__ ((packed)); 101 101 102 102 /** 103 + * struct eadm_scsw - subchannel status word for eadm subchannels 104 + * @key: subchannel key 105 + * @eswf: esw format 106 + * @cc: deferred condition code 107 + * @ectl: extended control 108 + * @fctl: function control 109 + * @actl: activity control 110 + * @stctl: status control 111 + * @aob: AOB address 112 + * @dstat: device status 113 + * @cstat: subchannel status 114 + */ 115 + struct eadm_scsw { 116 + u32 key:4; 117 + u32:1; 118 + u32 eswf:1; 119 + u32 cc:2; 120 + u32:6; 121 + u32 ectl:1; 122 + u32:2; 123 + u32 fctl:3; 124 + u32 actl:7; 125 + u32 stctl:5; 126 + u32 aob; 127 + u32 dstat:8; 128 + u32 cstat:8; 129 + u32:16; 130 + } __packed; 131 + 132 + /** 103 133 * union scsw - subchannel status word 104 134 * @cmd: command-mode SCSW 105 135 * @tm: transport-mode SCSW 136 + * @eadm: eadm SCSW 106 137 */ 107 138 union scsw { 108 139 struct cmd_scsw cmd; 109 140 struct tm_scsw tm; 110 - } __attribute__ ((packed)); 141 + struct eadm_scsw eadm; 142 + } __packed; 111 143 112 144 #define SCSW_FCTL_CLEAR_FUNC 0x1 113 145 #define SCSW_FCTL_HALT_FUNC 0x2
+24
drivers/s390/cio/orb.h
··· 59 59 u32:32; 60 60 } __packed __aligned(4); 61 61 62 + /* 63 + * eadm operation request block 64 + */ 65 + struct eadm_orb { 66 + u32 intparm; 67 + u32 key:4; 68 + u32:4; 69 + u32 compat1:1; 70 + u32 compat2:1; 71 + u32:21; 72 + u32 x:1; 73 + u32 aob; 74 + u32 css_prio:8; 75 + u32:8; 76 + u32 scm_prio:8; 77 + u32:8; 78 + u32:29; 79 + u32 fmt:3; 80 + u32:32; 81 + u32:32; 82 + u32:32; 83 + } __packed __aligned(4); 84 + 62 85 union orb { 63 86 struct cmd_orb cmd; 64 87 struct tm_orb tm; 88 + struct eadm_orb eadm; 65 89 } __packed __aligned(4); 66 90 67 91 #endif /* S390_ORB_H */