Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 25c61a1f authored by Cornelia Huck's avatar Cornelia Huck Committed by Heiko Carstens
Browse files

[S390] cio: Device status validity.



Only accumulate device status field in irb if it is valid.

Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
parent b70842df
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -263,6 +263,10 @@ ccw_device_accumulate_irb(struct ccw_device *cdev, struct irb *irb)
		cdev_irb->scsw.cpa = irb->scsw.cpa;
	/* Accumulate device status, but not the device busy flag. */
	cdev_irb->scsw.dstat &= ~DEV_STAT_BUSY;
	/* dstat is not always valid. */
	if (irb->scsw.stctl &
	    (SCSW_STCTL_PRIM_STATUS | SCSW_STCTL_SEC_STATUS
	     | SCSW_STCTL_INTER_STATUS | SCSW_STCTL_ALERT_STATUS))
		cdev_irb->scsw.dstat |= irb->scsw.dstat;
	/* Accumulate subchannel status. */
	cdev_irb->scsw.cstat |= irb->scsw.cstat;