mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch] s390: cio chpid offline
@ 2006-06-28 14:13 Martin Schwidefsky
  0 siblings, 0 replies; only message in thread
From: Martin Schwidefsky @ 2006-06-28 14:13 UTC (permalink / raw)
  To: linux-kernel, cornelia.huck

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

[S390] cio chpid offline.

After setting a path to a dasd offline at the SE, I/O hangs on that
dasd for 5 minutes, then continues.
I/O for which an interrupt will not be reported after the channel
path has been disabled was not terminated by the common I/O layer,
causing the dasd MIH to hit after 5 minutes.

Be more aggressive in terminating I/O after setting a channel path
offline. Also make sure to generate a fake irb if the device
driver issues an I/O request after being notified of the killed
I/O and clear residual information from the irb before trying to
start the delayed verification.

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

 drivers/s390/cio/chsc.c       |    3 +--
 drivers/s390/cio/device_fsm.c |    2 ++
 drivers/s390/cio/device_ops.c |    3 ++-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff -urpN linux-2.6/drivers/s390/cio/chsc.c linux-2.6-patched/drivers/s390/cio/chsc.c
--- linux-2.6/drivers/s390/cio/chsc.c	2006-06-28 14:43:27.000000000 +0200
+++ linux-2.6-patched/drivers/s390/cio/chsc.c	2006-06-28 14:43:48.000000000 +0200
@@ -244,8 +244,7 @@ s390_subchannel_remove_chpid(struct devi
 
 	if ((sch->schib.scsw.actl & SCSW_ACTL_DEVACT) &&
 	    (sch->schib.scsw.actl & SCSW_ACTL_SCHACT) &&
-	    (sch->schib.pmcw.lpum == mask) &&
-	    (sch->vpm == 0)) {
+	    (sch->schib.pmcw.lpum == mask)) {
 		int cc;
 
 		cc = cio_clear(sch);
diff -urpN linux-2.6/drivers/s390/cio/device_fsm.c linux-2.6-patched/drivers/s390/cio/device_fsm.c
--- linux-2.6/drivers/s390/cio/device_fsm.c	2006-06-28 14:43:46.000000000 +0200
+++ linux-2.6-patched/drivers/s390/cio/device_fsm.c	2006-06-28 14:43:48.000000000 +0200
@@ -864,6 +864,8 @@ ccw_device_clear_verify(struct ccw_devic
 	irb = (struct irb *) __LC_IRB;
 	/* Accumulate status. We don't do basic sense. */
 	ccw_device_accumulate_irb(cdev, irb);
+	/* Remember to clear irb to avoid residuals. */
+	memset(&cdev->private->irb, 0, sizeof(struct irb));
 	/* Try to start delayed device verification. */
 	ccw_device_online_verify(cdev, 0);
 	/* Note: Don't call handler for cio initiated clear! */
diff -urpN linux-2.6/drivers/s390/cio/device_ops.c linux-2.6-patched/drivers/s390/cio/device_ops.c
--- linux-2.6/drivers/s390/cio/device_ops.c	2006-06-28 14:43:26.000000000 +0200
+++ linux-2.6-patched/drivers/s390/cio/device_ops.c	2006-06-28 14:43:48.000000000 +0200
@@ -78,7 +78,8 @@ ccw_device_start_key(struct ccw_device *
 		return -ENODEV;
 	if (cdev->private->state == DEV_STATE_NOT_OPER)
 		return -ENODEV;
-	if (cdev->private->state == DEV_STATE_VERIFY) {
+	if (cdev->private->state == DEV_STATE_VERIFY ||
+	    cdev->private->state == DEV_STATE_CLEAR_VERIFY) {
 		/* Remember to fake irb when finished. */
 		if (!cdev->private->flags.fake_irb) {
 			cdev->private->flags.fake_irb = 1;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-06-28 14:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-28 14:13 [patch] s390: cio chpid offline Martin Schwidefsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®