0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef _ASM_CHSC_H
0010 #define _ASM_CHSC_H
0011
0012 #include <linux/types.h>
0013 #include <linux/ioctl.h>
0014 #include <asm/chpid.h>
0015 #include <asm/schid.h>
0016
0017 #define CHSC_SIZE 0x1000
0018
0019 struct chsc_async_header {
0020 __u16 length;
0021 __u16 code;
0022 __u32 cmd_dependend;
0023 __u32 key : 4;
0024 __u32 : 28;
0025 struct subchannel_id sid;
0026 };
0027
0028 struct chsc_async_area {
0029 struct chsc_async_header header;
0030 __u8 data[CHSC_SIZE - sizeof(struct chsc_async_header)];
0031 };
0032
0033 struct chsc_header {
0034 __u16 length;
0035 __u16 code;
0036 };
0037
0038 struct chsc_sync_area {
0039 struct chsc_header header;
0040 __u8 data[CHSC_SIZE - sizeof(struct chsc_header)];
0041 };
0042
0043 struct chsc_response_struct {
0044 __u16 length;
0045 __u16 code;
0046 __u32 parms;
0047 __u8 data[CHSC_SIZE - 2 * sizeof(__u16) - sizeof(__u32)];
0048 };
0049
0050 struct chsc_chp_cd {
0051 struct chp_id chpid;
0052 int m;
0053 int fmt;
0054 struct chsc_response_struct cpcb;
0055 };
0056
0057 struct chsc_cu_cd {
0058 __u16 cun;
0059 __u8 cssid;
0060 int m;
0061 int fmt;
0062 struct chsc_response_struct cucb;
0063 };
0064
0065 struct chsc_sch_cud {
0066 struct subchannel_id schid;
0067 int fmt;
0068 struct chsc_response_struct scub;
0069 };
0070
0071 struct conf_id {
0072 int m;
0073 __u8 cssid;
0074 __u8 ssid;
0075 };
0076
0077 struct chsc_conf_info {
0078 struct conf_id id;
0079 int fmt;
0080 struct chsc_response_struct scid;
0081 };
0082
0083 struct ccl_parm_chpid {
0084 int m;
0085 struct chp_id chp;
0086 };
0087
0088 struct ccl_parm_cssids {
0089 __u8 f_cssid;
0090 __u8 l_cssid;
0091 };
0092
0093 struct chsc_comp_list {
0094 struct {
0095 enum {
0096 CCL_CU_ON_CHP = 1,
0097 CCL_CHP_TYPE_CAP = 2,
0098 CCL_CSS_IMG = 4,
0099 CCL_CSS_IMG_CONF_CHAR = 5,
0100 CCL_IOP_CHP = 6,
0101 } ctype;
0102 int fmt;
0103 struct ccl_parm_chpid chpid;
0104 struct ccl_parm_cssids cssids;
0105 } req;
0106 struct chsc_response_struct sccl;
0107 };
0108
0109 struct chsc_dcal {
0110 struct {
0111 enum {
0112 DCAL_CSS_IID_PN = 4,
0113 } atype;
0114 __u32 list_parm[2];
0115 int fmt;
0116 } req;
0117 struct chsc_response_struct sdcal;
0118 };
0119
0120 struct chsc_cpd_info {
0121 struct chp_id chpid;
0122 int m;
0123 int fmt;
0124 int rfmt;
0125 int c;
0126 struct chsc_response_struct chpdb;
0127 };
0128
0129 #define CHSC_IOCTL_MAGIC 'c'
0130
0131 #define CHSC_START _IOWR(CHSC_IOCTL_MAGIC, 0x81, struct chsc_async_area)
0132 #define CHSC_INFO_CHANNEL_PATH _IOWR(CHSC_IOCTL_MAGIC, 0x82, \
0133 struct chsc_chp_cd)
0134 #define CHSC_INFO_CU _IOWR(CHSC_IOCTL_MAGIC, 0x83, struct chsc_cu_cd)
0135 #define CHSC_INFO_SCH_CU _IOWR(CHSC_IOCTL_MAGIC, 0x84, struct chsc_sch_cud)
0136 #define CHSC_INFO_CI _IOWR(CHSC_IOCTL_MAGIC, 0x85, struct chsc_conf_info)
0137 #define CHSC_INFO_CCL _IOWR(CHSC_IOCTL_MAGIC, 0x86, struct chsc_comp_list)
0138 #define CHSC_INFO_CPD _IOWR(CHSC_IOCTL_MAGIC, 0x87, struct chsc_cpd_info)
0139 #define CHSC_INFO_DCAL _IOWR(CHSC_IOCTL_MAGIC, 0x88, struct chsc_dcal)
0140 #define CHSC_START_SYNC _IOWR(CHSC_IOCTL_MAGIC, 0x89, struct chsc_sync_area)
0141 #define CHSC_ON_CLOSE_SET _IOWR(CHSC_IOCTL_MAGIC, 0x8a, struct chsc_async_area)
0142 #define CHSC_ON_CLOSE_REMOVE _IO(CHSC_IOCTL_MAGIC, 0x8b)
0143
0144 #endif