diff options
Diffstat (limited to 'drivers/s390/scsi/zfcp_ccw.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_ccw.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/s390/scsi/zfcp_ccw.c b/drivers/s390/scsi/zfcp_ccw.c index 82ae6ed7ef83..0c90f8e71605 100644 --- a/drivers/s390/scsi/zfcp_ccw.c +++ b/drivers/s390/scsi/zfcp_ccw.c | |||
@@ -21,12 +21,12 @@ static int zfcp_ccw_suspend(struct ccw_device *cdev) | |||
21 | if (!adapter) | 21 | if (!adapter) |
22 | return 0; | 22 | return 0; |
23 | 23 | ||
24 | down(&zfcp_data.config_sema); | 24 | mutex_lock(&zfcp_data.config_mutex); |
25 | 25 | ||
26 | zfcp_erp_adapter_shutdown(adapter, 0, "ccsusp1", NULL); | 26 | zfcp_erp_adapter_shutdown(adapter, 0, "ccsusp1", NULL); |
27 | zfcp_erp_wait(adapter); | 27 | zfcp_erp_wait(adapter); |
28 | 28 | ||
29 | up(&zfcp_data.config_sema); | 29 | mutex_unlock(&zfcp_data.config_mutex); |
30 | 30 | ||
31 | return 0; | 31 | return 0; |
32 | } | 32 | } |
@@ -98,7 +98,7 @@ static void zfcp_ccw_remove(struct ccw_device *ccw_device) | |||
98 | 98 | ||
99 | ccw_device_set_offline(ccw_device); | 99 | ccw_device_set_offline(ccw_device); |
100 | 100 | ||
101 | down(&zfcp_data.config_sema); | 101 | mutex_lock(&zfcp_data.config_mutex); |
102 | adapter = dev_get_drvdata(&ccw_device->dev); | 102 | adapter = dev_get_drvdata(&ccw_device->dev); |
103 | if (!adapter) | 103 | if (!adapter) |
104 | goto out; | 104 | goto out; |
@@ -128,7 +128,7 @@ static void zfcp_ccw_remove(struct ccw_device *ccw_device) | |||
128 | zfcp_adapter_dequeue(adapter); | 128 | zfcp_adapter_dequeue(adapter); |
129 | 129 | ||
130 | out: | 130 | out: |
131 | up(&zfcp_data.config_sema); | 131 | mutex_unlock(&zfcp_data.config_mutex); |
132 | } | 132 | } |
133 | 133 | ||
134 | /** | 134 | /** |
@@ -149,7 +149,7 @@ static int zfcp_ccw_set_online(struct ccw_device *ccw_device) | |||
149 | struct zfcp_adapter *adapter; | 149 | struct zfcp_adapter *adapter; |
150 | int ret = 0; | 150 | int ret = 0; |
151 | 151 | ||
152 | down(&zfcp_data.config_sema); | 152 | mutex_lock(&zfcp_data.config_mutex); |
153 | adapter = dev_get_drvdata(&ccw_device->dev); | 153 | adapter = dev_get_drvdata(&ccw_device->dev); |
154 | 154 | ||
155 | if (!adapter) { | 155 | if (!adapter) { |
@@ -173,7 +173,7 @@ static int zfcp_ccw_set_online(struct ccw_device *ccw_device) | |||
173 | "ccsonl2", NULL); | 173 | "ccsonl2", NULL); |
174 | zfcp_erp_wait(adapter); | 174 | zfcp_erp_wait(adapter); |
175 | out: | 175 | out: |
176 | up(&zfcp_data.config_sema); | 176 | mutex_unlock(&zfcp_data.config_mutex); |
177 | if (!ret) | 177 | if (!ret) |
178 | flush_work(&adapter->scan_work); | 178 | flush_work(&adapter->scan_work); |
179 | return ret; | 179 | return ret; |
@@ -190,14 +190,14 @@ static int zfcp_ccw_set_offline(struct ccw_device *ccw_device) | |||
190 | { | 190 | { |
191 | struct zfcp_adapter *adapter; | 191 | struct zfcp_adapter *adapter; |
192 | 192 | ||
193 | down(&zfcp_data.config_sema); | 193 | mutex_lock(&zfcp_data.config_mutex); |
194 | adapter = dev_get_drvdata(&ccw_device->dev); | 194 | adapter = dev_get_drvdata(&ccw_device->dev); |
195 | if (!adapter) | 195 | if (!adapter) |
196 | goto out; | 196 | goto out; |
197 | 197 | ||
198 | zfcp_erp_adapter_shutdown(adapter, 0, "ccsoff1", NULL); | 198 | zfcp_erp_adapter_shutdown(adapter, 0, "ccsoff1", NULL); |
199 | zfcp_erp_wait(adapter); | 199 | zfcp_erp_wait(adapter); |
200 | up(&zfcp_data.config_sema); | 200 | mutex_unlock(&zfcp_data.config_mutex); |
201 | out: | 201 | out: |
202 | return 0; | 202 | return 0; |
203 | } | 203 | } |
@@ -251,12 +251,12 @@ static void zfcp_ccw_shutdown(struct ccw_device *cdev) | |||
251 | { | 251 | { |
252 | struct zfcp_adapter *adapter; | 252 | struct zfcp_adapter *adapter; |
253 | 253 | ||
254 | down(&zfcp_data.config_sema); | 254 | mutex_lock(&zfcp_data.config_mutex); |
255 | adapter = dev_get_drvdata(&cdev->dev); | 255 | adapter = dev_get_drvdata(&cdev->dev); |
256 | zfcp_erp_adapter_shutdown(adapter, 0, "ccshut1", NULL); | 256 | zfcp_erp_adapter_shutdown(adapter, 0, "ccshut1", NULL); |
257 | zfcp_erp_wait(adapter); | 257 | zfcp_erp_wait(adapter); |
258 | zfcp_erp_thread_kill(adapter); | 258 | zfcp_erp_thread_kill(adapter); |
259 | up(&zfcp_data.config_sema); | 259 | mutex_unlock(&zfcp_data.config_mutex); |
260 | } | 260 | } |
261 | 261 | ||
262 | static struct ccw_driver zfcp_ccw_driver = { | 262 | static struct ccw_driver zfcp_ccw_driver = { |