Linux Audio

Check our new training course

Loading...
v5.14.15
  1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2/*
  3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
  4 * Bugreports.to..: <Linux390@de.ibm.com>
  5 * Copyright IBM Corp. 1999, 2000
  6 * EMC Symmetrix ioctl Copyright EMC Corporation, 2008
  7 * Author.........: Nigel Hislop <hislop_nigel@emc.com>
  8 *
  9 * This file is the interface of the DASD device driver, which is exported to user space
 10 * any future changes wrt the API will result in a change of the APIVERSION reported
 11 * to userspace by the DASDAPIVER-ioctl
 12 *
 13 */
 14
 15#ifndef DASD_H
 16#define DASD_H
 17#include <linux/types.h>
 18#include <linux/ioctl.h>
 19
 20#define DASD_IOCTL_LETTER 'D'
 21
 22#define DASD_API_VERSION 6
 23
 24/*
 25 * struct dasd_information2_t
 26 * represents any data about the device, which is visible to userspace.
 27 *  including foramt and featueres.
 28 */
 29typedef struct dasd_information2_t {
 30	unsigned int devno;	    /* S/390 devno */
 31	unsigned int real_devno;    /* for aliases */
 32	unsigned int schid;	    /* S/390 subchannel identifier */
 33	unsigned int cu_type  : 16; /* from SenseID */
 34	unsigned int cu_model :  8; /* from SenseID */
 35	unsigned int dev_type : 16; /* from SenseID */
 36	unsigned int dev_model : 8; /* from SenseID */
 37	unsigned int open_count;
 38	unsigned int req_queue_len;
 39	unsigned int chanq_len;     /* length of chanq */
 40	char type[4];		    /* from discipline.name, 'none' for unknown */
 41	unsigned int status;	    /* current device level */
 42	unsigned int label_block;   /* where to find the VOLSER */
 43	unsigned int FBA_layout;    /* fixed block size (like AIXVOL) */
 44	unsigned int characteristics_size;
 45	unsigned int confdata_size;
 46	char characteristics[64];   /* from read_device_characteristics */
 47	char configuration_data[256]; /* from read_configuration_data */
 48	unsigned int format;	      /* format info like formatted/cdl/ldl/... */
 49	unsigned int features;	      /* dasd features like 'ro',...		*/
 50	unsigned int reserved0;       /* reserved for further use ,...		*/
 51	unsigned int reserved1;       /* reserved for further use ,...		*/
 52	unsigned int reserved2;       /* reserved for further use ,...		*/
 53	unsigned int reserved3;       /* reserved for further use ,...		*/
 54	unsigned int reserved4;       /* reserved for further use ,...		*/
 55	unsigned int reserved5;       /* reserved for further use ,...		*/
 56	unsigned int reserved6;       /* reserved for further use ,...		*/
 57	unsigned int reserved7;       /* reserved for further use ,...		*/
 58} dasd_information2_t;
 59
 60/*
 61 * values to be used for dasd_information_t.format
 62 * 0x00: NOT formatted
 63 * 0x01: Linux disc layout
 64 * 0x02: Common disc layout
 65 */
 66#define DASD_FORMAT_NONE 0
 67#define DASD_FORMAT_LDL  1
 68#define DASD_FORMAT_CDL  2
 69/*
 70 * values to be used for dasd_information_t.features
 71 * 0x100: default features
 72 * 0x001: readonly (ro)
 73 * 0x002: use diag discipline (diag)
 74 * 0x004: set the device initially online (internal use only)
 75 * 0x008: enable ERP related logging
 76 * 0x010: allow I/O to fail on lost paths
 77 * 0x020: allow I/O to fail when a lock was stolen
 78 * 0x040: give access to raw eckd data
 79 * 0x080: enable discard support
 80 * 0x100: enable autodisable for IFCC errors (default)
 81 */
 82#define DASD_FEATURE_READONLY	      0x001
 83#define DASD_FEATURE_USEDIAG	      0x002
 84#define DASD_FEATURE_INITIAL_ONLINE   0x004
 85#define DASD_FEATURE_ERPLOG	      0x008
 86#define DASD_FEATURE_FAILFAST	      0x010
 87#define DASD_FEATURE_FAILONSLCK       0x020
 88#define DASD_FEATURE_USERAW	      0x040
 89#define DASD_FEATURE_DISCARD	      0x080
 90#define DASD_FEATURE_PATH_AUTODISABLE 0x100
 91#define DASD_FEATURE_DEFAULT	      DASD_FEATURE_PATH_AUTODISABLE
 92
 93#define DASD_PARTN_BITS 2
 94
 95/*
 96 * struct dasd_information_t
 97 * represents any data about the data, which is visible to userspace
 98 */
 99typedef struct dasd_information_t {
100	unsigned int devno;	    /* S/390 devno */
101	unsigned int real_devno;    /* for aliases */
102	unsigned int schid;	    /* S/390 subchannel identifier */
103	unsigned int cu_type  : 16; /* from SenseID */
104	unsigned int cu_model :  8; /* from SenseID */
105	unsigned int dev_type : 16; /* from SenseID */
106	unsigned int dev_model : 8; /* from SenseID */
107	unsigned int open_count;
108	unsigned int req_queue_len;
109	unsigned int chanq_len;     /* length of chanq */
110	char type[4];		    /* from discipline.name, 'none' for unknown */
111	unsigned int status;	    /* current device level */
112	unsigned int label_block;   /* where to find the VOLSER */
113	unsigned int FBA_layout;    /* fixed block size (like AIXVOL) */
114	unsigned int characteristics_size;
115	unsigned int confdata_size;
116	char characteristics[64];   /* from read_device_characteristics */
117	char configuration_data[256]; /* from read_configuration_data */
118} dasd_information_t;
119
120/*
121 * Read Subsystem Data - Performance Statistics
122 */
123typedef struct dasd_rssd_perf_stats_t {
124	unsigned char  invalid:1;
125	unsigned char  format:3;
126	unsigned char  data_format:4;
127	unsigned char  unit_address;
128	unsigned short device_status;
129	unsigned int   nr_read_normal;
130	unsigned int   nr_read_normal_hits;
131	unsigned int   nr_write_normal;
132	unsigned int   nr_write_fast_normal_hits;
133	unsigned int   nr_read_seq;
134	unsigned int   nr_read_seq_hits;
135	unsigned int   nr_write_seq;
136	unsigned int   nr_write_fast_seq_hits;
137	unsigned int   nr_read_cache;
138	unsigned int   nr_read_cache_hits;
139	unsigned int   nr_write_cache;
140	unsigned int   nr_write_fast_cache_hits;
141	unsigned int   nr_inhibit_cache;
142	unsigned int   nr_bybass_cache;
143	unsigned int   nr_seq_dasd_to_cache;
144	unsigned int   nr_dasd_to_cache;
145	unsigned int   nr_cache_to_dasd;
146	unsigned int   nr_delayed_fast_write;
147	unsigned int   nr_normal_fast_write;
148	unsigned int   nr_seq_fast_write;
149	unsigned int   nr_cache_miss;
150	unsigned char  status2;
151	unsigned int   nr_quick_write_promotes;
152	unsigned char  reserved;
153	unsigned short ssid;
154	unsigned char  reseved2[96];
155} __attribute__((packed)) dasd_rssd_perf_stats_t;
156
157/*
158 * struct profile_info_t
159 * holds the profinling information
160 */
161typedef struct dasd_profile_info_t {
162	unsigned int dasd_io_reqs;	 /* number of requests processed at all */
163	unsigned int dasd_io_sects;	 /* number of sectors processed at all */
164	unsigned int dasd_io_secs[32];	 /* histogram of request's sizes */
165	unsigned int dasd_io_times[32];	 /* histogram of requests's times */
166	unsigned int dasd_io_timps[32];	 /* histogram of requests's times per sector */
167	unsigned int dasd_io_time1[32];	 /* histogram of time from build to start */
168	unsigned int dasd_io_time2[32];	 /* histogram of time from start to irq */
169	unsigned int dasd_io_time2ps[32]; /* histogram of time from start to irq */
170	unsigned int dasd_io_time3[32];	 /* histogram of time from irq to end */
171	unsigned int dasd_io_nr_req[32]; /* histogram of # of requests in chanq */
172} dasd_profile_info_t;
173
174/*
175 * struct format_data_t
176 * represents all data necessary to format a dasd
177 */
178typedef struct format_data_t {
179	unsigned int start_unit; /* from track */
180	unsigned int stop_unit;  /* to track */
181	unsigned int blksize;	 /* sectorsize */
182	unsigned int intensity;
183} format_data_t;
184
185/*
186 * values to be used for format_data_t.intensity
187 * 0/8: normal format
188 * 1/9: also write record zero
189 * 3/11: also write home address
190 * 4/12: invalidate track
191 */
192#define DASD_FMT_INT_FMT_R0	1	/* write record zero */
193#define DASD_FMT_INT_FMT_HA	2	/* write home address, also set FMT_R0 ! */
194#define DASD_FMT_INT_INVAL	4	/* invalidate tracks */
195#define DASD_FMT_INT_COMPAT	8	/* use OS/390 compatible disk layout */
196#define DASD_FMT_INT_FMT_NOR0	16	/* remove permission to write record zero */
197#define DASD_FMT_INT_ESE_FULL	32	/* release space for entire volume */
198
199/*
200 * struct format_check_t
201 * represents all data necessary to evaluate the format of
202 * different tracks of a dasd
203 */
204typedef struct format_check_t {
205	/* Input */
206	struct format_data_t expect;
207
208	/* Output */
209	unsigned int result;		/* Error indication (DASD_FMT_ERR_*) */
210	unsigned int unit;		/* Track that is in error */
211	unsigned int rec;		/* Record that is in error */
212	unsigned int num_records;	/* Records in the track in error */
213	unsigned int blksize;		/* Blocksize of first record in error */
214	unsigned int key_length;	/* Key length of first record in error */
215} format_check_t;
216
217/* Values returned in format_check_t when a format error is detected: */
218/* Too few records were found on a single track */
219#define DASD_FMT_ERR_TOO_FEW_RECORDS	1
220/* Too many records were found on a single track */
221#define DASD_FMT_ERR_TOO_MANY_RECORDS	2
222/* Blocksize/data-length of a record was wrong */
223#define DASD_FMT_ERR_BLKSIZE		3
224/* A record ID is defined by cylinder, head, and record number (CHR). */
225/* On mismatch, this error is set */
226#define DASD_FMT_ERR_RECORD_ID		4
227/* If key-length was != 0 */
228#define DASD_FMT_ERR_KEY_LENGTH		5
229
230/*
231 * struct attrib_data_t
232 * represents the operation (cache) bits for the device.
233 * Used in DE to influence caching of the DASD.
234 */
235typedef struct attrib_data_t {
236	unsigned char operation:3;     /* cache operation mode */
237	unsigned char reserved:5;      /* cache operation mode */
238	__u16         nr_cyl;          /* no of cyliners for read ahaed */
239	__u8          reserved2[29];   /* for future use */
240} __attribute__ ((packed)) attrib_data_t;
241
242/* definition of operation (cache) bits within attributes of DE */
243#define DASD_NORMAL_CACHE  0x0
244#define DASD_BYPASS_CACHE  0x1
245#define DASD_INHIBIT_LOAD  0x2
246#define DASD_SEQ_ACCESS    0x3
247#define DASD_SEQ_PRESTAGE  0x4
248#define DASD_REC_ACCESS    0x5
249
250/*
251 * Perform EMC Symmetrix I/O
252 */
253typedef struct dasd_symmio_parms {
254	unsigned char reserved[8];	/* compat with older releases */
255	unsigned long long psf_data;	/* char * cast to u64 */
256	unsigned long long rssd_result; /* char * cast to u64 */
257	int psf_data_len;
258	int rssd_result_len;
259} __attribute__ ((packed)) dasd_symmio_parms_t;
260
261/*
262 * Data returned by Sense Path Group ID (SNID)
263 */
264struct dasd_snid_data {
265	struct {
266		__u8 group:2;
267		__u8 reserve:2;
268		__u8 mode:1;
269		__u8 res:3;
270	} __attribute__ ((packed)) path_state;
271	__u8 pgid[11];
272} __attribute__ ((packed));
273
274struct dasd_snid_ioctl_data {
275	struct dasd_snid_data data;
276	__u8 path_mask;
277} __attribute__ ((packed));
278
279
280/********************************************************************************
281 * SECTION: Definition of IOCTLs
282 *
283 * Here ist how the ioctl-nr should be used:
284 *    0 -   31   DASD driver itself
285 *   32 -  239   still open
286 *  240 -  255	 reserved for EMC
287 *******************************************************************************/
288
289/* Disable the volume (for Linux) */
290#define BIODASDDISABLE _IO(DASD_IOCTL_LETTER,0)
291/* Enable the volume (for Linux) */
292#define BIODASDENABLE  _IO(DASD_IOCTL_LETTER,1)
293/* Issue a reserve/release command, rsp. */
294#define BIODASDRSRV    _IO(DASD_IOCTL_LETTER,2) /* reserve */
295#define BIODASDRLSE    _IO(DASD_IOCTL_LETTER,3) /* release */
296#define BIODASDSLCK    _IO(DASD_IOCTL_LETTER,4) /* steal lock */
297/* reset profiling information of a device */
298#define BIODASDPRRST   _IO(DASD_IOCTL_LETTER,5)
299/* Quiesce IO on device */
300#define BIODASDQUIESCE _IO(DASD_IOCTL_LETTER,6)
301/* Resume IO on device */
302#define BIODASDRESUME  _IO(DASD_IOCTL_LETTER,7)
303/* Abort all I/O on a device */
304#define BIODASDABORTIO _IO(DASD_IOCTL_LETTER, 240)
305/* Allow I/O on a device */
306#define BIODASDALLOWIO _IO(DASD_IOCTL_LETTER, 241)
307
308
309/* retrieve API version number */
310#define DASDAPIVER     _IOR(DASD_IOCTL_LETTER,0,int)
311/* Get information on a dasd device */
312#define BIODASDINFO    _IOR(DASD_IOCTL_LETTER,1,dasd_information_t)
313/* retrieve profiling information of a device */
314#define BIODASDPRRD    _IOR(DASD_IOCTL_LETTER,2,dasd_profile_info_t)
315/* Get information on a dasd device (enhanced) */
316#define BIODASDINFO2   _IOR(DASD_IOCTL_LETTER,3,dasd_information2_t)
317/* Performance Statistics Read */
318#define BIODASDPSRD    _IOR(DASD_IOCTL_LETTER,4,dasd_rssd_perf_stats_t)
319/* Get Attributes (cache operations) */
320#define BIODASDGATTR   _IOR(DASD_IOCTL_LETTER,5,attrib_data_t)
321
322
323/* #define BIODASDFORMAT  _IOW(IOCTL_LETTER,0,format_data_t) , deprecated */
324#define BIODASDFMT     _IOW(DASD_IOCTL_LETTER,1,format_data_t)
325/* Set Attributes (cache operations) */
326#define BIODASDSATTR   _IOW(DASD_IOCTL_LETTER,2,attrib_data_t)
327/* Release Allocated Space */
328#define BIODASDRAS     _IOW(DASD_IOCTL_LETTER, 3, format_data_t)
329
330/* Get Sense Path Group ID (SNID) data */
331#define BIODASDSNID    _IOWR(DASD_IOCTL_LETTER, 1, struct dasd_snid_ioctl_data)
332/* Check device format according to format_check_t */
333#define BIODASDCHECKFMT _IOWR(DASD_IOCTL_LETTER, 2, format_check_t)
334
335#define BIODASDSYMMIO  _IOWR(DASD_IOCTL_LETTER, 240, dasd_symmio_parms_t)
336
337#endif				/* DASD_H */
338
v4.6
  1/* 
 
  2 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
  3 * Bugreports.to..: <Linux390@de.ibm.com>
  4 * Copyright IBM Corp. 1999, 2000
  5 * EMC Symmetrix ioctl Copyright EMC Corporation, 2008
  6 * Author.........: Nigel Hislop <hislop_nigel@emc.com>
  7 *
  8 * This file is the interface of the DASD device driver, which is exported to user space
  9 * any future changes wrt the API will result in a change of the APIVERSION reported
 10 * to userspace by the DASDAPIVER-ioctl
 11 *
 12 */
 13
 14#ifndef DASD_H
 15#define DASD_H
 16#include <linux/types.h>
 17#include <linux/ioctl.h>
 18
 19#define DASD_IOCTL_LETTER 'D'
 20
 21#define DASD_API_VERSION 6
 22
 23/* 
 24 * struct dasd_information2_t
 25 * represents any data about the device, which is visible to userspace.
 26 *  including foramt and featueres.
 27 */
 28typedef struct dasd_information2_t {
 29        unsigned int devno;         /* S/390 devno */
 30        unsigned int real_devno;    /* for aliases */
 31        unsigned int schid;         /* S/390 subchannel identifier */
 32        unsigned int cu_type  : 16; /* from SenseID */
 33        unsigned int cu_model :  8; /* from SenseID */
 34        unsigned int dev_type : 16; /* from SenseID */
 35        unsigned int dev_model : 8; /* from SenseID */
 36        unsigned int open_count; 
 37        unsigned int req_queue_len; 
 38        unsigned int chanq_len;     /* length of chanq */
 39        char type[4];               /* from discipline.name, 'none' for unknown */
 40        unsigned int status;        /* current device level */
 41        unsigned int label_block;   /* where to find the VOLSER */
 42        unsigned int FBA_layout;    /* fixed block size (like AIXVOL) */
 43        unsigned int characteristics_size;
 44        unsigned int confdata_size;
 45        char characteristics[64];   /* from read_device_characteristics */
 46        char configuration_data[256]; /* from read_configuration_data */
 47        unsigned int format;          /* format info like formatted/cdl/ldl/... */
 48        unsigned int features;        /* dasd features like 'ro',...            */
 49        unsigned int reserved0;       /* reserved for further use ,...          */
 50        unsigned int reserved1;       /* reserved for further use ,...          */
 51        unsigned int reserved2;       /* reserved for further use ,...          */
 52        unsigned int reserved3;       /* reserved for further use ,...          */
 53        unsigned int reserved4;       /* reserved for further use ,...          */
 54        unsigned int reserved5;       /* reserved for further use ,...          */
 55        unsigned int reserved6;       /* reserved for further use ,...          */
 56        unsigned int reserved7;       /* reserved for further use ,...          */
 57} dasd_information2_t;
 58
 59/*
 60 * values to be used for dasd_information_t.format
 61 * 0x00: NOT formatted
 62 * 0x01: Linux disc layout
 63 * 0x02: Common disc layout
 64 */
 65#define DASD_FORMAT_NONE 0
 66#define DASD_FORMAT_LDL  1
 67#define DASD_FORMAT_CDL  2
 68/*
 69 * values to be used for dasd_information_t.features
 70 * 0x00: default features
 71 * 0x01: readonly (ro)
 72 * 0x02: use diag discipline (diag)
 73 * 0x04: set the device initially online (internal use only)
 74 * 0x08: enable ERP related logging
 75 * 0x20: give access to raw eckd data
 76 */
 77#define DASD_FEATURE_DEFAULT	     0x00
 78#define DASD_FEATURE_READONLY	     0x01
 79#define DASD_FEATURE_USEDIAG	     0x02
 80#define DASD_FEATURE_INITIAL_ONLINE  0x04
 81#define DASD_FEATURE_ERPLOG	     0x08
 82#define DASD_FEATURE_FAILFAST	     0x10
 83#define DASD_FEATURE_FAILONSLCK      0x20
 84#define DASD_FEATURE_USERAW	     0x40
 
 
 
 
 
 
 85
 86#define DASD_PARTN_BITS 2
 87
 88/* 
 89 * struct dasd_information_t
 90 * represents any data about the data, which is visible to userspace
 91 */
 92typedef struct dasd_information_t {
 93        unsigned int devno;         /* S/390 devno */
 94        unsigned int real_devno;    /* for aliases */
 95        unsigned int schid;         /* S/390 subchannel identifier */
 96        unsigned int cu_type  : 16; /* from SenseID */
 97        unsigned int cu_model :  8; /* from SenseID */
 98        unsigned int dev_type : 16; /* from SenseID */
 99        unsigned int dev_model : 8; /* from SenseID */
100        unsigned int open_count; 
101        unsigned int req_queue_len; 
102        unsigned int chanq_len;     /* length of chanq */
103        char type[4];               /* from discipline.name, 'none' for unknown */
104        unsigned int status;        /* current device level */
105        unsigned int label_block;   /* where to find the VOLSER */
106        unsigned int FBA_layout;    /* fixed block size (like AIXVOL) */
107        unsigned int characteristics_size;
108        unsigned int confdata_size;
109        char characteristics[64];   /* from read_device_characteristics */
110        char configuration_data[256]; /* from read_configuration_data */
111} dasd_information_t;
112
113/*
114 * Read Subsystem Data - Performance Statistics
115 */ 
116typedef struct dasd_rssd_perf_stats_t {
117	unsigned char  invalid:1;
118	unsigned char  format:3;
119	unsigned char  data_format:4;
120	unsigned char  unit_address;
121	unsigned short device_status;
122	unsigned int   nr_read_normal;
123	unsigned int   nr_read_normal_hits;
124	unsigned int   nr_write_normal;
125	unsigned int   nr_write_fast_normal_hits;
126	unsigned int   nr_read_seq;
127	unsigned int   nr_read_seq_hits;
128	unsigned int   nr_write_seq;
129	unsigned int   nr_write_fast_seq_hits;
130	unsigned int   nr_read_cache;
131	unsigned int   nr_read_cache_hits;
132	unsigned int   nr_write_cache;
133	unsigned int   nr_write_fast_cache_hits;
134	unsigned int   nr_inhibit_cache;
135	unsigned int   nr_bybass_cache;
136	unsigned int   nr_seq_dasd_to_cache;
137	unsigned int   nr_dasd_to_cache;
138	unsigned int   nr_cache_to_dasd;
139	unsigned int   nr_delayed_fast_write;
140	unsigned int   nr_normal_fast_write;
141	unsigned int   nr_seq_fast_write;
142	unsigned int   nr_cache_miss;
143	unsigned char  status2;
144	unsigned int   nr_quick_write_promotes;
145	unsigned char  reserved;
146	unsigned short ssid;
147	unsigned char  reseved2[96];
148} __attribute__((packed)) dasd_rssd_perf_stats_t;
149
150/* 
151 * struct profile_info_t
152 * holds the profinling information 
153 */
154typedef struct dasd_profile_info_t {
155        unsigned int dasd_io_reqs;	 /* number of requests processed at all */
156        unsigned int dasd_io_sects;	 /* number of sectors processed at all */
157        unsigned int dasd_io_secs[32];	 /* histogram of request's sizes */
158        unsigned int dasd_io_times[32];	 /* histogram of requests's times */
159        unsigned int dasd_io_timps[32];	 /* histogram of requests's times per sector */
160        unsigned int dasd_io_time1[32];	 /* histogram of time from build to start */
161        unsigned int dasd_io_time2[32];	 /* histogram of time from start to irq */
162        unsigned int dasd_io_time2ps[32]; /* histogram of time from start to irq */
163        unsigned int dasd_io_time3[32];	 /* histogram of time from irq to end */
164        unsigned int dasd_io_nr_req[32]; /* histogram of # of requests in chanq */
165} dasd_profile_info_t;
166
167/*
168 * struct format_data_t
169 * represents all data necessary to format a dasd
170 */
171typedef struct format_data_t {
172	unsigned int start_unit; /* from track */
173	unsigned int stop_unit;  /* to track */
174	unsigned int blksize;	 /* sectorsize */
175	unsigned int intensity;
176} format_data_t;
177
178/*
179 * values to be used for format_data_t.intensity
180 * 0/8: normal format
181 * 1/9: also write record zero
182 * 3/11: also write home address
183 * 4/12: invalidate track
184 */
185#define DASD_FMT_INT_FMT_R0 1 /* write record zero */
186#define DASD_FMT_INT_FMT_HA 2 /* write home address, also set FMT_R0 ! */
187#define DASD_FMT_INT_INVAL  4 /* invalidate tracks */
188#define DASD_FMT_INT_COMPAT 8 /* use OS/390 compatible disk layout */
 
 
189
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
190
191/* 
192 * struct attrib_data_t
193 * represents the operation (cache) bits for the device.
194 * Used in DE to influence caching of the DASD.
195 */
196typedef struct attrib_data_t {
197	unsigned char operation:3;     /* cache operation mode */
198	unsigned char reserved:5;      /* cache operation mode */
199	__u16         nr_cyl;          /* no of cyliners for read ahaed */
200	__u8          reserved2[29];   /* for future use */
201} __attribute__ ((packed)) attrib_data_t;
202
203/* definition of operation (cache) bits within attributes of DE */
204#define DASD_NORMAL_CACHE  0x0
205#define DASD_BYPASS_CACHE  0x1
206#define DASD_INHIBIT_LOAD  0x2
207#define DASD_SEQ_ACCESS    0x3
208#define DASD_SEQ_PRESTAGE  0x4
209#define DASD_REC_ACCESS    0x5
210
211/*
212 * Perform EMC Symmetrix I/O
213 */
214typedef struct dasd_symmio_parms {
215	unsigned char reserved[8];	/* compat with older releases */
216	unsigned long long psf_data;	/* char * cast to u64 */
217	unsigned long long rssd_result; /* char * cast to u64 */
218	int psf_data_len;
219	int rssd_result_len;
220} __attribute__ ((packed)) dasd_symmio_parms_t;
221
222/*
223 * Data returned by Sense Path Group ID (SNID)
224 */
225struct dasd_snid_data {
226	struct {
227		__u8 group:2;
228		__u8 reserve:2;
229		__u8 mode:1;
230		__u8 res:3;
231	} __attribute__ ((packed)) path_state;
232	__u8 pgid[11];
233} __attribute__ ((packed));
234
235struct dasd_snid_ioctl_data {
236	struct dasd_snid_data data;
237	__u8 path_mask;
238} __attribute__ ((packed));
239
240
241/********************************************************************************
242 * SECTION: Definition of IOCTLs
243 *
244 * Here ist how the ioctl-nr should be used:
245 *    0 -   31   DASD driver itself
246 *   32 -  239   still open
247 *  240 -  255   reserved for EMC 
248 *******************************************************************************/
249
250/* Disable the volume (for Linux) */
251#define BIODASDDISABLE _IO(DASD_IOCTL_LETTER,0) 
252/* Enable the volume (for Linux) */
253#define BIODASDENABLE  _IO(DASD_IOCTL_LETTER,1)  
254/* Issue a reserve/release command, rsp. */
255#define BIODASDRSRV    _IO(DASD_IOCTL_LETTER,2) /* reserve */
256#define BIODASDRLSE    _IO(DASD_IOCTL_LETTER,3) /* release */
257#define BIODASDSLCK    _IO(DASD_IOCTL_LETTER,4) /* steal lock */
258/* reset profiling information of a device */
259#define BIODASDPRRST   _IO(DASD_IOCTL_LETTER,5)
260/* Quiesce IO on device */
261#define BIODASDQUIESCE _IO(DASD_IOCTL_LETTER,6) 
262/* Resume IO on device */
263#define BIODASDRESUME  _IO(DASD_IOCTL_LETTER,7) 
264/* Abort all I/O on a device */
265#define BIODASDABORTIO _IO(DASD_IOCTL_LETTER, 240)
266/* Allow I/O on a device */
267#define BIODASDALLOWIO _IO(DASD_IOCTL_LETTER, 241)
268
269
270/* retrieve API version number */
271#define DASDAPIVER     _IOR(DASD_IOCTL_LETTER,0,int)
272/* Get information on a dasd device */
273#define BIODASDINFO    _IOR(DASD_IOCTL_LETTER,1,dasd_information_t)
274/* retrieve profiling information of a device */
275#define BIODASDPRRD    _IOR(DASD_IOCTL_LETTER,2,dasd_profile_info_t)
276/* Get information on a dasd device (enhanced) */
277#define BIODASDINFO2   _IOR(DASD_IOCTL_LETTER,3,dasd_information2_t)
278/* Performance Statistics Read */
279#define BIODASDPSRD    _IOR(DASD_IOCTL_LETTER,4,dasd_rssd_perf_stats_t)
280/* Get Attributes (cache operations) */
281#define BIODASDGATTR   _IOR(DASD_IOCTL_LETTER,5,attrib_data_t) 
282
283
284/* #define BIODASDFORMAT  _IOW(IOCTL_LETTER,0,format_data_t) , deprecated */
285#define BIODASDFMT     _IOW(DASD_IOCTL_LETTER,1,format_data_t) 
286/* Set Attributes (cache operations) */
287#define BIODASDSATTR   _IOW(DASD_IOCTL_LETTER,2,attrib_data_t) 
 
 
288
289/* Get Sense Path Group ID (SNID) data */
290#define BIODASDSNID    _IOWR(DASD_IOCTL_LETTER, 1, struct dasd_snid_ioctl_data)
 
 
291
292#define BIODASDSYMMIO  _IOWR(DASD_IOCTL_LETTER, 240, dasd_symmio_parms_t)
293
294#endif				/* DASD_H */
295