aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/css.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-01-26 22:52:53 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2008-01-26 22:52:53 -0800
commit0444fa78751260b38f0db3418e001bf86593f05f (patch)
treeffd3bd72c7078d705216ef156cae63d990125113 /drivers/s390/cio/css.h
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6 (diff)
parent[S390] replace lock_cpu_hotplug with get_online_cpus (diff)
downloadlinux-dev-0444fa78751260b38f0db3418e001bf86593f05f.tar.xz
linux-dev-0444fa78751260b38f0db3418e001bf86593f05f.zip
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: (56 commits) [S390] replace lock_cpu_hotplug with get_online_cpus [S390] usage of s390dbf: shrink number of debug areas to use. [S390] constify function pointer tables. [S390] do local_irq_restore while spinning in spin_lock_irqsave. [S390] add smp_call_function_mask [S390] dasd: fix loop in request expiration handling [S390] Unused field / extern declaration in processor.h [S390] Remove TOPDIR from Makefile [S390] dasd: add hyper PAV support to DASD device driver, part 1 [S390] single-step cleanup [S390] Move NOTES and BUG_TABLE. [S390] drivers/s390/: Spelling fixes [S390] include/asm-s390/: Spelling fixes [S390] arch/s390/: Spelling fixes [S390] Use diag308 subcodes 3 and 6 for reboot and dump when possible. [S390] vmemmap: allocate struct pages before 1:1 mapping [S390] Initialize sclp_ipl_info [S390] Allocate and free cpu lowcores and stacks when needed/possible. [S390] use LIST_HEAD instead of LIST_HEAD_INIT [S390] Load disabled wait psw instead of stopping cpu on halt. ...
Diffstat (limited to 'drivers/s390/cio/css.h')
-rw-r--r--drivers/s390/cio/css.h78
1 files changed, 16 insertions, 62 deletions
diff --git a/drivers/s390/cio/css.h b/drivers/s390/cio/css.h
index 81215ef32435..b70554523552 100644
--- a/drivers/s390/cio/css.h
+++ b/drivers/s390/cio/css.h
@@ -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);
@@ -188,6 +140,8 @@ 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;