]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From: Swen Schillig <swen.schillig@vnet.ibm.com> |
2 | Subject: No udev events for zfcp online / offline | |
3 | References: bnc#443667 | |
4 | ||
5 | The following sequence: | |
6 | ||
7 | echo 1 > /sys/bus/ccw/devices/0.0.fc00/online | |
8 | echo 0 > /sys/bus/ccw/devices/0.0.fc00/online | |
9 | echo 1 > /sys/bus/ccw/devices/0.0.fc00/online | |
10 | ||
11 | generates udev events only for the first 'online' request. | |
12 | The following 'offline' request does not remove the zfcp | |
13 | adapter from the SCSI stack (directory 'hostX' in /sys/bus/ccw/devices/0.0.fc00 | |
14 | is still present), and no udev events are generated. | |
15 | Consequently no udev events are being generated for the following 'online' | |
16 | request. | |
17 | As discussed with IBM this is actually by design; the zfcp adapter | |
18 | will only be removed if a 'detach' is done. Consequently we should be | |
19 | register with the SCSI stack when an 'attach' is done, not when the | |
20 | ccw device is set online. | |
21 | ||
22 | Signed-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; |