]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.arch/s390-08-01-cio-fix-mp-mode.diff
Disable build of xen kernel.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.arch / s390-08-01-cio-fix-mp-mode.diff
1 From: Gerald Schaefer <geraldsc@de.ibm.com>
2 Subject: cio: fix subchannel multipath mode setup
3 References: bnc#466462,LTC#51047
4
5 Symptom: Undefined behavior when trying to access DASD devices with more
6 than one CHPID: e.g. I/O errors due to timeouts after missing
7 interrupts, slow access to DASDs because single path mode is used.
8 Problem: Setup of subchannel multipath mode is not performed correctly
9 because changes to a local buffer are lost before they are sent
10 to the channel subsystem. In this state, the control unit assumes
11 multipath mode while the channel subsystem expects single path
12 mode. As a result, interrupts may not be correctly recognized
13 which leads to timeout situations and eventually I/O errors.
14 Also single path processing may slow down DASD access.
15 Solution: Apply changes to the subchannel configuration after modifying
16 the local buffer.
17
18 Acked-by: John Jolly <jjolly@suse.de>
19
20 ---
21 drivers/s390/cio/device.c | 6 ++++++
22 drivers/s390/cio/device_fsm.c | 2 ++
23 2 files changed, 8 insertions(+)
24
25 Index: linux-sles11/drivers/s390/cio/device.c
26 ===================================================================
27 --- linux-sles11.orig/drivers/s390/cio/device.c
28 +++ linux-sles11/drivers/s390/cio/device.c
29 @@ -1246,6 +1246,9 @@ static int io_subchannel_probe(struct su
30 return 0;
31 }
32 io_subchannel_init_fields(sch);
33 + rc = cio_modify(sch);
34 + if (rc)
35 + goto out_schedule;
36 /*
37 * First check if a fitting device may be found amongst the
38 * disconnected devices or in the orphanage.
39 @@ -1676,6 +1679,9 @@ static int ccw_device_console_enable(str
40 sch->private = cio_get_console_priv();
41 memset(sch->private, 0, sizeof(struct io_subchannel_private));
42 io_subchannel_init_fields(sch);
43 + rc = cio_modify(sch);
44 + if (rc)
45 + return rc;
46 sch->driver = &io_subchannel_driver;
47 /* Initialize the ccw_device structure. */
48 cdev->dev.parent= &sch->dev;
49 Index: linux-sles11/drivers/s390/cio/device_fsm.c
50 ===================================================================
51 --- linux-sles11.orig/drivers/s390/cio/device_fsm.c
52 +++ linux-sles11/drivers/s390/cio/device_fsm.c
53 @@ -1028,6 +1028,8 @@ void ccw_device_trigger_reprobe(struct c
54 sch->schib.pmcw.ena = 0;
55 if ((sch->lpm & (sch->lpm - 1)) != 0)
56 sch->schib.pmcw.mp = 1;
57 + if (cio_modify(sch))
58 + return;
59 /* We should also udate ssd info, but this has to wait. */
60 /* Check if this is another device which appeared on the same sch. */
61 if (sch->schib.pmcw.dev != cdev->private->dev_id.devno) {