diff options
-rw-r--r-- | drivers/s390/cio/device_fsm.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c index b302779e7cff..180b3bf8b90d 100644 --- a/drivers/s390/cio/device_fsm.c +++ b/drivers/s390/cio/device_fsm.c | |||
@@ -827,6 +827,17 @@ ccw_device_w4sense(struct ccw_device *cdev, enum dev_event dev_event) | |||
827 | } | 827 | } |
828 | return; | 828 | return; |
829 | } | 829 | } |
830 | /* | ||
831 | * Check if a halt or clear has been issued in the meanwhile. If yes, | ||
832 | * only deliver the halt/clear interrupt to the device driver as if it | ||
833 | * had killed the original request. | ||
834 | */ | ||
835 | if (irb->scsw.fctl & (SCSW_FCTL_CLEAR_FUNC | SCSW_FCTL_HALT_FUNC)) { | ||
836 | cdev->private->flags.dosense = 0; | ||
837 | memset(&cdev->private->irb, 0, sizeof(struct irb)); | ||
838 | ccw_device_accumulate_irb(cdev, irb); | ||
839 | goto call_handler; | ||
840 | } | ||
830 | /* Add basic sense info to irb. */ | 841 | /* Add basic sense info to irb. */ |
831 | ccw_device_accumulate_basic_sense(cdev, irb); | 842 | ccw_device_accumulate_basic_sense(cdev, irb); |
832 | if (cdev->private->flags.dosense) { | 843 | if (cdev->private->flags.dosense) { |
@@ -834,6 +845,7 @@ ccw_device_w4sense(struct ccw_device *cdev, enum dev_event dev_event) | |||
834 | ccw_device_do_sense(cdev, irb); | 845 | ccw_device_do_sense(cdev, irb); |
835 | return; | 846 | return; |
836 | } | 847 | } |
848 | call_handler: | ||
837 | cdev->private->state = DEV_STATE_ONLINE; | 849 | cdev->private->state = DEV_STATE_ONLINE; |
838 | /* Call the handler. */ | 850 | /* Call the handler. */ |
839 | if (ccw_device_call_handler(cdev) && cdev->private->flags.doverify) | 851 | if (ccw_device_call_handler(cdev) && cdev->private->flags.doverify) |