[S390] cio: remove stsch
[safe/jmp/linux-2.6] / drivers / s390 / cio / io_sch.h
index b770e42..b9ce712 100644 (file)
@@ -1,7 +1,10 @@
 #ifndef S390_IO_SCH_H
 #define S390_IO_SCH_H
 
+#include <linux/types.h>
 #include <asm/schid.h>
+#include <asm/ccwdev.h>
+#include "css.h"
 
 /*
  * command-mode operation request block
@@ -68,6 +71,52 @@ struct io_subchannel_private {
 #define MAX_CIWS 8
 
 /*
+ * Possible status values for a CCW request's I/O.
+ */
+enum io_status {
+       IO_DONE,
+       IO_RUNNING,
+       IO_STATUS_ERROR,
+       IO_PATH_ERROR,
+       IO_REJECTED,
+       IO_KILLED
+};
+
+/**
+ * ccw_request - Internal CCW request.
+ * @cp: channel program to start
+ * @timeout: maximum allowable time in jiffies between start I/O and interrupt
+ * @maxretries: number of retries per I/O operation and path
+ * @lpm: mask of paths to use
+ * @check: optional callback that determines if results are final
+ * @filter: optional callback to adjust request status based on IRB data
+ * @callback: final callback
+ * @data: user-defined pointer passed to all callbacks
+ * @mask: current path mask
+ * @retries: current number of retries
+ * @drc: delayed return code
+ * @cancel: non-zero if request was cancelled
+ * @done: non-zero if request was finished
+ */
+struct ccw_request {
+       struct ccw1 *cp;
+       unsigned long timeout;
+       u16 maxretries;
+       u8 lpm;
+       int (*check)(struct ccw_device *, void *);
+       enum io_status (*filter)(struct ccw_device *, void *, struct irb *,
+                                enum io_status);
+       void (*callback)(struct ccw_device *, void *, int);
+       void *data;
+       /* These fields are used internally. */
+       u16 mask;
+       u16 retries;
+       int drc;
+       int cancel:1;
+       int done:1;
+} __attribute__((packed));
+
+/*
  * sense-id response buffer layout
  */
 struct senseid {
@@ -96,27 +145,30 @@ struct ccw_device_private {
        struct subchannel *sch;
        int state;              /* device state */
        atomic_t onoff;
-       unsigned long registered;
        struct ccw_dev_id dev_id;       /* device id */
        struct subchannel_id schid;     /* subchannel number */
-       u8 imask;               /* lpm mask for SNID/SID/SPGID */
-       int iretry;             /* retry counter SNID/SID/SPGID */
+       struct ccw_request req;         /* internal I/O request */
+       int iretry;
+       u8 pgid_valid_mask;             /* mask of valid PGIDs */
+       u8 pgid_todo_mask;              /* mask of PGIDs to be adjusted */
        struct {
                unsigned int fast:1;    /* post with "channel end" */
                unsigned int repall:1;  /* report every interrupt status */
                unsigned int pgroup:1;  /* do path grouping */
                unsigned int force:1;   /* allow forced online */
+               unsigned int mpath:1;   /* do multipathing */
        } __attribute__ ((packed)) options;
        struct {
-               unsigned int pgid_single:1; /* use single path for Set PGID */
                unsigned int esid:1;        /* Ext. SenseID supported by HW */
                unsigned int dosense:1;     /* delayed SENSE required */
                unsigned int doverify:1;    /* delayed path verification */
                unsigned int donotify:1;    /* call notify function */
                unsigned int recog_done:1;  /* dev. recog. complete */
                unsigned int fake_irb:1;    /* deliver faked irb */
-               unsigned int intretry:1;    /* retry internal operation */
                unsigned int resuming:1;    /* recognition while resume */
+               unsigned int pgroup:1;      /* pathgroup is set up */
+               unsigned int mpath:1;       /* multipathing is set up */
+               unsigned int initialized:1; /* set if initial reference held */
        } __attribute__((packed)) flags;
        unsigned long intparm;  /* user interruption parameter */
        struct qdio_irq *qdio_data;