]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.39/patches.arch/s390-15-11-cio-vary-unregister.patch
Imported linux-2.6.27.39 suse/xen patches.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.arch / s390-15-11-cio-vary-unregister.patch
1 From: Gerald Schaefer <geraldsc@de.ibm.com>
2 Subject: cio: ccw devices are not removed when last path is varied offline
3 References: bnc#518291,LTC#54951
4
5 Symptom: When the last CHPID to an offline CCW device is varied offline,
6 that device remains registered even though it is no longer
7 accessible.
8 Problem: The vary command triggers an internal path verification event
9 which is not handled for devices in the offline state.
10 Solution: Install a handler for the path verification event in offline state
11 which will remove the device if it is no longer accessible.
12
13 Acked-by: John Jolly <jjolly@suse.de>
14 ---
15 drivers/s390/cio/device_fsm.c | 13 ++++++++++++-
16 1 file changed, 12 insertions(+), 1 deletion(-)
17
18 Index: linux-sles11/drivers/s390/cio/device_fsm.c
19 ===================================================================
20 --- linux-sles11.orig/drivers/s390/cio/device_fsm.c
21 +++ linux-sles11/drivers/s390/cio/device_fsm.c
22 @@ -739,6 +739,17 @@ static void ccw_device_generic_notoper(s
23 }
24
25 /*
26 + * Handle path verification event in offline state.
27 + */
28 +static void ccw_device_offline_verify(struct ccw_device *cdev,
29 + enum dev_event dev_event)
30 +{
31 + struct subchannel *sch = to_subchannel(cdev->dev.parent);
32 +
33 + css_schedule_eval(sch->schid);
34 +}
35 +
36 +/*
37 * Handle path verification event.
38 */
39 static void
40 @@ -1155,7 +1166,7 @@ fsm_func_t *dev_jumptable[NR_DEV_STATES]
41 [DEV_EVENT_NOTOPER] = ccw_device_generic_notoper,
42 [DEV_EVENT_INTERRUPT] = ccw_device_offline_irq,
43 [DEV_EVENT_TIMEOUT] = ccw_device_nop,
44 - [DEV_EVENT_VERIFY] = ccw_device_nop,
45 + [DEV_EVENT_VERIFY] = ccw_device_offline_verify,
46 },
47 [DEV_STATE_VERIFY] = {
48 [DEV_EVENT_NOTOPER] = ccw_device_generic_notoper,