2006-10-04 18:01:15

by Martin Schwidefsky

[permalink] [raw]
Subject: [S390] cio: improve unit check handling for internal operations

From: Peter Oberparleiter <[email protected]>

[S390] cio: improve unit check handling for internal operations

Retry internal operation after unit check instead of aborting them.

Signed-off-by: Peter Oberparleiter <[email protected]>
Signed-off-by: Martin Schwidefsky <[email protected]>
---

drivers/s390/cio/device_ops.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diff -urpN linux-2.6/drivers/s390/cio/device_ops.c linux-2.6-patched/drivers/s390/cio/device_ops.c
--- linux-2.6/drivers/s390/cio/device_ops.c 2006-10-04 19:53:54.000000000 +0200
+++ linux-2.6-patched/drivers/s390/cio/device_ops.c 2006-10-04 19:53:54.000000000 +0200
@@ -288,10 +288,10 @@ ccw_device_wake_up(struct ccw_device *cd
if (cdev->private->flags.doverify ||
cdev->private->state == DEV_STATE_VERIFY)
cdev->private->intparm = -EAGAIN;
- if ((irb->scsw.dstat & DEV_STAT_UNIT_CHECK) &&
- !(irb->ecw[0] &
- (SNS0_CMD_REJECT | SNS0_INTERVENTION_REQ)))
- cdev->private->intparm = -EAGAIN;
+ else if ((irb->scsw.dstat & DEV_STAT_UNIT_CHECK) &&
+ !(irb->ecw[0] &
+ (SNS0_CMD_REJECT | SNS0_INTERVENTION_REQ)))
+ cdev->private->intparm = -EAGAIN;
else if ((irb->scsw.dstat & DEV_STAT_ATTENTION) &&
(irb->scsw.dstat & DEV_STAT_DEV_END) &&
(irb->scsw.dstat & DEV_STAT_UNIT_EXCEP))