aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2011-03-15 12:08:25 -0400
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2011-03-15 12:08:23 -0400
commitc513d07a2df0f7076c1707274e29737f09df3b7f (patch)
tree00d9a5cdbfdbb3e4dcd9f6d90758764466c53c4e /drivers/s390
parentdbda8ce5407c731a0108a35db3e058d5d350dd80 (diff)
[S390] cio: move options to io_sch_private
Move the options member from struct subchannel to io_subchannel_private since it's I/O subchannel specific. Also remove the unused cio_get_options function. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/cio/cio.c37
-rw-r--r--drivers/s390/cio/cio.h8
-rw-r--r--drivers/s390/cio/io_sch.h7
3 files changed, 17 insertions, 35 deletions
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c
index f3147542e52e..cbde448f9947 100644
--- a/drivers/s390/cio/cio.c
+++ b/drivers/s390/cio/cio.c
@@ -84,29 +84,14 @@ out_unregister:
84 84
85arch_initcall (cio_debug_init); 85arch_initcall (cio_debug_init);
86 86
87int 87int cio_set_options(struct subchannel *sch, int flags)
88cio_set_options (struct subchannel *sch, int flags)
89{ 88{
90 sch->options.suspend = (flags & DOIO_ALLOW_SUSPEND) != 0; 89 struct io_subchannel_private *priv = to_io_private(sch);
91 sch->options.prefetch = (flags & DOIO_DENY_PREFETCH) != 0;
92 sch->options.inter = (flags & DOIO_SUPPRESS_INTER) != 0;
93 return 0;
94}
95 90
96/* FIXME: who wants to use this? */ 91 priv->options.suspend = (flags & DOIO_ALLOW_SUSPEND) != 0;
97int 92 priv->options.prefetch = (flags & DOIO_DENY_PREFETCH) != 0;
98cio_get_options (struct subchannel *sch) 93 priv->options.inter = (flags & DOIO_SUPPRESS_INTER) != 0;
99{ 94 return 0;
100 int flags;
101
102 flags = 0;
103 if (sch->options.suspend)
104 flags |= DOIO_ALLOW_SUSPEND;
105 if (sch->options.prefetch)
106 flags |= DOIO_DENY_PREFETCH;
107 if (sch->options.inter)
108 flags |= DOIO_SUPPRESS_INTER;
109 return flags;
110} 95}
111 96
112static int 97static int
@@ -139,21 +124,21 @@ cio_start_key (struct subchannel *sch, /* subchannel structure */
139 __u8 lpm, /* logical path mask */ 124 __u8 lpm, /* logical path mask */
140 __u8 key) /* storage key */ 125 __u8 key) /* storage key */
141{ 126{
127 struct io_subchannel_private *priv = to_io_private(sch);
128 union orb *orb = &priv->orb;
142 int ccode; 129 int ccode;
143 union orb *orb;
144 130
145 CIO_TRACE_EVENT(5, "stIO"); 131 CIO_TRACE_EVENT(5, "stIO");
146 CIO_TRACE_EVENT(5, dev_name(&sch->dev)); 132 CIO_TRACE_EVENT(5, dev_name(&sch->dev));
147 133
148 orb = &to_io_private(sch)->orb;
149 memset(orb, 0, sizeof(union orb)); 134 memset(orb, 0, sizeof(union orb));
150 /* sch is always under 2G. */ 135 /* sch is always under 2G. */
151 orb->cmd.intparm = (u32)(addr_t)sch; 136 orb->cmd.intparm = (u32)(addr_t)sch;
152 orb->cmd.fmt = 1; 137 orb->cmd.fmt = 1;
153 138
154 orb->cmd.pfch = sch->options.prefetch == 0; 139 orb->cmd.pfch = priv->options.prefetch == 0;
155 orb->cmd.spnd = sch->options.suspend; 140 orb->cmd.spnd = priv->options.suspend;
156 orb->cmd.ssic = sch->options.suspend && sch->options.inter; 141 orb->cmd.ssic = priv->options.suspend && priv->options.inter;
157 orb->cmd.lpm = (lpm != 0) ? lpm : sch->lpm; 142 orb->cmd.lpm = (lpm != 0) ? lpm : sch->lpm;
158#ifdef CONFIG_64BIT 143#ifdef CONFIG_64BIT
159 /* 144 /*
diff --git a/drivers/s390/cio/cio.h b/drivers/s390/cio/cio.h
index 7a9032d01fb8..bdbbe7c4c1a2 100644
--- a/drivers/s390/cio/cio.h
+++ b/drivers/s390/cio/cio.h
@@ -84,13 +84,6 @@ struct subchannel {
84 SUBCHANNEL_TYPE_MSG = 2, 84 SUBCHANNEL_TYPE_MSG = 2,
85 SUBCHANNEL_TYPE_ADM = 3, 85 SUBCHANNEL_TYPE_ADM = 3,
86 } st; /* subchannel type */ 86 } st; /* subchannel type */
87
88 struct {
89 unsigned int suspend:1; /* allow suspend */
90 unsigned int prefetch:1;/* deny prefetch */
91 unsigned int inter:1; /* suppress intermediate interrupts */
92 } __attribute__ ((packed)) options;
93
94 __u8 vpm; /* verified path mask */ 87 __u8 vpm; /* verified path mask */
95 __u8 lpm; /* logical path mask */ 88 __u8 lpm; /* logical path mask */
96 __u8 opm; /* operational path mask */ 89 __u8 opm; /* operational path mask */
@@ -118,7 +111,6 @@ extern int cio_start (struct subchannel *, struct ccw1 *, __u8);
118extern int cio_start_key (struct subchannel *, struct ccw1 *, __u8, __u8); 111extern int cio_start_key (struct subchannel *, struct ccw1 *, __u8, __u8);
119extern int cio_cancel (struct subchannel *); 112extern int cio_cancel (struct subchannel *);
120extern int cio_set_options (struct subchannel *, int); 113extern int cio_set_options (struct subchannel *, int);
121extern int cio_get_options (struct subchannel *);
122extern int cio_update_schib(struct subchannel *sch); 114extern int cio_update_schib(struct subchannel *sch);
123extern int cio_commit_config(struct subchannel *sch); 115extern int cio_commit_config(struct subchannel *sch);
124 116
diff --git a/drivers/s390/cio/io_sch.h b/drivers/s390/cio/io_sch.h
index 36870d9f108a..8271a1f9860c 100644
--- a/drivers/s390/cio/io_sch.h
+++ b/drivers/s390/cio/io_sch.h
@@ -10,7 +10,12 @@
10struct io_subchannel_private { 10struct io_subchannel_private {
11 union orb orb; /* operation request block */ 11 union orb orb; /* operation request block */
12 struct ccw1 sense_ccw; /* static ccw for sense command */ 12 struct ccw1 sense_ccw; /* static ccw for sense command */
13} __attribute__ ((aligned(8))); 13 struct {
14 unsigned int suspend:1; /* allow suspend */
15 unsigned int prefetch:1;/* deny prefetch */
16 unsigned int inter:1; /* suppress intermediate interrupts */
17 } __packed options;
18} __aligned(8);
14 19
15#define to_io_private(n) ((struct io_subchannel_private *)n->private) 20#define to_io_private(n) ((struct io_subchannel_private *)n->private)
16#define sch_get_cdev(n) (dev_get_drvdata(&n->dev)) 21#define sch_get_cdev(n) (dev_get_drvdata(&n->dev))