From 8c3ce5bece2e6e233c1d05b460883046d020fbf9 Mon Sep 17 00:00:00 2001 From: Cornelia Huck Date: Wed, 4 Apr 2007 14:37:11 +0200 Subject: [S390] cio: Fix handling of interrupt for csch(). Wipe internal irb if the clear function bit is set before accumulating bits from the irb in order to follow hardware behaviour. Signed-off-by: Cornelia Huck Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- drivers/s390/cio/device_status.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/s390/cio') diff --git a/drivers/s390/cio/device_status.c b/drivers/s390/cio/device_status.c index 25d99bd2808..aa96e675259 100644 --- a/drivers/s390/cio/device_status.c +++ b/drivers/s390/cio/device_status.c @@ -221,6 +221,14 @@ ccw_device_accumulate_irb(struct ccw_device *cdev, struct irb *irb) cdev_irb = &cdev->private->irb; + /* + * If the clear function had been performed, all formerly pending + * status at the subchannel has been cleared and we must not pass + * intermediate accumulated status to the device driver. + */ + if (irb->scsw.fctl & SCSW_FCTL_CLEAR_FUNC) + memset(&cdev->private->irb, 0, sizeof(struct irb)); + /* Copy bits which are valid only for the start function. */ if (irb->scsw.fctl & SCSW_FCTL_START_FUNC) { /* Copy key. */ -- cgit v1.2.3-70-g09d2