diff options
Diffstat (limited to 'drivers/s390/cio/device_fsm.c')
-rw-r--r-- | drivers/s390/cio/device_fsm.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c index ac6e0c7e43d9..35e162ba6d54 100644 --- a/drivers/s390/cio/device_fsm.c +++ b/drivers/s390/cio/device_fsm.c | |||
@@ -152,7 +152,8 @@ ccw_device_cancel_halt_clear(struct ccw_device *cdev) | |||
152 | if (cdev->private->iretry) { | 152 | if (cdev->private->iretry) { |
153 | cdev->private->iretry--; | 153 | cdev->private->iretry--; |
154 | ret = cio_halt(sch); | 154 | ret = cio_halt(sch); |
155 | return (ret == 0) ? -EBUSY : ret; | 155 | if (ret != -EBUSY) |
156 | return (ret == 0) ? -EBUSY : ret; | ||
156 | } | 157 | } |
157 | /* halt io unsuccessful. */ | 158 | /* halt io unsuccessful. */ |
158 | cdev->private->iretry = 255; /* 255 clear retries. */ | 159 | cdev->private->iretry = 255; /* 255 clear retries. */ |
@@ -266,12 +267,10 @@ ccw_device_recog_done(struct ccw_device *cdev, int state) | |||
266 | notify = 1; | 267 | notify = 1; |
267 | } | 268 | } |
268 | /* fill out sense information */ | 269 | /* fill out sense information */ |
269 | cdev->id = (struct ccw_device_id) { | 270 | cdev->id.cu_type = cdev->private->senseid.cu_type; |
270 | .cu_type = cdev->private->senseid.cu_type, | 271 | cdev->id.cu_model = cdev->private->senseid.cu_model; |
271 | .cu_model = cdev->private->senseid.cu_model, | 272 | cdev->id.dev_type = cdev->private->senseid.dev_type; |
272 | .dev_type = cdev->private->senseid.dev_type, | 273 | cdev->id.dev_model = cdev->private->senseid.dev_model; |
273 | .dev_model = cdev->private->senseid.dev_model, | ||
274 | }; | ||
275 | if (notify) { | 274 | if (notify) { |
276 | cdev->private->state = DEV_STATE_OFFLINE; | 275 | cdev->private->state = DEV_STATE_OFFLINE; |
277 | if (same_dev) { | 276 | if (same_dev) { |
@@ -565,12 +564,10 @@ ccw_device_verify_done(struct ccw_device *cdev, int err) | |||
565 | /* Deliver fake irb to device driver, if needed. */ | 564 | /* Deliver fake irb to device driver, if needed. */ |
566 | if (cdev->private->flags.fake_irb) { | 565 | if (cdev->private->flags.fake_irb) { |
567 | memset(&cdev->private->irb, 0, sizeof(struct irb)); | 566 | memset(&cdev->private->irb, 0, sizeof(struct irb)); |
568 | cdev->private->irb.scsw = (struct scsw) { | 567 | cdev->private->irb.scsw.cc = 1; |
569 | .cc = 1, | 568 | cdev->private->irb.scsw.fctl = SCSW_FCTL_START_FUNC; |
570 | .fctl = SCSW_FCTL_START_FUNC, | 569 | cdev->private->irb.scsw.actl = SCSW_ACTL_START_PEND; |
571 | .actl = SCSW_ACTL_START_PEND, | 570 | cdev->private->irb.scsw.stctl = SCSW_STCTL_STATUS_PEND; |
572 | .stctl = SCSW_STCTL_STATUS_PEND, | ||
573 | }; | ||
574 | cdev->private->flags.fake_irb = 0; | 571 | cdev->private->flags.fake_irb = 0; |
575 | if (cdev->handler) | 572 | if (cdev->handler) |
576 | cdev->handler(cdev, cdev->private->intparm, | 573 | cdev->handler(cdev, cdev->private->intparm, |
@@ -771,6 +768,7 @@ ccw_device_online_verify(struct ccw_device *cdev, enum dev_event dev_event) | |||
771 | stsch(sch->schid, &sch->schib); | 768 | stsch(sch->schid, &sch->schib); |
772 | 769 | ||
773 | if (sch->schib.scsw.actl != 0 || | 770 | if (sch->schib.scsw.actl != 0 || |
771 | (sch->schib.scsw.stctl & SCSW_STCTL_STATUS_PEND) || | ||
774 | (cdev->private->irb.scsw.stctl & SCSW_STCTL_STATUS_PEND)) { | 772 | (cdev->private->irb.scsw.stctl & SCSW_STCTL_STATUS_PEND)) { |
775 | /* | 773 | /* |
776 | * No final status yet or final status not yet delivered | 774 | * No final status yet or final status not yet delivered |