[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>
This commit is contained in:
parent
dbda8ce540
commit
c513d07a2d
|
@ -84,29 +84,14 @@ out_unregister:
|
|||
|
||||
arch_initcall (cio_debug_init);
|
||||
|
||||
int
|
||||
cio_set_options (struct subchannel *sch, int flags)
|
||||
int cio_set_options(struct subchannel *sch, int flags)
|
||||
{
|
||||
sch->options.suspend = (flags & DOIO_ALLOW_SUSPEND) != 0;
|
||||
sch->options.prefetch = (flags & DOIO_DENY_PREFETCH) != 0;
|
||||
sch->options.inter = (flags & DOIO_SUPPRESS_INTER) != 0;
|
||||
return 0;
|
||||
}
|
||||
struct io_subchannel_private *priv = to_io_private(sch);
|
||||
|
||||
/* FIXME: who wants to use this? */
|
||||
int
|
||||
cio_get_options (struct subchannel *sch)
|
||||
{
|
||||
int flags;
|
||||
|
||||
flags = 0;
|
||||
if (sch->options.suspend)
|
||||
flags |= DOIO_ALLOW_SUSPEND;
|
||||
if (sch->options.prefetch)
|
||||
flags |= DOIO_DENY_PREFETCH;
|
||||
if (sch->options.inter)
|
||||
flags |= DOIO_SUPPRESS_INTER;
|
||||
return flags;
|
||||
priv->options.suspend = (flags & DOIO_ALLOW_SUSPEND) != 0;
|
||||
priv->options.prefetch = (flags & DOIO_DENY_PREFETCH) != 0;
|
||||
priv->options.inter = (flags & DOIO_SUPPRESS_INTER) != 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -139,21 +124,21 @@ cio_start_key (struct subchannel *sch, /* subchannel structure */
|
|||
__u8 lpm, /* logical path mask */
|
||||
__u8 key) /* storage key */
|
||||
{
|
||||
struct io_subchannel_private *priv = to_io_private(sch);
|
||||
union orb *orb = &priv->orb;
|
||||
int ccode;
|
||||
union orb *orb;
|
||||
|
||||
CIO_TRACE_EVENT(5, "stIO");
|
||||
CIO_TRACE_EVENT(5, dev_name(&sch->dev));
|
||||
|
||||
orb = &to_io_private(sch)->orb;
|
||||
memset(orb, 0, sizeof(union orb));
|
||||
/* sch is always under 2G. */
|
||||
orb->cmd.intparm = (u32)(addr_t)sch;
|
||||
orb->cmd.fmt = 1;
|
||||
|
||||
orb->cmd.pfch = sch->options.prefetch == 0;
|
||||
orb->cmd.spnd = sch->options.suspend;
|
||||
orb->cmd.ssic = sch->options.suspend && sch->options.inter;
|
||||
orb->cmd.pfch = priv->options.prefetch == 0;
|
||||
orb->cmd.spnd = priv->options.suspend;
|
||||
orb->cmd.ssic = priv->options.suspend && priv->options.inter;
|
||||
orb->cmd.lpm = (lpm != 0) ? lpm : sch->lpm;
|
||||
#ifdef CONFIG_64BIT
|
||||
/*
|
||||
|
|
|
@ -84,13 +84,6 @@ struct subchannel {
|
|||
SUBCHANNEL_TYPE_MSG = 2,
|
||||
SUBCHANNEL_TYPE_ADM = 3,
|
||||
} st; /* subchannel type */
|
||||
|
||||
struct {
|
||||
unsigned int suspend:1; /* allow suspend */
|
||||
unsigned int prefetch:1;/* deny prefetch */
|
||||
unsigned int inter:1; /* suppress intermediate interrupts */
|
||||
} __attribute__ ((packed)) options;
|
||||
|
||||
__u8 vpm; /* verified path mask */
|
||||
__u8 lpm; /* logical path mask */
|
||||
__u8 opm; /* operational path mask */
|
||||
|
@ -118,7 +111,6 @@ extern int cio_start (struct subchannel *, struct ccw1 *, __u8);
|
|||
extern int cio_start_key (struct subchannel *, struct ccw1 *, __u8, __u8);
|
||||
extern int cio_cancel (struct subchannel *);
|
||||
extern int cio_set_options (struct subchannel *, int);
|
||||
extern int cio_get_options (struct subchannel *);
|
||||
extern int cio_update_schib(struct subchannel *sch);
|
||||
extern int cio_commit_config(struct subchannel *sch);
|
||||
|
||||
|
|
|
@ -10,7 +10,12 @@
|
|||
struct io_subchannel_private {
|
||||
union orb orb; /* operation request block */
|
||||
struct ccw1 sense_ccw; /* static ccw for sense command */
|
||||
} __attribute__ ((aligned(8)));
|
||||
struct {
|
||||
unsigned int suspend:1; /* allow suspend */
|
||||
unsigned int prefetch:1;/* deny prefetch */
|
||||
unsigned int inter:1; /* suppress intermediate interrupts */
|
||||
} __packed options;
|
||||
} __aligned(8);
|
||||
|
||||
#define to_io_private(n) ((struct io_subchannel_private *)n->private)
|
||||
#define sch_get_cdev(n) (dev_get_drvdata(&n->dev))
|
||||
|
|
Loading…
Reference in New Issue