]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[S390] Add timeouts during sense PGID, path verification and disband PGID.
authorCornelia Huck <cornelia.huck@de.ibm.com>
Wed, 4 Oct 2006 18:02:02 +0000 (20:02 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 4 Oct 2006 18:02:02 +0000 (20:02 +0200)
While the machine owns us an interrupt in these cases (and we should get
one), reality isn't always like that...

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/device_fsm.c
drivers/s390/cio/device_ops.c
drivers/s390/cio/device_pgid.c

index dace46fc32e8d74e0e12657f159295f02061663f..b67620208f36e2f463b4022a2a25e897197f3067 100644 (file)
@@ -349,6 +349,8 @@ ccw_device_done(struct ccw_device *cdev, int state)
 
        sch = to_subchannel(cdev->dev.parent);
 
+       ccw_device_set_timeout(cdev, 0);
+
        if (state != DEV_STATE_ONLINE)
                cio_disable_subchannel(sch);
 
index 93a897eebfff769c4aaddac3738d9c363291d03d..e7eeaf1c1826bede691716854272c1bf79c35297 100644 (file)
@@ -216,6 +216,9 @@ ccw_device_call_handler(struct ccw_device *cdev)
              (stctl & SCSW_STCTL_PRIM_STATUS)))
                return 0;
 
+       /* Clear pending timers for device driver initiated I/O. */
+       if (ending_status)
+               ccw_device_set_timeout(cdev, 0);
        /*
         * Now we are ready to call the device driver interrupt handler.
         */
index 8ca2d078848c90d4ce42fc0862d1fd03869b2180..84917b39de458c66ea57225e2d60a9f590e29257 100644 (file)
@@ -96,6 +96,9 @@ ccw_device_sense_pgid_start(struct ccw_device *cdev)
 {
        int ret;
 
+       /* Set a timeout of 60s */
+       ccw_device_set_timeout(cdev, 60*HZ);
+
        cdev->private->state = DEV_STATE_SENSE_PGID;
        cdev->private->imask = 0x80;
        cdev->private->iretry = 5;
@@ -480,6 +483,8 @@ ccw_device_verify_start(struct ccw_device *cdev)
                ccw_device_verify_done(cdev, -ENODEV);
                return;
        }
+       /* After 60s path verification is considered to have failed. */
+       ccw_device_set_timeout(cdev, 60*HZ);
        __ccw_device_verify_start(cdev);
 }
 
@@ -554,6 +559,9 @@ ccw_device_disband_irq(struct ccw_device *cdev, enum dev_event dev_event)
 void
 ccw_device_disband_start(struct ccw_device *cdev)
 {
+       /* After 60s disbanding is considered to have failed. */
+       ccw_device_set_timeout(cdev, 60*HZ);
+
        cdev->private->flags.pgid_single = 0;
        cdev->private->iretry = 5;
        cdev->private->imask = 0x80;