Skip to content

Commit

Permalink
[S390] cio: Device status validity.
Browse files Browse the repository at this point in the history
Only accumulate device status field in irb if it is valid.

Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
  • Loading branch information
Cornelia Huck authored and Heiko Carstens committed Mar 26, 2007
1 parent b70842d commit 25c61a1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/s390/cio/device_status.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,11 @@ 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;
cdev_irb->scsw.dstat |= irb->scsw.dstat;
/* 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;
/* Copy residual count if it is valid. */
Expand Down

0 comments on commit 25c61a1

Please sign in to comment.