]> err.no Git - linux-2.6/commitdiff
[S390] cio: add timeout handler for internal operations.
authorPeter Oberparleiter <peter.oberparleiter@de.ibm.com>
Wed, 4 Oct 2006 18:02:26 +0000 (20:02 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 4 Oct 2006 18:02:26 +0000 (20:02 +0200)
Add timeout handler for common-I/O-layer-internal I/O operations.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/device_ops.c

index e7eeaf1c1826bede691716854272c1bf79c35297..8994800dba4aa7e852c818d5219b111678dba6b8 100644 (file)
@@ -312,7 +312,10 @@ __ccw_device_retry_loop(struct ccw_device *cdev, struct ccw1 *ccw, long magic, _
 
        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);