Skip to contentSkip to conversation

cio: add timeout handler for internal operations.

S390 Martin Schwidefsky 1 participant 1 message Oct 4, 2006

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

From: Peter Oberparleiter <[email protected]>

[S390] cio: add timeout handler for internal operations.

Add timeout handler for common-I/O-layer-internal I/O operations.

---

 drivers/s390/cio/device_ops.c |    3 +++
 1 files changed, 3 insertions(+)
drivers/s390/cio/device_ops.c +3 -0
diff -urpN linux-2.6/drivers/s390/cio/device_ops.c linux-2.6-patched/drivers/s390/cio/device_ops.c
@@ -312,7 +312,10 @@ __ccw_device_retry_loop(struct ccw_devic
 
 	sch = to_subchannel(cdev->dev.parent);
 	do {
+		ccw_device_set_timeout(cdev, 60 * HZ);
 		ret = cio_start (sch, ccw, lpm);
+		if (ret != 0)
+			ccw_device_set_timeout(cdev, 0);
 		if (ret == -EBUSY) {
 			/* Try again later. */
 			spin_unlock_irq(&sch->lock);