summaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2008-07-14 09:58:48 +0200
committerHeiko Carstens <heiko.carstens@de.ibm.com>2008-07-14 10:02:06 +0200
commitb3a686f47a3615fcfec0a01c4103c50bb9621369 (patch)
tree5929e2a7cbca0148d68b822e50887bf61aa73f66 /drivers/s390/cio
parent44a1c19e3b47a7ac596808177ccd250b95f5e688 (diff)
downloadop-kernel-dev-b3a686f47a3615fcfec0a01c4103c50bb9621369.zip
op-kernel-dev-b3a686f47a3615fcfec0a01c4103c50bb9621369.tar.gz
[S390] cio: Base message subchannel handling.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r--drivers/s390/cio/cio.c30
-rw-r--r--drivers/s390/cio/cio.h2
-rw-r--r--drivers/s390/cio/css.c2
3 files changed, 27 insertions, 7 deletions
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c
index be53f0e..0511fe3 100644
--- a/drivers/s390/cio/cio.c
+++ b/drivers/s390/cio/cio.c
@@ -498,13 +498,8 @@ int cio_create_sch_lock(struct subchannel *sch)
return 0;
}
-static int cio_validate_io_subchannel(struct subchannel *sch)
+static int cio_check_devno_blacklisted(struct subchannel *sch)
{
- /* Initialization for io subchannels. */
- if (!css_sch_is_valid(&sch->schib))
- return -ENODEV;
-
- /* Devno is valid. */
if (is_blacklisted(sch->schid.ssid, sch->schib.pmcw.dev)) {
/*
* This device must not be known to Linux. So we simply
@@ -518,6 +513,26 @@ static int cio_validate_io_subchannel(struct subchannel *sch)
return 0;
}
+static int cio_validate_io_subchannel(struct subchannel *sch)
+{
+ /* Initialization for io subchannels. */
+ if (!css_sch_is_valid(&sch->schib))
+ return -ENODEV;
+
+ /* Devno is valid. */
+ return cio_check_devno_blacklisted(sch);
+}
+
+static int cio_validate_msg_subchannel(struct subchannel *sch)
+{
+ /* Initialization for message subchannels. */
+ if (!css_sch_is_valid(&sch->schib))
+ return -ENODEV;
+
+ /* Devno is valid. */
+ return cio_check_devno_blacklisted(sch);
+}
+
/**
* cio_validate_subchannel - basic validation of subchannel
* @sch: subchannel structure to be filled out
@@ -573,6 +588,9 @@ int cio_validate_subchannel(struct subchannel *sch, struct subchannel_id schid)
case SUBCHANNEL_TYPE_IO:
err = cio_validate_io_subchannel(sch);
break;
+ case SUBCHANNEL_TYPE_MSG:
+ err = cio_validate_msg_subchannel(sch);
+ break;
default:
err = 0;
}
diff --git a/drivers/s390/cio/cio.h b/drivers/s390/cio/cio.h
index 4062748..efdb9fd 100644
--- a/drivers/s390/cio/cio.h
+++ b/drivers/s390/cio/cio.h
@@ -14,7 +14,7 @@
struct pmcw {
u32 intparm; /* interruption parameter */
u32 qf : 1; /* qdio facility */
- u32 res0 : 1; /* reserved zeros */
+ u32 w : 1;
u32 isc : 3; /* interruption sublass */
u32 res5 : 3; /* reserved zeros */
u32 ena : 1; /* enabled */
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c
index bc3a8e4..062716cf 100644
--- a/drivers/s390/cio/css.c
+++ b/drivers/s390/cio/css.c
@@ -332,6 +332,8 @@ int css_sch_is_valid(struct schib *schib)
{
if ((schib->pmcw.st == SUBCHANNEL_TYPE_IO) && !schib->pmcw.dnv)
return 0;
+ if ((schib->pmcw.st == SUBCHANNEL_TYPE_MSG) && !schib->pmcw.w)
+ return 0;
return 1;
}
EXPORT_SYMBOL_GPL(css_sch_is_valid);
OpenPOWER on IntegriCloud