diff options
Diffstat (limited to 'drivers/s390/cio/device_ops.c')
-rw-r--r-- | drivers/s390/cio/device_ops.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/s390/cio/device_ops.c b/drivers/s390/cio/device_ops.c index f308ad55a6d..10f72c5c005 100644 --- a/drivers/s390/cio/device_ops.c +++ b/drivers/s390/cio/device_ops.c | |||
@@ -179,8 +179,8 @@ int ccw_device_start_key(struct ccw_device *cdev, struct ccw1 *cpa, | |||
179 | return -EBUSY; | 179 | return -EBUSY; |
180 | } | 180 | } |
181 | if (cdev->private->state != DEV_STATE_ONLINE || | 181 | if (cdev->private->state != DEV_STATE_ONLINE || |
182 | ((sch->schib.scsw.stctl & SCSW_STCTL_PRIM_STATUS) && | 182 | ((sch->schib.scsw.cmd.stctl & SCSW_STCTL_PRIM_STATUS) && |
183 | !(sch->schib.scsw.stctl & SCSW_STCTL_SEC_STATUS)) || | 183 | !(sch->schib.scsw.cmd.stctl & SCSW_STCTL_SEC_STATUS)) || |
184 | cdev->private->flags.doverify) | 184 | cdev->private->flags.doverify) |
185 | return -EBUSY; | 185 | return -EBUSY; |
186 | ret = cio_set_options (sch, flags); | 186 | ret = cio_set_options (sch, flags); |
@@ -379,7 +379,7 @@ int ccw_device_resume(struct ccw_device *cdev) | |||
379 | if (cdev->private->state == DEV_STATE_NOT_OPER) | 379 | if (cdev->private->state == DEV_STATE_NOT_OPER) |
380 | return -ENODEV; | 380 | return -ENODEV; |
381 | if (cdev->private->state != DEV_STATE_ONLINE || | 381 | if (cdev->private->state != DEV_STATE_ONLINE || |
382 | !(sch->schib.scsw.actl & SCSW_ACTL_SUSPENDED)) | 382 | !(sch->schib.scsw.cmd.actl & SCSW_ACTL_SUSPENDED)) |
383 | return -EINVAL; | 383 | return -EINVAL; |
384 | return cio_resume(sch); | 384 | return cio_resume(sch); |
385 | } | 385 | } |
@@ -404,7 +404,7 @@ ccw_device_call_handler(struct ccw_device *cdev) | |||
404 | * - fast notification was requested (primary status) | 404 | * - fast notification was requested (primary status) |
405 | * - unsolicited interrupts | 405 | * - unsolicited interrupts |
406 | */ | 406 | */ |
407 | stctl = cdev->private->irb.scsw.stctl; | 407 | stctl = scsw_stctl(&cdev->private->irb.scsw); |
408 | ending_status = (stctl & SCSW_STCTL_SEC_STATUS) || | 408 | ending_status = (stctl & SCSW_STCTL_SEC_STATUS) || |
409 | (stctl == (SCSW_STCTL_ALERT_STATUS | SCSW_STCTL_STATUS_PEND)) || | 409 | (stctl == (SCSW_STCTL_ALERT_STATUS | SCSW_STCTL_STATUS_PEND)) || |
410 | (stctl == SCSW_STCTL_STATUS_PEND); | 410 | (stctl == SCSW_STCTL_STATUS_PEND); |
@@ -528,14 +528,15 @@ ccw_device_stlck(struct ccw_device *cdev) | |||
528 | cio_disable_subchannel(sch); //FIXME: return code? | 528 | cio_disable_subchannel(sch); //FIXME: return code? |
529 | goto out_unlock; | 529 | goto out_unlock; |
530 | } | 530 | } |
531 | cdev->private->irb.scsw.actl |= SCSW_ACTL_START_PEND; | 531 | cdev->private->irb.scsw.cmd.actl |= SCSW_ACTL_START_PEND; |
532 | spin_unlock_irqrestore(sch->lock, flags); | 532 | spin_unlock_irqrestore(sch->lock, flags); |
533 | wait_event(cdev->private->wait_q, cdev->private->irb.scsw.actl == 0); | 533 | wait_event(cdev->private->wait_q, |
534 | cdev->private->irb.scsw.cmd.actl == 0); | ||
534 | spin_lock_irqsave(sch->lock, flags); | 535 | spin_lock_irqsave(sch->lock, flags); |
535 | cio_disable_subchannel(sch); //FIXME: return code? | 536 | cio_disable_subchannel(sch); //FIXME: return code? |
536 | if ((cdev->private->irb.scsw.dstat != | 537 | if ((cdev->private->irb.scsw.cmd.dstat != |
537 | (DEV_STAT_CHN_END|DEV_STAT_DEV_END)) || | 538 | (DEV_STAT_CHN_END|DEV_STAT_DEV_END)) || |
538 | (cdev->private->irb.scsw.cstat != 0)) | 539 | (cdev->private->irb.scsw.cmd.cstat != 0)) |
539 | ret = -EIO; | 540 | ret = -EIO; |
540 | /* Clear irb. */ | 541 | /* Clear irb. */ |
541 | memset(&cdev->private->irb, 0, sizeof(struct irb)); | 542 | memset(&cdev->private->irb, 0, sizeof(struct irb)); |