diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2008-12-25 07:39:13 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-12-25 07:39:10 -0500 |
commit | 13952ec12dfeea793ff83c2a96139ed57eb0b897 (patch) | |
tree | 3311df62a1794bf95f78b2c57f25f0a79dc84523 /drivers/s390/cio/device_fsm.c | |
parent | cdb912a40df8b8507ab60b3d52f9980c0ba1f44d (diff) |
[S390] cio: introduce cio_commit_config
To change the configuration of a subchannel we alter the modifiable
bits of the subchannel's schib field and issue a modify subchannel.
There can be the case that not all changes were applied -or worse-
quietly overwritten by the hardware. With the next store subchannel
we obtain the current state of the hardware but lose our target
configuration.
With this patch we introduce a subchannel_config structure which
contains the target subchannel configuration. Additionally the msch
wrapper cio_modify is replaced with cio_commit_config which
copies the desired changes to a temporary schib. msch is then
called with the temporary schib. This schib is only written back
to the subchannel if all changes were applied.
Signed-off-by: Sebastian Ott <sebott@linux.vnet.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 | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c index e1a3786779ba..9e249675c98d 100644 --- a/drivers/s390/cio/device_fsm.c +++ b/drivers/s390/cio/device_fsm.c | |||
@@ -1026,11 +1026,12 @@ void ccw_device_trigger_reprobe(struct ccw_device *cdev) | |||
1026 | * we have before performing device selection :/ | 1026 | * we have before performing device selection :/ |
1027 | */ | 1027 | */ |
1028 | sch->lpm = sch->schib.pmcw.pam & sch->opm; | 1028 | sch->lpm = sch->schib.pmcw.pam & sch->opm; |
1029 | /* Re-set some bits in the pmcw that were lost. */ | 1029 | /* |
1030 | sch->schib.pmcw.csense = 1; | 1030 | * Use the initial configuration since we can't be shure that the old |
1031 | sch->schib.pmcw.ena = 0; | 1031 | * paths are valid. |
1032 | if ((sch->lpm & (sch->lpm - 1)) != 0) | 1032 | */ |
1033 | sch->schib.pmcw.mp = 1; | 1033 | io_subchannel_init_config(sch); |
1034 | |||
1034 | /* We should also udate ssd info, but this has to wait. */ | 1035 | /* We should also udate ssd info, but this has to wait. */ |
1035 | /* Check if this is another device which appeared on the same sch. */ | 1036 | /* Check if this is another device which appeared on the same sch. */ |
1036 | if (sch->schib.pmcw.dev != cdev->private->dev_id.devno) { | 1037 | if (sch->schib.pmcw.dev != cdev->private->dev_id.devno) { |