Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e0e32c8e authored by Peter Oberparleiter's avatar Peter Oberparleiter Committed by Martin Schwidefsky
Browse files

[S390] cio: update path groups on logical CHPID changes.



CHPIDs that are logically varied off will not be removed from
a CCW device's path group because resign-from-pathgroup command is
issued with invalid path mask of 0 because internal CCW operations
are masked by the logical path mask after the relevant bits are
cleared by the vary operation.
Do not apply logical path mask to internal operations.

Signed-off-by: default avatarPeter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent dd9963f9
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -191,7 +191,7 @@ cio_start_key (struct subchannel *sch, /* subchannel structure */
	sch->orb.pfch = sch->options.prefetch == 0;
	sch->orb.pfch = sch->options.prefetch == 0;
	sch->orb.spnd = sch->options.suspend;
	sch->orb.spnd = sch->options.suspend;
	sch->orb.ssic = sch->options.suspend && sch->options.inter;
	sch->orb.ssic = sch->options.suspend && sch->options.inter;
	sch->orb.lpm = (lpm != 0) ? (lpm & sch->opm) : sch->lpm;
	sch->orb.lpm = (lpm != 0) ? lpm : sch->lpm;
#ifdef CONFIG_64BIT
#ifdef CONFIG_64BIT
	/*
	/*
	 * for 64 bit we always support 64 bit IDAWs with 4k page size only
	 * for 64 bit we always support 64 bit IDAWs with 4k page size only
+14 −1
Original line number Original line Diff line number Diff line
@@ -96,6 +96,12 @@ ccw_device_start_key(struct ccw_device *cdev, struct ccw1 *cpa,
	ret = cio_set_options (sch, flags);
	ret = cio_set_options (sch, flags);
	if (ret)
	if (ret)
		return ret;
		return ret;
	/* Adjust requested path mask to excluded varied off paths. */
	if (lpm) {
		lpm &= sch->opm;
		if (lpm == 0)
			return -EACCES;
	}
	ret = cio_start_key (sch, cpa, lpm, key);
	ret = cio_start_key (sch, cpa, lpm, key);
	if (ret == 0)
	if (ret == 0)
		cdev->private->intparm = intparm;
		cdev->private->intparm = intparm;
@@ -304,7 +310,7 @@ __ccw_device_retry_loop(struct ccw_device *cdev, struct ccw1 *ccw, long magic, _
	sch = to_subchannel(cdev->dev.parent);
	sch = to_subchannel(cdev->dev.parent);
	do {
	do {
		ret = cio_start (sch, ccw, lpm);
		ret = cio_start (sch, ccw, lpm);
		if ((ret == -EBUSY) || (ret == -EACCES)) {
		if (ret == -EBUSY) {
			/* Try again later. */
			/* Try again later. */
			spin_unlock_irq(&sch->lock);
			spin_unlock_irq(&sch->lock);
			msleep(10);
			msleep(10);
@@ -433,6 +439,13 @@ read_conf_data_lpm (struct ccw_device *cdev, void **buffer, int *length, __u8 lp
	if (!ciw || ciw->cmd == 0)
	if (!ciw || ciw->cmd == 0)
		return -EOPNOTSUPP;
		return -EOPNOTSUPP;


	/* Adjust requested path mask to excluded varied off paths. */
	if (lpm) {
		lpm &= sch->opm;
		if (lpm == 0)
			return -EACCES;
	}

	rcd_ccw = kzalloc(sizeof(struct ccw1), GFP_KERNEL | GFP_DMA);
	rcd_ccw = kzalloc(sizeof(struct ccw1), GFP_KERNEL | GFP_DMA);
	if (!rcd_ccw)
	if (!rcd_ccw)
		return -ENOMEM;
		return -ENOMEM;