]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/s390/cio/css.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux...
[linux-2.6-omap-h63xx.git] / drivers / s390 / cio / css.h
index 5d65e83ca66e818428ccf003b2f2a4ddc4e5b365..e1913518f354fff88d3508be92edb22d1ed330e8 100644 (file)
@@ -58,64 +58,6 @@ struct pgid {
        __u32 tod_high;         /* high word TOD clock */
 } __attribute__ ((packed));
 
-#define MAX_CIWS 8
-
-/*
- * sense-id response buffer layout
- */
-struct senseid {
-       /* common part */
-       __u8  reserved;         /* always 0x'FF' */
-       __u16 cu_type;          /* control unit type */
-       __u8  cu_model;         /* control unit model */
-       __u16 dev_type;         /* device type */
-       __u8  dev_model;        /* device model */
-       __u8  unused;           /* padding byte */
-       /* extended part */
-       struct ciw ciw[MAX_CIWS];       /* variable # of CIWs */
-}  __attribute__ ((packed,aligned(4)));
-
-struct ccw_device_private {
-       struct ccw_device *cdev;
-       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 {
-               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 */
-       } __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 */
-       } __attribute__((packed)) flags;
-       unsigned long intparm;  /* user interruption parameter */
-       struct qdio_irq *qdio_data;
-       struct irb irb;         /* device status */
-       struct senseid senseid; /* SenseID info */
-       struct pgid pgid[8];    /* path group IDs per chpid*/
-       struct ccw1 iccws[2];   /* ccws for SNID/SID/SPGID commands */
-       struct work_struct kick_work;
-       wait_queue_head_t wait_q;
-       struct timer_list timer;
-       void *cmb;                      /* measurement information */
-       struct list_head cmb_list;      /* list of measured devices */
-       u64 cmb_start_time;             /* clock value of cmb reset */
-       void *cmb_wait;                 /* deferred cmb enable/disable */
-};
-
 /*
  * A css driver handles all subchannels of one type.
  * Currently, we only care about I/O subchannels (type 0), these
@@ -123,25 +65,35 @@ struct ccw_device_private {
  */
 struct subchannel;
 struct css_driver {
+       struct module *owner;
        unsigned int subchannel_type;
        struct device_driver drv;
-       void (*irq)(struct device *);
-       int (*notify)(struct device *, int);
-       void (*verify)(struct device *);
-       void (*termination)(struct device *);
+       void (*irq)(struct subchannel *);
+       int (*notify)(struct subchannel *, int);
+       void (*verify)(struct subchannel *);
+       void (*termination)(struct subchannel *);
        int (*probe)(struct subchannel *);
        int (*remove)(struct subchannel *);
        void (*shutdown)(struct subchannel *);
+       const char *name;
 };
 
+#define to_cssdriver(n) container_of(n, struct css_driver, drv)
+
 /*
  * all css_drivers have the css_bus_type
  */
 extern struct bus_type css_bus_type;
 
+extern int css_driver_register(struct css_driver *);
+extern void css_driver_unregister(struct css_driver *);
+
 extern void css_sch_device_unregister(struct subchannel *);
 extern struct subchannel * get_subchannel_by_schid(struct subchannel_id);
 extern int css_init_done;
+int for_each_subchannel_staged(int (*fn_known)(struct subchannel *, void *),
+                              int (*fn_unknown)(struct subchannel_id,
+                              void *), void *data);
 extern int for_each_subchannel(int(*fn)(struct subchannel_id, void *), void *);
 extern void css_process_crw(int, int);
 extern void css_reiterate_subchannels(void);
@@ -167,7 +119,7 @@ struct channel_subsystem {
 #define to_css(dev) container_of(dev, struct channel_subsystem, device)
 
 extern struct bus_type css_bus_type;
-extern struct channel_subsystem *css[];
+extern struct channel_subsystem *channel_subsystems[];
 
 /* Some helper functions for disconnected state. */
 int device_is_disconnected(struct subchannel *);
@@ -188,9 +140,11 @@ void css_schedule_eval(struct subchannel_id schid);
 void css_schedule_eval_all(void);
 
 int sch_is_pseudo_sch(struct subchannel *);
+struct schib;
+int css_sch_is_valid(struct schib *);
 
 extern struct workqueue_struct *slow_path_wq;
+void css_wait_for_slow_path(void);
 
-int subchannel_add_files (struct device *);
 extern struct attribute_group *subch_attr_groups[];
 #endif