diff options
author | Christof Schmitt <christof.schmitt@de.ibm.com> | 2007-08-28 03:31:41 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-10-12 14:46:36 -0400 |
commit | ff17a29d3cd9819a0977a07047e8f54e57dca7ce (patch) | |
tree | ea363cbf6da639fc49bc2f4dd635e2d9f132858c | |
parent | 52ef11a7170e1b8a0d5f9a42dbb43c38c335c32e (diff) |
[SCSI] zfcp: Enable debug feature before setting adapter online
Already register the debug feature before the zfcp adapter is
set online. This allows to use the debug feature to investigate
the online/offline sequence.
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
-rw-r--r-- | drivers/s390/scsi/zfcp_aux.c | 8 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_ccw.c | 8 |
2 files changed, 9 insertions, 7 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index eb3af41a3c1c..4a67320fb4bc 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c | |||
@@ -1038,6 +1038,10 @@ zfcp_adapter_enqueue(struct ccw_device *ccw_device) | |||
1038 | spin_lock_init(&adapter->san_dbf_lock); | 1038 | spin_lock_init(&adapter->san_dbf_lock); |
1039 | spin_lock_init(&adapter->scsi_dbf_lock); | 1039 | spin_lock_init(&adapter->scsi_dbf_lock); |
1040 | 1040 | ||
1041 | retval = zfcp_adapter_debug_register(adapter); | ||
1042 | if (retval) | ||
1043 | goto debug_register_failed; | ||
1044 | |||
1041 | /* initialize error recovery stuff */ | 1045 | /* initialize error recovery stuff */ |
1042 | 1046 | ||
1043 | rwlock_init(&adapter->erp_lock); | 1047 | rwlock_init(&adapter->erp_lock); |
@@ -1084,6 +1088,8 @@ zfcp_adapter_enqueue(struct ccw_device *ccw_device) | |||
1084 | generic_services_failed: | 1088 | generic_services_failed: |
1085 | zfcp_sysfs_adapter_remove_files(&adapter->ccw_device->dev); | 1089 | zfcp_sysfs_adapter_remove_files(&adapter->ccw_device->dev); |
1086 | sysfs_failed: | 1090 | sysfs_failed: |
1091 | zfcp_adapter_debug_unregister(adapter); | ||
1092 | debug_register_failed: | ||
1087 | dev_set_drvdata(&ccw_device->dev, NULL); | 1093 | dev_set_drvdata(&ccw_device->dev, NULL); |
1088 | zfcp_reqlist_free(adapter); | 1094 | zfcp_reqlist_free(adapter); |
1089 | failed_low_mem_buffers: | 1095 | failed_low_mem_buffers: |
@@ -1129,6 +1135,8 @@ zfcp_adapter_dequeue(struct zfcp_adapter *adapter) | |||
1129 | goto out; | 1135 | goto out; |
1130 | } | 1136 | } |
1131 | 1137 | ||
1138 | zfcp_adapter_debug_unregister(adapter); | ||
1139 | |||
1132 | /* remove specified adapter data structure from list */ | 1140 | /* remove specified adapter data structure from list */ |
1133 | write_lock_irq(&zfcp_data.config_lock); | 1141 | write_lock_irq(&zfcp_data.config_lock); |
1134 | list_del(&adapter->list); | 1142 | list_del(&adapter->list); |
diff --git a/drivers/s390/scsi/zfcp_ccw.c b/drivers/s390/scsi/zfcp_ccw.c index 1c8f71a59855..2773724c5c77 100644 --- a/drivers/s390/scsi/zfcp_ccw.c +++ b/drivers/s390/scsi/zfcp_ccw.c | |||
@@ -150,15 +150,12 @@ zfcp_ccw_set_online(struct ccw_device *ccw_device) | |||
150 | down(&zfcp_data.config_sema); | 150 | down(&zfcp_data.config_sema); |
151 | adapter = dev_get_drvdata(&ccw_device->dev); | 151 | adapter = dev_get_drvdata(&ccw_device->dev); |
152 | 152 | ||
153 | retval = zfcp_adapter_debug_register(adapter); | ||
154 | if (retval) | ||
155 | goto out; | ||
156 | retval = zfcp_erp_thread_setup(adapter); | 153 | retval = zfcp_erp_thread_setup(adapter); |
157 | if (retval) { | 154 | if (retval) { |
158 | ZFCP_LOG_INFO("error: start of error recovery thread for " | 155 | ZFCP_LOG_INFO("error: start of error recovery thread for " |
159 | "adapter %s failed\n", | 156 | "adapter %s failed\n", |
160 | zfcp_get_busid_by_adapter(adapter)); | 157 | zfcp_get_busid_by_adapter(adapter)); |
161 | goto out_erp_thread; | 158 | goto out; |
162 | } | 159 | } |
163 | 160 | ||
164 | retval = zfcp_adapter_scsi_register(adapter); | 161 | retval = zfcp_adapter_scsi_register(adapter); |
@@ -177,8 +174,6 @@ zfcp_ccw_set_online(struct ccw_device *ccw_device) | |||
177 | 174 | ||
178 | out_scsi_register: | 175 | out_scsi_register: |
179 | zfcp_erp_thread_kill(adapter); | 176 | zfcp_erp_thread_kill(adapter); |
180 | out_erp_thread: | ||
181 | zfcp_adapter_debug_unregister(adapter); | ||
182 | out: | 177 | out: |
183 | up(&zfcp_data.config_sema); | 178 | up(&zfcp_data.config_sema); |
184 | return retval; | 179 | return retval; |
@@ -201,7 +196,6 @@ zfcp_ccw_set_offline(struct ccw_device *ccw_device) | |||
201 | zfcp_erp_adapter_shutdown(adapter, 0); | 196 | zfcp_erp_adapter_shutdown(adapter, 0); |
202 | zfcp_erp_wait(adapter); | 197 | zfcp_erp_wait(adapter); |
203 | zfcp_erp_thread_kill(adapter); | 198 | zfcp_erp_thread_kill(adapter); |
204 | zfcp_adapter_debug_unregister(adapter); | ||
205 | up(&zfcp_data.config_sema); | 199 | up(&zfcp_data.config_sema); |
206 | return 0; | 200 | return 0; |
207 | } | 201 | } |