]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.arch/s390-zfcp-synchronize-scsi-register
Imported linux-2.6.27.39 suse/xen patches.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.arch / s390-zfcp-synchronize-scsi-register
CommitLineData
2cb7cef9
BS
1From: Swen Schillig <swen.schillig@vnet.ibm.com>
2Subject: No udev events for zfcp online / offline
3References: bnc#443667
4
5The following sequence:
6
7echo 1 > /sys/bus/ccw/devices/0.0.fc00/online
8echo 0 > /sys/bus/ccw/devices/0.0.fc00/online
9echo 1 > /sys/bus/ccw/devices/0.0.fc00/online
10
11generates udev events only for the first 'online' request.
12The following 'offline' request does not remove the zfcp
13adapter from the SCSI stack (directory 'hostX' in /sys/bus/ccw/devices/0.0.fc00
14is still present), and no udev events are generated.
15Consequently no udev events are being generated for the following 'online'
16request.
17As discussed with IBM this is actually by design; the zfcp adapter
18will only be removed if a 'detach' is done. Consequently we should be
19register with the SCSI stack when an 'attach' is done, not when the
20ccw device is set online.
21
22Signed-off-by: Hannes Reinecke <hare@suse.de>
23
24---
25 drivers/s390/scsi/zfcp_aux.c | 3 ++-
26 drivers/s390/scsi/zfcp_ccw.c | 6 ------
27 2 files changed, 2 insertions(+), 7 deletions(-)
28
29--- a/drivers/s390/scsi/zfcp_aux.c
30+++ b/drivers/s390/scsi/zfcp_aux.c
31@@ -525,7 +525,8 @@ int zfcp_adapter_enqueue(struct ccw_devi
32
33 zfcp_fc_nameserver_init(adapter);
34
35- return 0;
36+ if (!zfcp_adapter_scsi_register(adapter))
37+ return 0;
38
39 sysfs_failed:
40 zfcp_adapter_debug_unregister(adapter);
41--- a/drivers/s390/scsi/zfcp_ccw.c
42+++ b/drivers/s390/scsi/zfcp_ccw.c
43@@ -105,10 +105,6 @@ static int zfcp_ccw_set_online(struct cc
44 if (retval)
45 goto out;
46
47- retval = zfcp_adapter_scsi_register(adapter);
48- if (retval)
49- goto out_scsi_register;
50-
51 /* initialize request counter */
52 BUG_ON(!zfcp_reqlist_isempty(adapter));
53 adapter->req_no = 0;
54@@ -122,8 +118,6 @@ static int zfcp_ccw_set_online(struct cc
55 flush_work(&adapter->scan_work);
56 return 0;
57
58- out_scsi_register:
59- zfcp_erp_thread_kill(adapter);
60 out:
61 up(&zfcp_data.config_sema);
62 return retval;