[patch] s390: permanent subchannel busy conditions may cause I/O stall

From: Martin Schwidefsky
Date: Fri Jul 28 2006 - 04:55:43 EST


From: Peter Oberparleiter <peter.oberparleiter@xxxxxxxxxx>

[S390] permanent subchannel busy conditions may cause I/O stall

In special conditions where a subchannel rejects the HALT I/O-
instruction with a busy indication (cc 2), I/O may stall.
I/O request termination logic retries HALT I/O indefinitely
because it expects HALT I/O to alter the subchannel status which
is not true when cc 2 is returned.
In case of a busy indication, try CLEAR I/O instruction immediately.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@xxxxxxxxxx>
Signed-off-by: Martin Schwidefsky <schwidefsky@xxxxxxxxxx>
---

drivers/s390/cio/device_fsm.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)

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-07-27 13:52:22.000000000 +0200
+++ linux-2.6-patched/drivers/s390/cio/device_fsm.c 2006-07-27 13:52:39.000000000 +0200
@@ -152,7 +152,8 @@ ccw_device_cancel_halt_clear(struct ccw_
if (cdev->private->iretry) {
cdev->private->iretry--;
ret = cio_halt(sch);
- return (ret == 0) ? -EBUSY : ret;
+ if (ret != -EBUSY)
+ return (ret == 0) ? -EBUSY : ret;
}
/* halt io unsuccessful. */
cdev->private->iretry = 255; /* 255 clear retries. */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/