diff options
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/cio/cio.c | 2 | ||||
-rw-r--r-- | drivers/s390/cio/device_ops.c | 15 |
2 files changed, 15 insertions, 2 deletions
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index 61eb7caa1567..54cce542a1ee 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c | |||
@@ -191,7 +191,7 @@ cio_start_key (struct subchannel *sch, /* subchannel structure */ | |||
191 | sch->orb.pfch = sch->options.prefetch == 0; | 191 | sch->orb.pfch = sch->options.prefetch == 0; |
192 | sch->orb.spnd = sch->options.suspend; | 192 | sch->orb.spnd = sch->options.suspend; |
193 | sch->orb.ssic = sch->options.suspend && sch->options.inter; | 193 | sch->orb.ssic = sch->options.suspend && sch->options.inter; |
194 | sch->orb.lpm = (lpm != 0) ? (lpm & sch->opm) : sch->lpm; | 194 | sch->orb.lpm = (lpm != 0) ? lpm : sch->lpm; |
195 | #ifdef CONFIG_64BIT | 195 | #ifdef CONFIG_64BIT |
196 | /* | 196 | /* |
197 | * for 64 bit we always support 64 bit IDAWs with 4k page size only | 197 | * for 64 bit we always support 64 bit IDAWs with 4k page size only |
diff --git a/drivers/s390/cio/device_ops.c b/drivers/s390/cio/device_ops.c index 9e3de0bd59b5..acad8f852eda 100644 --- a/drivers/s390/cio/device_ops.c +++ b/drivers/s390/cio/device_ops.c | |||
@@ -96,6 +96,12 @@ ccw_device_start_key(struct ccw_device *cdev, struct ccw1 *cpa, | |||
96 | ret = cio_set_options (sch, flags); | 96 | ret = cio_set_options (sch, flags); |
97 | if (ret) | 97 | if (ret) |
98 | return ret; | 98 | return ret; |
99 | /* Adjust requested path mask to excluded varied off paths. */ | ||
100 | if (lpm) { | ||
101 | lpm &= sch->opm; | ||
102 | if (lpm == 0) | ||
103 | return -EACCES; | ||
104 | } | ||
99 | ret = cio_start_key (sch, cpa, lpm, key); | 105 | ret = cio_start_key (sch, cpa, lpm, key); |
100 | if (ret == 0) | 106 | if (ret == 0) |
101 | cdev->private->intparm = intparm; | 107 | cdev->private->intparm = intparm; |
@@ -304,7 +310,7 @@ __ccw_device_retry_loop(struct ccw_device *cdev, struct ccw1 *ccw, long magic, _ | |||
304 | sch = to_subchannel(cdev->dev.parent); | 310 | sch = to_subchannel(cdev->dev.parent); |
305 | do { | 311 | do { |
306 | ret = cio_start (sch, ccw, lpm); | 312 | ret = cio_start (sch, ccw, lpm); |
307 | if ((ret == -EBUSY) || (ret == -EACCES)) { | 313 | if (ret == -EBUSY) { |
308 | /* Try again later. */ | 314 | /* Try again later. */ |
309 | spin_unlock_irq(&sch->lock); | 315 | spin_unlock_irq(&sch->lock); |
310 | msleep(10); | 316 | msleep(10); |
@@ -433,6 +439,13 @@ read_conf_data_lpm (struct ccw_device *cdev, void **buffer, int *length, __u8 lp | |||
433 | if (!ciw || ciw->cmd == 0) | 439 | if (!ciw || ciw->cmd == 0) |
434 | return -EOPNOTSUPP; | 440 | return -EOPNOTSUPP; |
435 | 441 | ||
442 | /* Adjust requested path mask to excluded varied off paths. */ | ||
443 | if (lpm) { | ||
444 | lpm &= sch->opm; | ||
445 | if (lpm == 0) | ||
446 | return -EACCES; | ||
447 | } | ||
448 | |||
436 | rcd_ccw = kzalloc(sizeof(struct ccw1), GFP_KERNEL | GFP_DMA); | 449 | rcd_ccw = kzalloc(sizeof(struct ccw1), GFP_KERNEL | GFP_DMA); |
437 | if (!rcd_ccw) | 450 | if (!rcd_ccw) |
438 | return -ENOMEM; | 451 | return -ENOMEM; |