1#ifndef S390_CMB_H
2#define S390_CMB_H
3struct cmbdata {
4	__u64 size;
5	__u64 elapsed_time;
6 /* basic and exended format: */
7	__u64 ssch_rsch_count;
8	__u64 sample_count;
9	__u64 device_connect_time;
10	__u64 function_pending_time;
11	__u64 device_disconnect_time;
12	__u64 control_unit_queuing_time;
13	__u64 device_active_only_time;
14 /* extended format only: */
15	__u64 device_busy_time;
16	__u64 initial_command_response_time;
17};
18
19/* enable channel measurement */
20#define BIODASDCMFENABLE	_IO(DASD_IOCTL_LETTER,32)
21/* enable channel measurement */
22#define BIODASDCMFDISABLE	_IO(DASD_IOCTL_LETTER,33)
23/* read channel measurement data */
24#define BIODASDREADALLCMB	_IOWR(DASD_IOCTL_LETTER,33,struct cmbdata)
25
26#ifdef __KERNEL__
27struct ccw_device;
28/**
29 * enable_cmf() - switch on the channel measurement for a specific device
30 *  @cdev:	The ccw device to be enabled
31 *  returns 0 for success or a negative error value.
32 *
33 *  Context:
34 *    non-atomic
35 **/
36extern int enable_cmf(struct ccw_device *cdev);
37
38/**
39 * disable_cmf() - switch off the channel measurement for a specific device
40 *  @cdev:	The ccw device to be disabled
41 *  returns 0 for success or a negative error value.
42 *
43 *  Context:
44 *    non-atomic
45 **/
46extern int disable_cmf(struct ccw_device *cdev);
47
48/**
49 * cmf_read() - read one value from the current channel measurement block
50 * @cmf:	the channel to be read
51 * @index:	the name of the value that is read
52 *
53 *  Context:
54 *    any
55 **/
56
57extern u64 cmf_read(struct ccw_device *cdev, int index);
58/**
59 * cmf_readall() - read one value from the current channel measurement block
60 * @cmf:	the channel to be read
61 * @data:	a pointer to a data block that will be filled
62 *
63 *  Context:
64 *    any
65 **/
66extern int cmf_readall(struct ccw_device *cdev, struct cmbdata*data);
67extern void cmf_reset(struct ccw_device *cdev);
68
69#endif /* __KERNEL__ */
70#endif /* S390_CMB_H */
71