aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/chsc.c
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2008-01-26 08:10:45 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-01-26 08:11:01 -0500
commitb279a4f56d5476a0b9b0a97397f7a7bbe00b9b2f (patch)
tree8f6fe1b5e68ecc0684a88fb67bd6179cf6c59707 /drivers/s390/cio/chsc.c
parent4e8e56c6713398f417317d449f50c08bf2756c66 (diff)
[S390] cio: I/O subchannel specific fields.
Some fields may be !0 only for I/O subchannels. Add some checks where required. Also adapt cio_enable_subchannel() to make the caller specify the intparm, which makes it more generic. 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/chsc.c')
-rw-r--r--drivers/s390/cio/chsc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c
index 44a2ea40806e..12a344c66b46 100644
--- a/drivers/s390/cio/chsc.c
+++ b/drivers/s390/cio/chsc.c
@@ -89,7 +89,8 @@ int chsc_get_ssd_info(struct subchannel_id schid, struct chsc_ssd_info *ssd)
89 /* Copy data */ 89 /* Copy data */
90 ret = 0; 90 ret = 0;
91 memset(ssd, 0, sizeof(struct chsc_ssd_info)); 91 memset(ssd, 0, sizeof(struct chsc_ssd_info));
92 if ((ssd_area->st != 0) && (ssd_area->st != 2)) 92 if ((ssd_area->st != SUBCHANNEL_TYPE_IO) &&
93 (ssd_area->st != SUBCHANNEL_TYPE_MSG))
93 goto out_free; 94 goto out_free;
94 ssd->path_mask = ssd_area->path_mask; 95 ssd->path_mask = ssd_area->path_mask;
95 ssd->fla_valid_mask = ssd_area->fla_valid_mask; 96 ssd->fla_valid_mask = ssd_area->fla_valid_mask;
@@ -158,7 +159,7 @@ s390_subchannel_remove_chpid(struct device *dev, void *data)
158 spin_lock_irq(sch->lock); 159 spin_lock_irq(sch->lock);
159 160
160 stsch(sch->schid, &schib); 161 stsch(sch->schid, &schib);
161 if (!schib.pmcw.dnv) 162 if (!css_sch_is_valid(&schib))
162 goto out_unreg; 163 goto out_unreg;
163 memcpy(&sch->schib, &schib, sizeof(struct schib)); 164 memcpy(&sch->schib, &schib, sizeof(struct schib));
164 /* Check for single path devices. */ 165 /* Check for single path devices. */