Skip to contentSkip to conversation

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

PATCH New Martin Schwidefsky 1 participant 1 message Jul 28, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390: permanent subchannel busy conditions may cause I/O stall

From: Peter Oberparleiter <[email protected]>

[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.

---

 drivers/s390/cio/device_fsm.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)
drivers/s390/cio/device_fsm.c +2 -1
diff -urpN linux-2.6/drivers/s390/cio/device_fsm.c linux-2.6-patched/drivers/s390/cio/device_fsm.c
@@ -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. */