Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 324064
b: refs/heads/master
c: d2fc439
h: refs/heads/master
v: v3
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Sep 26, 2012
1 parent 98448bf commit 2613cb4
Show file tree
Hide file tree
Showing 5 changed files with 160 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 382b73663529b756914cf17a9912c9cf00cf0025
refs/heads/master: d2fc439b99820cccd6978918c260730dd97bf373
28 changes: 27 additions & 1 deletion trunk/arch/s390/include/asm/cio.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,18 @@ struct erw {
__u32 res16 : 16;
} __attribute__ ((packed));

/**
* struct erw_eadm - EADM Subchannel extended report word
* @b: aob error
* @r: arsb error
*/
struct erw_eadm {
__u32 : 16;
__u32 b : 1;
__u32 r : 1;
__u32 : 14;
} __packed;

/**
* struct sublog - subchannel logout area
* @res0: reserved
Expand Down Expand Up @@ -169,10 +181,23 @@ struct esw3 {
__u32 zeros[3];
} __attribute__ ((packed));

/**
* struct esw_eadm - EADM Subchannel Extended Status Word (ESW)
* @sublog: subchannel logout
* @erw: extended report word
*/
struct esw_eadm {
__u32 sublog;
struct erw_eadm erw;
__u32 : 32;
__u32 : 32;
__u32 : 32;
} __packed;

/**
* struct irb - interruption response block
* @scsw: subchannel status word
* @esw: extened status word, 4 formats
* @esw: extened status word
* @ecw: extended control word
*
* The irb that is handed to the device driver when an interrupt occurs. For
Expand All @@ -191,6 +216,7 @@ struct irb {
struct esw1 esw1;
struct esw2 esw2;
struct esw3 esw3;
struct esw_eadm eadm;
} esw;
__u8 ecw[32];
} __attribute__ ((packed,aligned(4)));
Expand Down
74 changes: 74 additions & 0 deletions trunk/arch/s390/include/asm/eadm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#ifndef _ASM_S390_EADM_H
#define _ASM_S390_EADM_H

#include <linux/types.h>

struct arqb {
u64 data;
u16 fmt:4;
u16:12;
u16 cmd_code;
u16:16;
u16 msb_count;
u32 reserved[12];
} __packed;

#define ARQB_CMD_MOVE 1

struct arsb {
u16 fmt:4;
u32:28;
u8 ef;
u8:8;
u8 ecbi;
u8:8;
u8 fvf;
u16:16;
u8 eqc;
u32:32;
u64 fail_msb;
u64 fail_aidaw;
u64 fail_ms;
u64 fail_scm;
u32 reserved[4];
} __packed;

struct msb {
u8 fmt:4;
u8 oc:4;
u8 flags;
u16:12;
u16 bs:4;
u32 blk_count;
u64 data_addr;
u64 scm_addr;
u64:64;
} __packed;

struct aidaw {
u8 flags;
u32 :24;
u32 :32;
u64 data_addr;
} __packed;

#define MSB_OC_CLEAR 0
#define MSB_OC_READ 1
#define MSB_OC_WRITE 2
#define MSB_OC_RELEASE 3

#define MSB_FLAG_BNM 0x80
#define MSB_FLAG_IDA 0x40

#define MSB_BS_4K 0
#define MSB_BS_1M 1

#define AOB_NR_MSB 124

struct aob {
struct arqb request;
struct arsb response;
struct msb msb[AOB_NR_MSB];
} __packed __aligned(PAGE_SIZE);

#endif /* _ASM_S390_EADM_H */
36 changes: 34 additions & 2 deletions trunk/arch/s390/include/asm/scsw.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Helper functions for scsw access.
*
* Copyright IBM Corp. 2008, 2009
* Copyright IBM Corp. 2008, 2012
* Author(s): Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
*/

Expand Down Expand Up @@ -99,15 +99,47 @@ struct tm_scsw {
u32 schxs:8;
} __attribute__ ((packed));

/**
* struct eadm_scsw - subchannel status word for eadm subchannels
* @key: subchannel key
* @eswf: esw format
* @cc: deferred condition code
* @ectl: extended control
* @fctl: function control
* @actl: activity control
* @stctl: status control
* @aob: AOB address
* @dstat: device status
* @cstat: subchannel status
*/
struct eadm_scsw {
u32 key:4;
u32:1;
u32 eswf:1;
u32 cc:2;
u32:6;
u32 ectl:1;
u32:2;
u32 fctl:3;
u32 actl:7;
u32 stctl:5;
u32 aob;
u32 dstat:8;
u32 cstat:8;
u32:16;
} __packed;

/**
* union scsw - subchannel status word
* @cmd: command-mode SCSW
* @tm: transport-mode SCSW
* @eadm: eadm SCSW
*/
union scsw {
struct cmd_scsw cmd;
struct tm_scsw tm;
} __attribute__ ((packed));
struct eadm_scsw eadm;
} __packed;

#define SCSW_FCTL_CLEAR_FUNC 0x1
#define SCSW_FCTL_HALT_FUNC 0x2
Expand Down
24 changes: 24 additions & 0 deletions trunk/drivers/s390/cio/orb.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,33 @@ struct tm_orb {
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;
u32 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 */

0 comments on commit 2613cb4

Please sign in to comment.