]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/s390/cio/cio.h
Merge branch 'fixes-jgarzik' of git://git.kernel.org/pub/scm/linux/kernel/git/linvill...
[linux-2.6-omap-h63xx.git] / drivers / s390 / cio / cio.h
index 0ca987344e07183f6b1d9bbbae5c040dc924bed9..7446c39951a716c88ad5c1f8cf4fc699aff9d050 100644 (file)
@@ -1,18 +1,12 @@
 #ifndef S390_CIO_H
 #define S390_CIO_H
 
+#include <linux/mutex.h>
+#include <linux/device.h>
+#include <asm/chpid.h>
+#include "chsc.h"
 #include "schid.h"
 
-/*
- * where we put the ssd info
- */
-struct ssd_info {
-       __u8  valid:1;
-       __u8  type:7;           /* subchannel type */
-       __u8  chpid[8];         /* chpids */
-       __u16 fla[8];           /* full link addresses */
-} __attribute__ ((packed));
-
 /*
  * path management control word
  */
@@ -86,8 +80,8 @@ struct orb {
 /* subchannel data structure used by I/O subroutines */
 struct subchannel {
        struct subchannel_id schid;
-       spinlock_t lock;        /* subchannel lock */
-
+       spinlock_t *lock;       /* subchannel lock */
+       struct mutex reg_mutex;
        enum {
                SUBCHANNEL_TYPE_IO = 0,
                SUBCHANNEL_TYPE_CHSC = 1,
@@ -107,7 +101,7 @@ struct subchannel {
        struct schib schib;     /* subchannel information block */
        struct orb orb;         /* operation request block */
        struct ccw1 sense_ccw;  /* static ccw for sense command */
-       struct ssd_info ssd_info;       /* subchannel description */
+       struct chsc_ssd_info ssd_info;  /* subchannel description */
        struct device dev;      /* entry in device tree */
        struct css_driver *driver;
 } __attribute__ ((aligned(8)));
@@ -130,15 +124,19 @@ extern int cio_set_options (struct subchannel *, int);
 extern int cio_get_options (struct subchannel *);
 extern int cio_modify (struct subchannel *);
 
+int cio_create_sch_lock(struct subchannel *);
+
 /* Use with care. */
 #ifdef CONFIG_CCW_CONSOLE
 extern struct subchannel *cio_probe_console(void);
 extern void cio_release_console(void);
 extern int cio_is_console(struct subchannel_id);
 extern struct subchannel *cio_get_console_subchannel(void);
+extern spinlock_t * cio_get_console_lock(void);
 #else
 #define cio_is_console(schid) 0
 #define cio_get_console_subchannel() NULL
+#define cio_get_console_lock() NULL;
 #endif
 
 extern int cio_show_msg;