diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2006-10-04 14:02:02 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-10-04 14:02:02 -0400 |
commit | f1ee3281bedbbca70a1f53bc715ea6f27c616052 (patch) | |
tree | f5615111db312f3a429a66aa62119803d781078a /drivers/s390 | |
parent | b05e37035298148b6c311eccf06ac50fd389f0b2 (diff) |
[S390] Add timeouts during sense PGID, path verification and disband PGID.
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>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/cio/device_fsm.c | 2 | ||||
-rw-r--r-- | drivers/s390/cio/device_ops.c | 3 | ||||
-rw-r--r-- | drivers/s390/cio/device_pgid.c | 8 |
3 files changed, 13 insertions, 0 deletions
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c index dace46fc32e8..b67620208f36 100644 --- a/drivers/s390/cio/device_fsm.c +++ b/drivers/s390/cio/device_fsm.c | |||
@@ -349,6 +349,8 @@ ccw_device_done(struct ccw_device *cdev, int state) | |||
349 | 349 | ||
350 | sch = to_subchannel(cdev->dev.parent); | 350 | sch = to_subchannel(cdev->dev.parent); |
351 | 351 | ||
352 | ccw_device_set_timeout(cdev, 0); | ||
353 | |||
352 | if (state != DEV_STATE_ONLINE) | 354 | if (state != DEV_STATE_ONLINE) |
353 | cio_disable_subchannel(sch); | 355 | cio_disable_subchannel(sch); |
354 | 356 | ||
diff --git a/drivers/s390/cio/device_ops.c b/drivers/s390/cio/device_ops.c index 93a897eebfff..e7eeaf1c1826 100644 --- a/drivers/s390/cio/device_ops.c +++ b/drivers/s390/cio/device_ops.c | |||
@@ -216,6 +216,9 @@ ccw_device_call_handler(struct ccw_device *cdev) | |||
216 | (stctl & SCSW_STCTL_PRIM_STATUS))) | 216 | (stctl & SCSW_STCTL_PRIM_STATUS))) |
217 | return 0; | 217 | return 0; |
218 | 218 | ||
219 | /* Clear pending timers for device driver initiated I/O. */ | ||
220 | if (ending_status) | ||
221 | ccw_device_set_timeout(cdev, 0); | ||
219 | /* | 222 | /* |
220 | * Now we are ready to call the device driver interrupt handler. | 223 | * Now we are ready to call the device driver interrupt handler. |
221 | */ | 224 | */ |
diff --git a/drivers/s390/cio/device_pgid.c b/drivers/s390/cio/device_pgid.c index 8ca2d078848c..84917b39de45 100644 --- a/drivers/s390/cio/device_pgid.c +++ b/drivers/s390/cio/device_pgid.c | |||
@@ -96,6 +96,9 @@ ccw_device_sense_pgid_start(struct ccw_device *cdev) | |||
96 | { | 96 | { |
97 | int ret; | 97 | int ret; |
98 | 98 | ||
99 | /* Set a timeout of 60s */ | ||
100 | ccw_device_set_timeout(cdev, 60*HZ); | ||
101 | |||
99 | cdev->private->state = DEV_STATE_SENSE_PGID; | 102 | cdev->private->state = DEV_STATE_SENSE_PGID; |
100 | cdev->private->imask = 0x80; | 103 | cdev->private->imask = 0x80; |
101 | cdev->private->iretry = 5; | 104 | cdev->private->iretry = 5; |
@@ -480,6 +483,8 @@ ccw_device_verify_start(struct ccw_device *cdev) | |||
480 | ccw_device_verify_done(cdev, -ENODEV); | 483 | ccw_device_verify_done(cdev, -ENODEV); |
481 | return; | 484 | return; |
482 | } | 485 | } |
486 | /* After 60s path verification is considered to have failed. */ | ||
487 | ccw_device_set_timeout(cdev, 60*HZ); | ||
483 | __ccw_device_verify_start(cdev); | 488 | __ccw_device_verify_start(cdev); |
484 | } | 489 | } |
485 | 490 | ||
@@ -554,6 +559,9 @@ ccw_device_disband_irq(struct ccw_device *cdev, enum dev_event dev_event) | |||
554 | void | 559 | void |
555 | ccw_device_disband_start(struct ccw_device *cdev) | 560 | ccw_device_disband_start(struct ccw_device *cdev) |
556 | { | 561 | { |
562 | /* After 60s disbanding is considered to have failed. */ | ||
563 | ccw_device_set_timeout(cdev, 60*HZ); | ||
564 | |||
557 | cdev->private->flags.pgid_single = 0; | 565 | cdev->private->flags.pgid_single = 0; |
558 | cdev->private->iretry = 5; | 566 | cdev->private->iretry = 5; |
559 | cdev->private->imask = 0x80; | 567 | cdev->private->imask = 0x80; |