diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2008-04-30 07:38:39 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-04-30 07:38:45 -0400 |
commit | edf2209692769d3e461c0351553098bc017c2caf (patch) | |
tree | 833d40fbff5e35a06fcd3c55736d20e4e82901f6 /drivers/s390/cio/device_fsm.c | |
parent | 47494f6a84cdae2740b62e1d86a1860df85d9bbb (diff) |
[S390] cio: Make isc handling more robust.
Introduce an ->isc field in the subchannel to store the desired
interruption subclass, since sch->schib.pmcw.isc may be overwritten
by the hardware on stsch() after machine checks.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/device_fsm.c')
-rw-r--r-- | drivers/s390/cio/device_fsm.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c index 4b92c84fb438..99403b0a97a7 100644 --- a/drivers/s390/cio/device_fsm.c +++ b/drivers/s390/cio/device_fsm.c | |||
@@ -555,8 +555,7 @@ ccw_device_recognition(struct ccw_device *cdev) | |||
555 | (cdev->private->state != DEV_STATE_BOXED)) | 555 | (cdev->private->state != DEV_STATE_BOXED)) |
556 | return -EINVAL; | 556 | return -EINVAL; |
557 | sch = to_subchannel(cdev->dev.parent); | 557 | sch = to_subchannel(cdev->dev.parent); |
558 | ret = cio_enable_subchannel(sch, sch->schib.pmcw.isc, | 558 | ret = cio_enable_subchannel(sch, (u32)(addr_t)sch); |
559 | (u32)(addr_t)sch); | ||
560 | if (ret != 0) | 559 | if (ret != 0) |
561 | /* Couldn't enable the subchannel for i/o. Sick device. */ | 560 | /* Couldn't enable the subchannel for i/o. Sick device. */ |
562 | return ret; | 561 | return ret; |
@@ -667,8 +666,7 @@ ccw_device_online(struct ccw_device *cdev) | |||
667 | sch = to_subchannel(cdev->dev.parent); | 666 | sch = to_subchannel(cdev->dev.parent); |
668 | if (css_init_done && !get_device(&cdev->dev)) | 667 | if (css_init_done && !get_device(&cdev->dev)) |
669 | return -ENODEV; | 668 | return -ENODEV; |
670 | ret = cio_enable_subchannel(sch, sch->schib.pmcw.isc, | 669 | ret = cio_enable_subchannel(sch, (u32)(addr_t)sch); |
671 | (u32)(addr_t)sch); | ||
672 | if (ret != 0) { | 670 | if (ret != 0) { |
673 | /* Couldn't enable the subchannel for i/o. Sick device. */ | 671 | /* Couldn't enable the subchannel for i/o. Sick device. */ |
674 | if (ret == -ENODEV) | 672 | if (ret == -ENODEV) |
@@ -1048,8 +1046,7 @@ ccw_device_start_id(struct ccw_device *cdev, enum dev_event dev_event) | |||
1048 | struct subchannel *sch; | 1046 | struct subchannel *sch; |
1049 | 1047 | ||
1050 | sch = to_subchannel(cdev->dev.parent); | 1048 | sch = to_subchannel(cdev->dev.parent); |
1051 | if (cio_enable_subchannel(sch, sch->schib.pmcw.isc, | 1049 | if (cio_enable_subchannel(sch, (u32)(addr_t)sch) != 0) |
1052 | (u32)(addr_t)sch) != 0) | ||
1053 | /* Couldn't enable the subchannel for i/o. Sick device. */ | 1050 | /* Couldn't enable the subchannel for i/o. Sick device. */ |
1054 | return; | 1051 | return; |
1055 | 1052 | ||
@@ -1082,7 +1079,6 @@ device_trigger_reprobe(struct subchannel *sch) | |||
1082 | */ | 1079 | */ |
1083 | sch->lpm = sch->schib.pmcw.pam & sch->opm; | 1080 | sch->lpm = sch->schib.pmcw.pam & sch->opm; |
1084 | /* Re-set some bits in the pmcw that were lost. */ | 1081 | /* Re-set some bits in the pmcw that were lost. */ |
1085 | sch->schib.pmcw.isc = 3; | ||
1086 | sch->schib.pmcw.csense = 1; | 1082 | sch->schib.pmcw.csense = 1; |
1087 | sch->schib.pmcw.ena = 0; | 1083 | sch->schib.pmcw.ena = 0; |
1088 | if ((sch->lpm & (sch->lpm - 1)) != 0) | 1084 | if ((sch->lpm & (sch->lpm - 1)) != 0) |