public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: [patch 06/14] cio: Base message subchannel handling.
Date: Tue, 03 Jun 2008 18:59:05 +0200	[thread overview]
Message-ID: <20080603170519.787597406@de.ibm.com> (raw)
In-Reply-To: 20080603165859.107949986@de.ibm.com

[-- Attachment #1: 105-cio-msg-subchannel.diff --]
[-- Type: text/plain, Size: 2929 bytes --]

From: Cornelia Huck <cornelia.huck@de.ibm.com>

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---

 drivers/s390/cio/cio.c |   30 ++++++++++++++++++++++++------
 drivers/s390/cio/cio.h |    2 +-
 drivers/s390/cio/css.c |    2 ++
 3 files changed, 27 insertions(+), 7 deletions(-)

Index: quilt-2.6/drivers/s390/cio/cio.c
===================================================================
--- quilt-2.6.orig/drivers/s390/cio/cio.c
+++ quilt-2.6/drivers/s390/cio/cio.c
@@ -498,13 +498,8 @@ int cio_create_sch_lock(struct subchanne
 	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(st
 	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 subch
 	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;
 	}
Index: quilt-2.6/drivers/s390/cio/cio.h
===================================================================
--- quilt-2.6.orig/drivers/s390/cio/cio.h
+++ quilt-2.6/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 */
Index: quilt-2.6/drivers/s390/cio/css.c
===================================================================
--- quilt-2.6.orig/drivers/s390/cio/css.c
+++ quilt-2.6/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);

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.

  parent reply	other threads:[~2008-06-03 16:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-03 16:58 [patch 00/14] s390 feature patches for 2.6.27 Martin Schwidefsky
2008-06-03 16:59 ` [patch 01/14] cio: Register all subchannels Martin Schwidefsky
2008-06-03 16:59 ` [patch 02/14] cio: Introduce modalias for css bus Martin Schwidefsky
2008-06-03 16:59 ` [patch 03/14] cio: Rework css driver Martin Schwidefsky
2008-06-03 16:59 ` [patch 04/14] cio: Cleanup crw interface Martin Schwidefsky
2008-06-03 16:59 ` [patch 05/14] cio: Export some symbols for modular css drivers Martin Schwidefsky
2008-06-03 16:59 ` Martin Schwidefsky [this message]
2008-06-03 16:59 ` [patch 07/14] cio: introduce fcx bit to chsc characteristics Martin Schwidefsky
2008-06-03 16:59 ` [patch 08/14] cio: introduce fcx enabled scsw format Martin Schwidefsky
2008-06-03 16:59 ` [patch 09/14] cio: provide functions for fcx enabled I/O Martin Schwidefsky
2008-06-03 16:59 ` [patch 10/14] cio: provide helper " Martin Schwidefsky
2008-06-03 16:59 ` [patch 11/14] cio: remove lock from ccw_device_oper_notify Martin Schwidefsky
2008-06-03 16:59 ` [patch 12/14] Introduce user_regset accessors for s390 Martin Schwidefsky
2008-06-03 16:59 ` [patch 13/14] initrd vs bss section clearing Martin Schwidefsky
2008-06-03 16:59 ` [patch 14/14] stp support Martin Schwidefsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080603170519.787597406@de.ibm.com \
    --to=schwidefsky@de.ibm.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox