aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/io_sch.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/cio/io_sch.h')
-rw-r--r--drivers/s390/cio/io_sch.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/drivers/s390/cio/io_sch.h b/drivers/s390/cio/io_sch.h
index b770e4202131..f9ff7683e242 100644
--- a/drivers/s390/cio/io_sch.h
+++ b/drivers/s390/cio/io_sch.h
@@ -1,7 +1,10 @@
1#ifndef S390_IO_SCH_H 1#ifndef S390_IO_SCH_H
2#define S390_IO_SCH_H 2#define S390_IO_SCH_H
3 3
4#include <linux/types.h>
4#include <asm/schid.h> 5#include <asm/schid.h>
6#include <asm/ccwdev.h>
7#include "css.h"
5 8
6/* 9/*
7 * command-mode operation request block 10 * command-mode operation request block
@@ -68,6 +71,52 @@ struct io_subchannel_private {
68#define MAX_CIWS 8 71#define MAX_CIWS 8
69 72
70/* 73/*
74 * Possible status values for a CCW request's I/O.
75 */
76enum io_status {
77 IO_DONE,
78 IO_RUNNING,
79 IO_STATUS_ERROR,
80 IO_PATH_ERROR,
81 IO_REJECTED,
82 IO_KILLED
83};
84
85/**
86 * ccw_request - Internal CCW request.
87 * @cp: channel program to start
88 * @timeout: maximum allowable time in jiffies between start I/O and interrupt
89 * @maxretries: number of retries per I/O operation and path
90 * @lpm: mask of paths to use
91 * @check: optional callback that determines if results are final
92 * @filter: optional callback to adjust request status based on IRB data
93 * @callback: final callback
94 * @data: user-defined pointer passed to all callbacks
95 * @mask: current path mask
96 * @retries: current number of retries
97 * @drc: delayed return code
98 * @cancel: non-zero if request was cancelled
99 * @done: non-zero if request was finished
100 */
101struct ccw_request {
102 struct ccw1 *cp;
103 unsigned long timeout;
104 u16 maxretries;
105 u8 lpm;
106 int (*check)(struct ccw_device *, void *);
107 enum io_status (*filter)(struct ccw_device *, void *, struct irb *,
108 enum io_status);
109 void (*callback)(struct ccw_device *, void *, int);
110 void *data;
111 /* These fields are used internally. */
112 u8 mask;
113 u16 retries;
114 int drc;
115 int cancel:1;
116 int done:1;
117} __attribute__((packed));
118
119/*
71 * sense-id response buffer layout 120 * sense-id response buffer layout
72 */ 121 */
73struct senseid { 122struct senseid {
@@ -99,6 +148,7 @@ struct ccw_device_private {
99 unsigned long registered; 148 unsigned long registered;
100 struct ccw_dev_id dev_id; /* device id */ 149 struct ccw_dev_id dev_id; /* device id */
101 struct subchannel_id schid; /* subchannel number */ 150 struct subchannel_id schid; /* subchannel number */
151 struct ccw_request req; /* internal I/O request */
102 u8 imask; /* lpm mask for SNID/SID/SPGID */ 152 u8 imask; /* lpm mask for SNID/SID/SPGID */
103 int iretry; /* retry counter SNID/SID/SPGID */ 153 int iretry; /* retry counter SNID/SID/SPGID */
104 struct { 154 struct {