aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi
diff options
context:
space:
mode:
authorSwen Schillig <swen@vnet.ibm.com>2010-12-02 09:16:16 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-12-21 13:24:46 -0500
commitea4a3a6ac40e2a585654808d4aefb39a6d57dca0 (patch)
treec0da0843fc8d4087448ffc4e1b7992dab6aa62f5 /drivers/s390/scsi
parent250a1352b95e1db3216e5c5d4f4365bea5122f4a (diff)
[SCSI] zfcp: Redesign of the debug tracing final cleanup.
This patch is the final cleanup of the redesign from the zfcp tracing. Structures and elements which were used by multiple areas of the former debug tracing are now changed to the new scheme. Signed-off-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/s390/scsi')
-rw-r--r--drivers/s390/scsi/zfcp_aux.c5
-rw-r--r--drivers/s390/scsi/zfcp_ccw.c14
-rw-r--r--drivers/s390/scsi/zfcp_cfdc.c8
-rw-r--r--drivers/s390/scsi/zfcp_dbf.c70
-rw-r--r--drivers/s390/scsi/zfcp_dbf.h25
-rw-r--r--drivers/s390/scsi/zfcp_erp.c97
-rw-r--r--drivers/s390/scsi/zfcp_ext.h18
-rw-r--r--drivers/s390/scsi/zfcp_fc.c18
-rw-r--r--drivers/s390/scsi/zfcp_fsf.c85
-rw-r--r--drivers/s390/scsi/zfcp_qdio.c6
-rw-r--r--drivers/s390/scsi/zfcp_scsi.c6
-rw-r--r--drivers/s390/scsi/zfcp_sysfs.c9
12 files changed, 180 insertions, 181 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c
index 044fb22718d2..352ca0d4ca25 100644
--- a/drivers/s390/scsi/zfcp_aux.c
+++ b/drivers/s390/scsi/zfcp_aux.c
@@ -311,8 +311,7 @@ int zfcp_status_read_refill(struct zfcp_adapter *adapter)
311 if (zfcp_fsf_status_read(adapter->qdio)) { 311 if (zfcp_fsf_status_read(adapter->qdio)) {
312 if (atomic_read(&adapter->stat_miss) >= 312 if (atomic_read(&adapter->stat_miss) >=
313 adapter->stat_read_buf_num) { 313 adapter->stat_read_buf_num) {
314 zfcp_erp_adapter_reopen(adapter, 0, "axsref1", 314 zfcp_erp_adapter_reopen(adapter, 0, "axsref1");
315 NULL);
316 return 1; 315 return 1;
317 } 316 }
318 break; 317 break;
@@ -459,7 +458,7 @@ void zfcp_adapter_unregister(struct zfcp_adapter *adapter)
459 sysfs_remove_group(&cdev->dev.kobj, &zfcp_sysfs_adapter_attrs); 458 sysfs_remove_group(&cdev->dev.kobj, &zfcp_sysfs_adapter_attrs);
460 459
461 zfcp_erp_thread_kill(adapter); 460 zfcp_erp_thread_kill(adapter);
462 zfcp_dbf_adapter_unregister(adapter->dbf); 461 zfcp_dbf_adapter_unregister(adapter);
463 zfcp_qdio_destroy(adapter->qdio); 462 zfcp_qdio_destroy(adapter->qdio);
464 463
465 zfcp_ccw_adapter_put(adapter); /* final put to release */ 464 zfcp_ccw_adapter_put(adapter); /* final put to release */
diff --git a/drivers/s390/scsi/zfcp_ccw.c b/drivers/s390/scsi/zfcp_ccw.c
index 0833c2b51e39..4f7852dd30c7 100644
--- a/drivers/s390/scsi/zfcp_ccw.c
+++ b/drivers/s390/scsi/zfcp_ccw.c
@@ -48,7 +48,7 @@ static int zfcp_ccw_activate(struct ccw_device *cdev)
48 48
49 zfcp_erp_set_adapter_status(adapter, ZFCP_STATUS_COMMON_RUNNING); 49 zfcp_erp_set_adapter_status(adapter, ZFCP_STATUS_COMMON_RUNNING);
50 zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 50 zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED,
51 "ccresu2", NULL); 51 "ccresu2");
52 zfcp_erp_wait(adapter); 52 zfcp_erp_wait(adapter);
53 flush_work(&adapter->scan_work); 53 flush_work(&adapter->scan_work);
54 54
@@ -182,7 +182,7 @@ static int zfcp_ccw_set_offline(struct ccw_device *cdev)
182 if (!adapter) 182 if (!adapter)
183 return 0; 183 return 0;
184 184
185 zfcp_erp_adapter_shutdown(adapter, 0, "ccsoff1", NULL); 185 zfcp_erp_adapter_shutdown(adapter, 0, "ccsoff1");
186 zfcp_erp_wait(adapter); 186 zfcp_erp_wait(adapter);
187 187
188 zfcp_ccw_adapter_put(adapter); 188 zfcp_ccw_adapter_put(adapter);
@@ -207,24 +207,24 @@ static int zfcp_ccw_notify(struct ccw_device *cdev, int event)
207 switch (event) { 207 switch (event) {
208 case CIO_GONE: 208 case CIO_GONE:
209 dev_warn(&cdev->dev, "The FCP device has been detached\n"); 209 dev_warn(&cdev->dev, "The FCP device has been detached\n");
210 zfcp_erp_adapter_shutdown(adapter, 0, "ccnoti1", NULL); 210 zfcp_erp_adapter_shutdown(adapter, 0, "ccnoti1");
211 break; 211 break;
212 case CIO_NO_PATH: 212 case CIO_NO_PATH:
213 dev_warn(&cdev->dev, 213 dev_warn(&cdev->dev,
214 "The CHPID for the FCP device is offline\n"); 214 "The CHPID for the FCP device is offline\n");
215 zfcp_erp_adapter_shutdown(adapter, 0, "ccnoti2", NULL); 215 zfcp_erp_adapter_shutdown(adapter, 0, "ccnoti2");
216 break; 216 break;
217 case CIO_OPER: 217 case CIO_OPER:
218 dev_info(&cdev->dev, "The FCP device is operational again\n"); 218 dev_info(&cdev->dev, "The FCP device is operational again\n");
219 zfcp_erp_set_adapter_status(adapter, 219 zfcp_erp_set_adapter_status(adapter,
220 ZFCP_STATUS_COMMON_RUNNING); 220 ZFCP_STATUS_COMMON_RUNNING);
221 zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 221 zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED,
222 "ccnoti4", NULL); 222 "ccnoti4");
223 break; 223 break;
224 case CIO_BOXED: 224 case CIO_BOXED:
225 dev_warn(&cdev->dev, "The FCP device did not respond within " 225 dev_warn(&cdev->dev, "The FCP device did not respond within "
226 "the specified time\n"); 226 "the specified time\n");
227 zfcp_erp_adapter_shutdown(adapter, 0, "ccnoti5", NULL); 227 zfcp_erp_adapter_shutdown(adapter, 0, "ccnoti5");
228 break; 228 break;
229 } 229 }
230 230
@@ -243,7 +243,7 @@ static void zfcp_ccw_shutdown(struct ccw_device *cdev)
243 if (!adapter) 243 if (!adapter)
244 return; 244 return;
245 245
246 zfcp_erp_adapter_shutdown(adapter, 0, "ccshut1", NULL); 246 zfcp_erp_adapter_shutdown(adapter, 0, "ccshut1");
247 zfcp_erp_wait(adapter); 247 zfcp_erp_wait(adapter);
248 zfcp_erp_thread_kill(adapter); 248 zfcp_erp_thread_kill(adapter);
249 249
diff --git a/drivers/s390/scsi/zfcp_cfdc.c b/drivers/s390/scsi/zfcp_cfdc.c
index d692e229ecba..46342fee394d 100644
--- a/drivers/s390/scsi/zfcp_cfdc.c
+++ b/drivers/s390/scsi/zfcp_cfdc.c
@@ -288,7 +288,7 @@ void zfcp_cfdc_adapter_access_changed(struct zfcp_adapter *adapter)
288 (status & ZFCP_STATUS_COMMON_ACCESS_BOXED)) 288 (status & ZFCP_STATUS_COMMON_ACCESS_BOXED))
289 zfcp_erp_port_reopen(port, 289 zfcp_erp_port_reopen(port,
290 ZFCP_STATUS_COMMON_ERP_FAILED, 290 ZFCP_STATUS_COMMON_ERP_FAILED,
291 "cfaac_1", NULL); 291 "cfaac_1");
292 } 292 }
293 read_unlock_irqrestore(&adapter->port_list_lock, flags); 293 read_unlock_irqrestore(&adapter->port_list_lock, flags);
294 294
@@ -299,7 +299,7 @@ void zfcp_cfdc_adapter_access_changed(struct zfcp_adapter *adapter)
299 (status & ZFCP_STATUS_COMMON_ACCESS_BOXED)) 299 (status & ZFCP_STATUS_COMMON_ACCESS_BOXED))
300 zfcp_erp_lun_reopen(sdev, 300 zfcp_erp_lun_reopen(sdev,
301 ZFCP_STATUS_COMMON_ERP_FAILED, 301 ZFCP_STATUS_COMMON_ERP_FAILED,
302 "cfaac_2", NULL); 302 "cfaac_2");
303 } 303 }
304} 304}
305 305
@@ -426,7 +426,7 @@ int zfcp_cfdc_open_lun_eval(struct scsi_device *sdev,
426 zfcp_scsi_dev_lun(sdev), 426 zfcp_scsi_dev_lun(sdev),
427 (unsigned long long)zfcp_sdev->port->wwpn); 427 (unsigned long long)zfcp_sdev->port->wwpn);
428 zfcp_erp_set_lun_status(sdev, ZFCP_STATUS_COMMON_ERP_FAILED); 428 zfcp_erp_set_lun_status(sdev, ZFCP_STATUS_COMMON_ERP_FAILED);
429 zfcp_erp_lun_shutdown(sdev, 0, "fsouh_6", NULL); 429 zfcp_erp_lun_shutdown(sdev, 0, "fsouh_6");
430 return -EACCES; 430 return -EACCES;
431 } 431 }
432 432
@@ -437,7 +437,7 @@ int zfcp_cfdc_open_lun_eval(struct scsi_device *sdev,
437 zfcp_scsi_dev_lun(sdev), 437 zfcp_scsi_dev_lun(sdev),
438 (unsigned long long)zfcp_sdev->port->wwpn); 438 (unsigned long long)zfcp_sdev->port->wwpn);
439 zfcp_erp_set_lun_status(sdev, ZFCP_STATUS_COMMON_ERP_FAILED); 439 zfcp_erp_set_lun_status(sdev, ZFCP_STATUS_COMMON_ERP_FAILED);
440 zfcp_erp_lun_shutdown(sdev, 0, "fsosh_8", NULL); 440 zfcp_erp_lun_shutdown(sdev, 0, "fsosh_8");
441 return -EACCES; 441 return -EACCES;
442 } 442 }
443 443
diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c
index f9bd094c6e63..96d1462e0bf5 100644
--- a/drivers/s390/scsi/zfcp_dbf.c
+++ b/drivers/s390/scsi/zfcp_dbf.c
@@ -377,26 +377,37 @@ void zfcp_dbf_scsi(char *tag, struct scsi_cmnd *sc, struct zfcp_fsf_req *fsf)
377 } 377 }
378 } 378 }
379 379
380 debug_event(adapter->dbf->scsi, 1, rec, sizeof(*rec)); 380 debug_event(dbf->scsi, 1, rec, sizeof(*rec));
381 spin_unlock_irqrestore(&dbf->scsi_lock, flags); 381 spin_unlock_irqrestore(&dbf->scsi_lock, flags);
382} 382}
383 383
384static debug_info_t *zfcp_dbf_reg(const char *name, int level, 384static debug_info_t *zfcp_dbf_reg(const char *name, int size, int rec_size)
385 struct debug_view *view, int size)
386{ 385{
387 struct debug_info *d; 386 struct debug_info *d;
388 387
389 d = debug_register(name, dbfsize, level, size); 388 d = debug_register(name, size, 1, rec_size);
390 if (!d) 389 if (!d)
391 return NULL; 390 return NULL;
392 391
393 debug_register_view(d, &debug_hex_ascii_view); 392 debug_register_view(d, &debug_hex_ascii_view);
394 debug_register_view(d, view); 393 debug_set_level(d, 3);
395 debug_set_level(d, level);
396 394
397 return d; 395 return d;
398} 396}
399 397
398static void zfcp_dbf_unregister(struct zfcp_dbf *dbf)
399{
400 if (!dbf)
401 return;
402
403 debug_unregister(dbf->scsi);
404 debug_unregister(dbf->san);
405 debug_unregister(dbf->hba);
406 debug_unregister(dbf->pay);
407 debug_unregister(dbf->rec);
408 kfree(dbf);
409}
410
400/** 411/**
401 * zfcp_adapter_debug_register - registers debug feature for an adapter 412 * zfcp_adapter_debug_register - registers debug feature for an adapter
402 * @adapter: pointer to adapter for which debug features should be registered 413 * @adapter: pointer to adapter for which debug features should be registered
@@ -404,15 +415,13 @@ static debug_info_t *zfcp_dbf_reg(const char *name, int level,
404 */ 415 */
405int zfcp_dbf_adapter_register(struct zfcp_adapter *adapter) 416int zfcp_dbf_adapter_register(struct zfcp_adapter *adapter)
406{ 417{
407 char dbf_name[DEBUG_MAX_NAME_LEN]; 418 char name[DEBUG_MAX_NAME_LEN];
408 struct zfcp_dbf *dbf; 419 struct zfcp_dbf *dbf;
409 420
410 dbf = kzalloc(sizeof(struct zfcp_dbf), GFP_KERNEL); 421 dbf = kzalloc(sizeof(struct zfcp_dbf), GFP_KERNEL);
411 if (!dbf) 422 if (!dbf)
412 return -ENOMEM; 423 return -ENOMEM;
413 424
414 dbf->adapter = adapter;
415
416 spin_lock_init(&dbf->pay_lock); 425 spin_lock_init(&dbf->pay_lock);
417 spin_lock_init(&dbf->hba_lock); 426 spin_lock_init(&dbf->hba_lock);
418 spin_lock_init(&dbf->san_lock); 427 spin_lock_init(&dbf->san_lock);
@@ -420,59 +429,52 @@ int zfcp_dbf_adapter_register(struct zfcp_adapter *adapter)
420 spin_lock_init(&dbf->rec_lock); 429 spin_lock_init(&dbf->rec_lock);
421 430
422 /* debug feature area which records recovery activity */ 431 /* debug feature area which records recovery activity */
423 sprintf(dbf_name, "zfcp_%s_rec", dev_name(&adapter->ccw_device->dev)); 432 sprintf(name, "zfcp_%s_rec", dev_name(&adapter->ccw_device->dev));
424 dbf->rec = zfcp_dbf_reg(dbf_name, 3, NULL, sizeof(struct zfcp_dbf_rec)); 433 dbf->rec = zfcp_dbf_reg(name, dbfsize, sizeof(struct zfcp_dbf_rec));
425 if (!dbf->rec) 434 if (!dbf->rec)
426 goto err_out; 435 goto err_out;
427 436
428 /* debug feature area which records HBA (FSF and QDIO) conditions */ 437 /* debug feature area which records HBA (FSF and QDIO) conditions */
429 sprintf(dbf_name, "zfcp_%s_hba", dev_name(&adapter->ccw_device->dev)); 438 sprintf(name, "zfcp_%s_hba", dev_name(&adapter->ccw_device->dev));
430 dbf->hba = zfcp_dbf_reg(dbf_name, 3, NULL, sizeof(struct zfcp_dbf_hba)); 439 dbf->hba = zfcp_dbf_reg(name, dbfsize, sizeof(struct zfcp_dbf_hba));
431 if (!dbf->hba) 440 if (!dbf->hba)
432 goto err_out; 441 goto err_out;
433 442
434 /* debug feature area which records payload info */ 443 /* debug feature area which records payload info */
435 sprintf(dbf_name, "zfcp_%s_pay", dev_name(&adapter->ccw_device->dev)); 444 sprintf(name, "zfcp_%s_pay", dev_name(&adapter->ccw_device->dev));
436 dbf->pay = zfcp_dbf_reg(dbf_name, 3, NULL, 445 dbf->pay = zfcp_dbf_reg(name, dbfsize * 2, sizeof(struct zfcp_dbf_pay));
437 sizeof(struct zfcp_dbf_pay));
438 if (!dbf->pay) 446 if (!dbf->pay)
439 goto err_out; 447 goto err_out;
440 448
441 /* debug feature area which records SAN command failures and recovery */ 449 /* debug feature area which records SAN command failures and recovery */
442 sprintf(dbf_name, "zfcp_%s_san", dev_name(&adapter->ccw_device->dev)); 450 sprintf(name, "zfcp_%s_san", dev_name(&adapter->ccw_device->dev));
443 dbf->san = zfcp_dbf_reg(dbf_name, 3, NULL, sizeof(struct zfcp_dbf_san)); 451 dbf->san = zfcp_dbf_reg(name, dbfsize, sizeof(struct zfcp_dbf_san));
444 if (!dbf->san) 452 if (!dbf->san)
445 goto err_out; 453 goto err_out;
446 454
447 /* debug feature area which records SCSI command failures and recovery */ 455 /* debug feature area which records SCSI command failures and recovery */
448 sprintf(dbf_name, "zfcp_%s_scsi", dev_name(&adapter->ccw_device->dev)); 456 sprintf(name, "zfcp_%s_scsi", dev_name(&adapter->ccw_device->dev));
449 dbf->scsi = zfcp_dbf_reg(dbf_name, 3, NULL, 457 dbf->scsi = zfcp_dbf_reg(name, dbfsize, sizeof(struct zfcp_dbf_scsi));
450 sizeof(struct zfcp_dbf_scsi));
451 if (!dbf->scsi) 458 if (!dbf->scsi)
452 goto err_out; 459 goto err_out;
453 460
454 adapter->dbf = dbf; 461 adapter->dbf = dbf;
455 return 0;
456 462
463 return 0;
457err_out: 464err_out:
458 zfcp_dbf_adapter_unregister(dbf); 465 zfcp_dbf_unregister(dbf);
459 return -ENOMEM; 466 return -ENOMEM;
460} 467}
461 468
462/** 469/**
463 * zfcp_adapter_debug_unregister - unregisters debug feature for an adapter 470 * zfcp_adapter_debug_unregister - unregisters debug feature for an adapter
464 * @dbf: pointer to dbf for which debug features should be unregistered 471 * @adapter: pointer to adapter for which debug features should be unregistered
465 */ 472 */
466void zfcp_dbf_adapter_unregister(struct zfcp_dbf *dbf) 473void zfcp_dbf_adapter_unregister(struct zfcp_adapter *adapter)
467{ 474{
468 if (!dbf) 475 struct zfcp_dbf *dbf = adapter->dbf;
469 return; 476
470 debug_unregister(dbf->scsi); 477 adapter->dbf = NULL;
471 debug_unregister(dbf->san); 478 zfcp_dbf_unregister(dbf);
472 debug_unregister(dbf->hba);
473 debug_unregister(dbf->pay);
474 debug_unregister(dbf->rec);
475 dbf->adapter->dbf = NULL;
476 kfree(dbf);
477} 479}
478 480
diff --git a/drivers/s390/scsi/zfcp_dbf.h b/drivers/s390/scsi/zfcp_dbf.h
index 2cee8197dd02..714f087eb7a9 100644
--- a/drivers/s390/scsi/zfcp_dbf.h
+++ b/drivers/s390/scsi/zfcp_dbf.h
@@ -14,8 +14,6 @@
14#include "zfcp_def.h" 14#include "zfcp_def.h"
15 15
16#define ZFCP_DBF_TAG_LEN 7 16#define ZFCP_DBF_TAG_LEN 7
17#define ZFCP_DBF_TAG_SIZE 4
18#define ZFCP_DBF_ID_SIZE 7
19 17
20#define ZFCP_DBF_INVALID_LUN 0xFFFFFFFFFFFFFFFFull 18#define ZFCP_DBF_INVALID_LUN 0xFFFFFFFFFFFFFFFFull
21 19
@@ -233,13 +231,31 @@ struct zfcp_dbf_scsi {
233 * @data: unformatted data 231 * @data: unformatted data
234 */ 232 */
235struct zfcp_dbf_pay { 233struct zfcp_dbf_pay {
234 u8 counter;
236 char area[ZFCP_DBF_TAG_LEN]; 235 char area[ZFCP_DBF_TAG_LEN];
237 char counter;
238 u64 fsf_req_id; 236 u64 fsf_req_id;
239#define ZFCP_DBF_PAY_MAX_REC 0x100 237#define ZFCP_DBF_PAY_MAX_REC 0x100
240 char data[ZFCP_DBF_PAY_MAX_REC]; 238 char data[ZFCP_DBF_PAY_MAX_REC];
241} __packed; 239} __packed;
242 240
241/**
242 * struct zfcp_dbf - main dbf trace structure
243 * @pay: reference to payload trace area
244 * @rec: reference to recovery trace area
245 * @hba: reference to hba trace area
246 * @san: reference to san trace area
247 * @scsi: reference to scsi trace area
248 * @pay_lock: lock protecting payload trace buffer
249 * @rec_lock: lock protecting recovery trace buffer
250 * @hba_lock: lock protecting hba trace buffer
251 * @san_lock: lock protecting san trace buffer
252 * @scsi_lock: lock protecting scsi trace buffer
253 * @pay_buf: pre-allocated buffer for payload
254 * @rec_buf: pre-allocated buffer for recovery
255 * @hba_buf: pre-allocated buffer for hba
256 * @san_buf: pre-allocated buffer for san
257 * @scsi_buf: pre-allocated buffer for scsi
258 */
243struct zfcp_dbf { 259struct zfcp_dbf {
244 debug_info_t *pay; 260 debug_info_t *pay;
245 debug_info_t *rec; 261 debug_info_t *rec;
@@ -251,12 +267,11 @@ struct zfcp_dbf {
251 spinlock_t hba_lock; 267 spinlock_t hba_lock;
252 spinlock_t san_lock; 268 spinlock_t san_lock;
253 spinlock_t scsi_lock; 269 spinlock_t scsi_lock;
270 struct zfcp_dbf_pay pay_buf;
254 struct zfcp_dbf_rec rec_buf; 271 struct zfcp_dbf_rec rec_buf;
255 struct zfcp_dbf_hba hba_buf; 272 struct zfcp_dbf_hba hba_buf;
256 struct zfcp_dbf_san san_buf; 273 struct zfcp_dbf_san san_buf;
257 struct zfcp_dbf_scsi scsi_buf; 274 struct zfcp_dbf_scsi scsi_buf;
258 struct zfcp_dbf_pay pay_buf;
259 struct zfcp_adapter *adapter;
260}; 275};
261 276
262static inline 277static inline
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c
index 62b1b4a03ee3..066f9ea67502 100644
--- a/drivers/s390/scsi/zfcp_erp.c
+++ b/drivers/s390/scsi/zfcp_erp.c
@@ -236,7 +236,7 @@ static struct zfcp_erp_action *zfcp_erp_setup_act(int need, u32 act_status,
236static int zfcp_erp_action_enqueue(int want, struct zfcp_adapter *adapter, 236static int zfcp_erp_action_enqueue(int want, struct zfcp_adapter *adapter,
237 struct zfcp_port *port, 237 struct zfcp_port *port,
238 struct scsi_device *sdev, 238 struct scsi_device *sdev,
239 char *id, void *ref, u32 act_status) 239 char *id, u32 act_status)
240{ 240{
241 int retval = 1, need; 241 int retval = 1, need;
242 struct zfcp_erp_action *act; 242 struct zfcp_erp_action *act;
@@ -262,7 +262,7 @@ static int zfcp_erp_action_enqueue(int want, struct zfcp_adapter *adapter,
262} 262}
263 263
264static int _zfcp_erp_adapter_reopen(struct zfcp_adapter *adapter, 264static int _zfcp_erp_adapter_reopen(struct zfcp_adapter *adapter,
265 int clear_mask, char *id, void *ref) 265 int clear_mask, char *id)
266{ 266{
267 zfcp_erp_adapter_block(adapter, clear_mask); 267 zfcp_erp_adapter_block(adapter, clear_mask);
268 zfcp_scsi_schedule_rports_block(adapter); 268 zfcp_scsi_schedule_rports_block(adapter);
@@ -274,7 +274,7 @@ static int _zfcp_erp_adapter_reopen(struct zfcp_adapter *adapter,
274 return -EIO; 274 return -EIO;
275 } 275 }
276 return zfcp_erp_action_enqueue(ZFCP_ERP_ACTION_REOPEN_ADAPTER, 276 return zfcp_erp_action_enqueue(ZFCP_ERP_ACTION_REOPEN_ADAPTER,
277 adapter, NULL, NULL, id, ref, 0); 277 adapter, NULL, NULL, id, 0);
278} 278}
279 279
280/** 280/**
@@ -282,10 +282,8 @@ static int _zfcp_erp_adapter_reopen(struct zfcp_adapter *adapter,
282 * @adapter: Adapter to reopen. 282 * @adapter: Adapter to reopen.
283 * @clear: Status flags to clear. 283 * @clear: Status flags to clear.
284 * @id: Id for debug trace event. 284 * @id: Id for debug trace event.
285 * @ref: Reference for debug trace event.
286 */ 285 */
287void zfcp_erp_adapter_reopen(struct zfcp_adapter *adapter, int clear, 286void zfcp_erp_adapter_reopen(struct zfcp_adapter *adapter, int clear, char *id)
288 char *id, void *ref)
289{ 287{
290 unsigned long flags; 288 unsigned long flags;
291 289
@@ -298,7 +296,7 @@ void zfcp_erp_adapter_reopen(struct zfcp_adapter *adapter, int clear,
298 ZFCP_STATUS_COMMON_ERP_FAILED); 296 ZFCP_STATUS_COMMON_ERP_FAILED);
299 else 297 else
300 zfcp_erp_action_enqueue(ZFCP_ERP_ACTION_REOPEN_ADAPTER, adapter, 298 zfcp_erp_action_enqueue(ZFCP_ERP_ACTION_REOPEN_ADAPTER, adapter,
301 NULL, NULL, id, ref, 0); 299 NULL, NULL, id, 0);
302 write_unlock_irqrestore(&adapter->erp_lock, flags); 300 write_unlock_irqrestore(&adapter->erp_lock, flags);
303} 301}
304 302
@@ -307,13 +305,12 @@ void zfcp_erp_adapter_reopen(struct zfcp_adapter *adapter, int clear,
307 * @adapter: Adapter to shut down. 305 * @adapter: Adapter to shut down.
308 * @clear: Status flags to clear. 306 * @clear: Status flags to clear.
309 * @id: Id for debug trace event. 307 * @id: Id for debug trace event.
310 * @ref: Reference for debug trace event.
311 */ 308 */
312void zfcp_erp_adapter_shutdown(struct zfcp_adapter *adapter, int clear, 309void zfcp_erp_adapter_shutdown(struct zfcp_adapter *adapter, int clear,
313 char *id, void *ref) 310 char *id)
314{ 311{
315 int flags = ZFCP_STATUS_COMMON_RUNNING | ZFCP_STATUS_COMMON_ERP_FAILED; 312 int flags = ZFCP_STATUS_COMMON_RUNNING | ZFCP_STATUS_COMMON_ERP_FAILED;
316 zfcp_erp_adapter_reopen(adapter, clear | flags, id, ref); 313 zfcp_erp_adapter_reopen(adapter, clear | flags, id);
317} 314}
318 315
319/** 316/**
@@ -321,13 +318,11 @@ void zfcp_erp_adapter_shutdown(struct zfcp_adapter *adapter, int clear,
321 * @port: Port to shut down. 318 * @port: Port to shut down.
322 * @clear: Status flags to clear. 319 * @clear: Status flags to clear.
323 * @id: Id for debug trace event. 320 * @id: Id for debug trace event.
324 * @ref: Reference for debug trace event.
325 */ 321 */
326void zfcp_erp_port_shutdown(struct zfcp_port *port, int clear, char *id, 322void zfcp_erp_port_shutdown(struct zfcp_port *port, int clear, char *id)
327 void *ref)
328{ 323{
329 int flags = ZFCP_STATUS_COMMON_RUNNING | ZFCP_STATUS_COMMON_ERP_FAILED; 324 int flags = ZFCP_STATUS_COMMON_RUNNING | ZFCP_STATUS_COMMON_ERP_FAILED;
330 zfcp_erp_port_reopen(port, clear | flags, id, ref); 325 zfcp_erp_port_reopen(port, clear | flags, id);
331} 326}
332 327
333static void zfcp_erp_port_block(struct zfcp_port *port, int clear) 328static void zfcp_erp_port_block(struct zfcp_port *port, int clear)
@@ -336,8 +331,8 @@ static void zfcp_erp_port_block(struct zfcp_port *port, int clear)
336 ZFCP_STATUS_COMMON_UNBLOCKED | clear); 331 ZFCP_STATUS_COMMON_UNBLOCKED | clear);
337} 332}
338 333
339static void _zfcp_erp_port_forced_reopen(struct zfcp_port *port, 334static void _zfcp_erp_port_forced_reopen(struct zfcp_port *port, int clear,
340 int clear, char *id, void *ref) 335 char *id)
341{ 336{
342 zfcp_erp_port_block(port, clear); 337 zfcp_erp_port_block(port, clear);
343 zfcp_scsi_schedule_rport_block(port); 338 zfcp_scsi_schedule_rport_block(port);
@@ -346,28 +341,26 @@ static void _zfcp_erp_port_forced_reopen(struct zfcp_port *port,
346 return; 341 return;
347 342
348 zfcp_erp_action_enqueue(ZFCP_ERP_ACTION_REOPEN_PORT_FORCED, 343 zfcp_erp_action_enqueue(ZFCP_ERP_ACTION_REOPEN_PORT_FORCED,
349 port->adapter, port, NULL, id, ref, 0); 344 port->adapter, port, NULL, id, 0);
350} 345}
351 346
352/** 347/**
353 * zfcp_erp_port_forced_reopen - Forced close of port and open again 348 * zfcp_erp_port_forced_reopen - Forced close of port and open again
354 * @port: Port to force close and to reopen. 349 * @port: Port to force close and to reopen.
350 * @clear: Status flags to clear.
355 * @id: Id for debug trace event. 351 * @id: Id for debug trace event.
356 * @ref: Reference for debug trace event.
357 */ 352 */
358void zfcp_erp_port_forced_reopen(struct zfcp_port *port, int clear, char *id, 353void zfcp_erp_port_forced_reopen(struct zfcp_port *port, int clear, char *id)
359 void *ref)
360{ 354{
361 unsigned long flags; 355 unsigned long flags;
362 struct zfcp_adapter *adapter = port->adapter; 356 struct zfcp_adapter *adapter = port->adapter;
363 357
364 write_lock_irqsave(&adapter->erp_lock, flags); 358 write_lock_irqsave(&adapter->erp_lock, flags);
365 _zfcp_erp_port_forced_reopen(port, clear, id, ref); 359 _zfcp_erp_port_forced_reopen(port, clear, id);
366 write_unlock_irqrestore(&adapter->erp_lock, flags); 360 write_unlock_irqrestore(&adapter->erp_lock, flags);
367} 361}
368 362
369static int _zfcp_erp_port_reopen(struct zfcp_port *port, int clear, char *id, 363static int _zfcp_erp_port_reopen(struct zfcp_port *port, int clear, char *id)
370 void *ref)
371{ 364{
372 zfcp_erp_port_block(port, clear); 365 zfcp_erp_port_block(port, clear);
373 zfcp_scsi_schedule_rport_block(port); 366 zfcp_scsi_schedule_rport_block(port);
@@ -379,24 +372,25 @@ static int _zfcp_erp_port_reopen(struct zfcp_port *port, int clear, char *id,
379 } 372 }
380 373
381 return zfcp_erp_action_enqueue(ZFCP_ERP_ACTION_REOPEN_PORT, 374 return zfcp_erp_action_enqueue(ZFCP_ERP_ACTION_REOPEN_PORT,
382 port->adapter, port, NULL, id, ref, 0); 375 port->adapter, port, NULL, id, 0);
383} 376}
384 377
385/** 378/**
386 * zfcp_erp_port_reopen - trigger remote port recovery 379 * zfcp_erp_port_reopen - trigger remote port recovery
387 * @port: port to recover 380 * @port: port to recover
388 * @clear_mask: flags in port status to be cleared 381 * @clear_mask: flags in port status to be cleared
382 * @id: Id for debug trace event.
389 * 383 *
390 * Returns 0 if recovery has been triggered, < 0 if not. 384 * Returns 0 if recovery has been triggered, < 0 if not.
391 */ 385 */
392int zfcp_erp_port_reopen(struct zfcp_port *port, int clear, char *id, void *ref) 386int zfcp_erp_port_reopen(struct zfcp_port *port, int clear, char *id)
393{ 387{
394 int retval; 388 int retval;
395 unsigned long flags; 389 unsigned long flags;
396 struct zfcp_adapter *adapter = port->adapter; 390 struct zfcp_adapter *adapter = port->adapter;
397 391
398 write_lock_irqsave(&adapter->erp_lock, flags); 392 write_lock_irqsave(&adapter->erp_lock, flags);
399 retval = _zfcp_erp_port_reopen(port, clear, id, ref); 393 retval = _zfcp_erp_port_reopen(port, clear, id);
400 write_unlock_irqrestore(&adapter->erp_lock, flags); 394 write_unlock_irqrestore(&adapter->erp_lock, flags);
401 395
402 return retval; 396 return retval;
@@ -409,7 +403,7 @@ static void zfcp_erp_lun_block(struct scsi_device *sdev, int clear_mask)
409} 403}
410 404
411static void _zfcp_erp_lun_reopen(struct scsi_device *sdev, int clear, char *id, 405static void _zfcp_erp_lun_reopen(struct scsi_device *sdev, int clear, char *id,
412 void *ref, u32 act_status) 406 u32 act_status)
413{ 407{
414 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev); 408 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev);
415 struct zfcp_adapter *adapter = zfcp_sdev->port->adapter; 409 struct zfcp_adapter *adapter = zfcp_sdev->port->adapter;
@@ -420,17 +414,18 @@ static void _zfcp_erp_lun_reopen(struct scsi_device *sdev, int clear, char *id,
420 return; 414 return;
421 415
422 zfcp_erp_action_enqueue(ZFCP_ERP_ACTION_REOPEN_LUN, adapter, 416 zfcp_erp_action_enqueue(ZFCP_ERP_ACTION_REOPEN_LUN, adapter,
423 zfcp_sdev->port, sdev, id, ref, act_status); 417 zfcp_sdev->port, sdev, id, act_status);
424} 418}
425 419
426/** 420/**
427 * zfcp_erp_lun_reopen - initiate reopen of a LUN 421 * zfcp_erp_lun_reopen - initiate reopen of a LUN
428 * @sdev: SCSI device / LUN to be reopened 422 * @sdev: SCSI device / LUN to be reopened
429 * @clear_mask: specifies flags in LUN status to be cleared 423 * @clear_mask: specifies flags in LUN status to be cleared
424 * @id: Id for debug trace event.
425 *
430 * Return: 0 on success, < 0 on error 426 * Return: 0 on success, < 0 on error
431 */ 427 */
432void zfcp_erp_lun_reopen(struct scsi_device *sdev, int clear, char *id, 428void zfcp_erp_lun_reopen(struct scsi_device *sdev, int clear, char *id)
433 void *ref)
434{ 429{
435 unsigned long flags; 430 unsigned long flags;
436 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev); 431 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev);
@@ -438,7 +433,7 @@ void zfcp_erp_lun_reopen(struct scsi_device *sdev, int clear, char *id,
438 struct zfcp_adapter *adapter = port->adapter; 433 struct zfcp_adapter *adapter = port->adapter;
439 434
440 write_lock_irqsave(&adapter->erp_lock, flags); 435 write_lock_irqsave(&adapter->erp_lock, flags);
441 _zfcp_erp_lun_reopen(sdev, clear, id, ref, 0); 436 _zfcp_erp_lun_reopen(sdev, clear, id, 0);
442 write_unlock_irqrestore(&adapter->erp_lock, flags); 437 write_unlock_irqrestore(&adapter->erp_lock, flags);
443} 438}
444 439
@@ -447,13 +442,11 @@ void zfcp_erp_lun_reopen(struct scsi_device *sdev, int clear, char *id,
447 * @sdev: SCSI device / LUN to shut down. 442 * @sdev: SCSI device / LUN to shut down.
448 * @clear: Status flags to clear. 443 * @clear: Status flags to clear.
449 * @id: Id for debug trace event. 444 * @id: Id for debug trace event.
450 * @ref: Reference for debug trace event.
451 */ 445 */
452void zfcp_erp_lun_shutdown(struct scsi_device *sdev, int clear, char *id, 446void zfcp_erp_lun_shutdown(struct scsi_device *sdev, int clear, char *id)
453 void *ref)
454{ 447{
455 int flags = ZFCP_STATUS_COMMON_RUNNING | ZFCP_STATUS_COMMON_ERP_FAILED; 448 int flags = ZFCP_STATUS_COMMON_RUNNING | ZFCP_STATUS_COMMON_ERP_FAILED;
456 zfcp_erp_lun_reopen(sdev, clear | flags, id, ref); 449 zfcp_erp_lun_reopen(sdev, clear | flags, id);
457} 450}
458 451
459/** 452/**
@@ -475,7 +468,7 @@ void zfcp_erp_lun_shutdown_wait(struct scsi_device *sdev, char *id)
475 int clear = ZFCP_STATUS_COMMON_RUNNING | ZFCP_STATUS_COMMON_ERP_FAILED; 468 int clear = ZFCP_STATUS_COMMON_RUNNING | ZFCP_STATUS_COMMON_ERP_FAILED;
476 469
477 write_lock_irqsave(&adapter->erp_lock, flags); 470 write_lock_irqsave(&adapter->erp_lock, flags);
478 _zfcp_erp_lun_reopen(sdev, clear, id, NULL, ZFCP_STATUS_ERP_NO_REF); 471 _zfcp_erp_lun_reopen(sdev, clear, id, ZFCP_STATUS_ERP_NO_REF);
479 write_unlock_irqrestore(&adapter->erp_lock, flags); 472 write_unlock_irqrestore(&adapter->erp_lock, flags);
480 473
481 zfcp_erp_wait(adapter); 474 zfcp_erp_wait(adapter);
@@ -584,40 +577,40 @@ static void zfcp_erp_strategy_memwait(struct zfcp_erp_action *erp_action)
584} 577}
585 578
586static void _zfcp_erp_port_reopen_all(struct zfcp_adapter *adapter, 579static void _zfcp_erp_port_reopen_all(struct zfcp_adapter *adapter,
587 int clear, char *id, void *ref) 580 int clear, char *id)
588{ 581{
589 struct zfcp_port *port; 582 struct zfcp_port *port;
590 583
591 read_lock(&adapter->port_list_lock); 584 read_lock(&adapter->port_list_lock);
592 list_for_each_entry(port, &adapter->port_list, list) 585 list_for_each_entry(port, &adapter->port_list, list)
593 _zfcp_erp_port_reopen(port, clear, id, ref); 586 _zfcp_erp_port_reopen(port, clear, id);
594 read_unlock(&adapter->port_list_lock); 587 read_unlock(&adapter->port_list_lock);
595} 588}
596 589
597static void _zfcp_erp_lun_reopen_all(struct zfcp_port *port, int clear, 590static void _zfcp_erp_lun_reopen_all(struct zfcp_port *port, int clear,
598 char *id, void *ref) 591 char *id)
599{ 592{
600 struct scsi_device *sdev; 593 struct scsi_device *sdev;
601 594
602 shost_for_each_device(sdev, port->adapter->scsi_host) 595 shost_for_each_device(sdev, port->adapter->scsi_host)
603 if (sdev_to_zfcp(sdev)->port == port) 596 if (sdev_to_zfcp(sdev)->port == port)
604 _zfcp_erp_lun_reopen(sdev, clear, id, ref, 0); 597 _zfcp_erp_lun_reopen(sdev, clear, id, 0);
605} 598}
606 599
607static void zfcp_erp_strategy_followup_failed(struct zfcp_erp_action *act) 600static void zfcp_erp_strategy_followup_failed(struct zfcp_erp_action *act)
608{ 601{
609 switch (act->action) { 602 switch (act->action) {
610 case ZFCP_ERP_ACTION_REOPEN_ADAPTER: 603 case ZFCP_ERP_ACTION_REOPEN_ADAPTER:
611 _zfcp_erp_adapter_reopen(act->adapter, 0, "ersff_1", NULL); 604 _zfcp_erp_adapter_reopen(act->adapter, 0, "ersff_1");
612 break; 605 break;
613 case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED: 606 case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED:
614 _zfcp_erp_port_forced_reopen(act->port, 0, "ersff_2", NULL); 607 _zfcp_erp_port_forced_reopen(act->port, 0, "ersff_2");
615 break; 608 break;
616 case ZFCP_ERP_ACTION_REOPEN_PORT: 609 case ZFCP_ERP_ACTION_REOPEN_PORT:
617 _zfcp_erp_port_reopen(act->port, 0, "ersff_3", NULL); 610 _zfcp_erp_port_reopen(act->port, 0, "ersff_3");
618 break; 611 break;
619 case ZFCP_ERP_ACTION_REOPEN_LUN: 612 case ZFCP_ERP_ACTION_REOPEN_LUN:
620 _zfcp_erp_lun_reopen(act->sdev, 0, "ersff_4", NULL, 0); 613 _zfcp_erp_lun_reopen(act->sdev, 0, "ersff_4", 0);
621 break; 614 break;
622 } 615 }
623} 616}
@@ -626,13 +619,13 @@ static void zfcp_erp_strategy_followup_success(struct zfcp_erp_action *act)
626{ 619{
627 switch (act->action) { 620 switch (act->action) {
628 case ZFCP_ERP_ACTION_REOPEN_ADAPTER: 621 case ZFCP_ERP_ACTION_REOPEN_ADAPTER:
629 _zfcp_erp_port_reopen_all(act->adapter, 0, "ersfs_1", NULL); 622 _zfcp_erp_port_reopen_all(act->adapter, 0, "ersfs_1");
630 break; 623 break;
631 case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED: 624 case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED:
632 _zfcp_erp_port_reopen(act->port, 0, "ersfs_2", NULL); 625 _zfcp_erp_port_reopen(act->port, 0, "ersfs_2");
633 break; 626 break;
634 case ZFCP_ERP_ACTION_REOPEN_PORT: 627 case ZFCP_ERP_ACTION_REOPEN_PORT:
635 _zfcp_erp_lun_reopen_all(act->port, 0, "ersfs_3", NULL); 628 _zfcp_erp_lun_reopen_all(act->port, 0, "ersfs_3");
636 break; 629 break;
637 } 630 }
638} 631}
@@ -669,7 +662,7 @@ static void zfcp_erp_enqueue_ptp_port(struct zfcp_adapter *adapter)
669 adapter->peer_d_id); 662 adapter->peer_d_id);
670 if (IS_ERR(port)) /* error or port already attached */ 663 if (IS_ERR(port)) /* error or port already attached */
671 return; 664 return;
672 _zfcp_erp_port_reopen(port, 0, "ereptp1", NULL); 665 _zfcp_erp_port_reopen(port, 0, "ereptp1");
673} 666}
674 667
675static int zfcp_erp_adapter_strat_fsf_xconf(struct zfcp_erp_action *erp_action) 668static int zfcp_erp_adapter_strat_fsf_xconf(struct zfcp_erp_action *erp_action)
@@ -1163,7 +1156,7 @@ static int zfcp_erp_strategy_statechange(struct zfcp_erp_action *act, int ret)
1163 if (zfcp_erp_strat_change_det(&adapter->status, erp_status)) { 1156 if (zfcp_erp_strat_change_det(&adapter->status, erp_status)) {
1164 _zfcp_erp_adapter_reopen(adapter, 1157 _zfcp_erp_adapter_reopen(adapter,
1165 ZFCP_STATUS_COMMON_ERP_FAILED, 1158 ZFCP_STATUS_COMMON_ERP_FAILED,
1166 "ersscg1", NULL); 1159 "ersscg1");
1167 return ZFCP_ERP_EXIT; 1160 return ZFCP_ERP_EXIT;
1168 } 1161 }
1169 break; 1162 break;
@@ -1173,7 +1166,7 @@ static int zfcp_erp_strategy_statechange(struct zfcp_erp_action *act, int ret)
1173 if (zfcp_erp_strat_change_det(&port->status, erp_status)) { 1166 if (zfcp_erp_strat_change_det(&port->status, erp_status)) {
1174 _zfcp_erp_port_reopen(port, 1167 _zfcp_erp_port_reopen(port,
1175 ZFCP_STATUS_COMMON_ERP_FAILED, 1168 ZFCP_STATUS_COMMON_ERP_FAILED,
1176 "ersscg2", NULL); 1169 "ersscg2");
1177 return ZFCP_ERP_EXIT; 1170 return ZFCP_ERP_EXIT;
1178 } 1171 }
1179 break; 1172 break;
@@ -1183,7 +1176,7 @@ static int zfcp_erp_strategy_statechange(struct zfcp_erp_action *act, int ret)
1183 if (zfcp_erp_strat_change_det(&zfcp_sdev->status, erp_status)) { 1176 if (zfcp_erp_strat_change_det(&zfcp_sdev->status, erp_status)) {
1184 _zfcp_erp_lun_reopen(sdev, 1177 _zfcp_erp_lun_reopen(sdev,
1185 ZFCP_STATUS_COMMON_ERP_FAILED, 1178 ZFCP_STATUS_COMMON_ERP_FAILED,
1186 "ersscg3", NULL, 0); 1179 "ersscg3", 0);
1187 return ZFCP_ERP_EXIT; 1180 return ZFCP_ERP_EXIT;
1188 } 1181 }
1189 break; 1182 break;
@@ -1310,7 +1303,7 @@ static int zfcp_erp_strategy(struct zfcp_erp_action *erp_action)
1310 erp_action->status |= ZFCP_STATUS_ERP_LOWMEM; 1303 erp_action->status |= ZFCP_STATUS_ERP_LOWMEM;
1311 } 1304 }
1312 if (adapter->erp_total_count == adapter->erp_low_mem_count) 1305 if (adapter->erp_total_count == adapter->erp_low_mem_count)
1313 _zfcp_erp_adapter_reopen(adapter, 0, "erstgy1", NULL); 1306 _zfcp_erp_adapter_reopen(adapter, 0, "erstgy1");
1314 else { 1307 else {
1315 zfcp_erp_strategy_memwait(erp_action); 1308 zfcp_erp_strategy_memwait(erp_action);
1316 retval = ZFCP_ERP_CONTINUES; 1309 retval = ZFCP_ERP_CONTINUES;
diff --git a/drivers/s390/scsi/zfcp_ext.h b/drivers/s390/scsi/zfcp_ext.h
index b68a546275a5..6e325284fbe7 100644
--- a/drivers/s390/scsi/zfcp_ext.h
+++ b/drivers/s390/scsi/zfcp_ext.h
@@ -45,7 +45,7 @@ extern void zfcp_cfdc_adapter_access_changed(struct zfcp_adapter *);
45 45
46/* zfcp_dbf.c */ 46/* zfcp_dbf.c */
47extern int zfcp_dbf_adapter_register(struct zfcp_adapter *); 47extern int zfcp_dbf_adapter_register(struct zfcp_adapter *);
48extern void zfcp_dbf_adapter_unregister(struct zfcp_dbf *); 48extern void zfcp_dbf_adapter_unregister(struct zfcp_adapter *);
49extern void zfcp_dbf_rec_trig(char *, struct zfcp_adapter *, 49extern void zfcp_dbf_rec_trig(char *, struct zfcp_adapter *,
50 struct zfcp_port *, struct scsi_device *, u8, u8); 50 struct zfcp_port *, struct scsi_device *, u8, u8);
51extern void zfcp_dbf_rec_run(char *, struct zfcp_erp_action *); 51extern void zfcp_dbf_rec_run(char *, struct zfcp_erp_action *);
@@ -61,19 +61,17 @@ extern void zfcp_dbf_scsi(char *, struct scsi_cmnd *, struct zfcp_fsf_req *);
61/* zfcp_erp.c */ 61/* zfcp_erp.c */
62extern void zfcp_erp_set_adapter_status(struct zfcp_adapter *, u32); 62extern void zfcp_erp_set_adapter_status(struct zfcp_adapter *, u32);
63extern void zfcp_erp_clear_adapter_status(struct zfcp_adapter *, u32); 63extern void zfcp_erp_clear_adapter_status(struct zfcp_adapter *, u32);
64extern void zfcp_erp_adapter_reopen(struct zfcp_adapter *, int, char *, void *); 64extern void zfcp_erp_adapter_reopen(struct zfcp_adapter *, int, char *);
65extern void zfcp_erp_adapter_shutdown(struct zfcp_adapter *, int, char *, 65extern void zfcp_erp_adapter_shutdown(struct zfcp_adapter *, int, char *);
66 void *);
67extern void zfcp_erp_set_port_status(struct zfcp_port *, u32); 66extern void zfcp_erp_set_port_status(struct zfcp_port *, u32);
68extern void zfcp_erp_clear_port_status(struct zfcp_port *, u32); 67extern void zfcp_erp_clear_port_status(struct zfcp_port *, u32);
69extern int zfcp_erp_port_reopen(struct zfcp_port *, int, char *, void *); 68extern int zfcp_erp_port_reopen(struct zfcp_port *, int, char *);
70extern void zfcp_erp_port_shutdown(struct zfcp_port *, int, char *, void *); 69extern void zfcp_erp_port_shutdown(struct zfcp_port *, int, char *);
71extern void zfcp_erp_port_forced_reopen(struct zfcp_port *, int, char *, 70extern void zfcp_erp_port_forced_reopen(struct zfcp_port *, int, char *);
72 void *);
73extern void zfcp_erp_set_lun_status(struct scsi_device *, u32); 71extern void zfcp_erp_set_lun_status(struct scsi_device *, u32);
74extern void zfcp_erp_clear_lun_status(struct scsi_device *, u32); 72extern void zfcp_erp_clear_lun_status(struct scsi_device *, u32);
75extern void zfcp_erp_lun_reopen(struct scsi_device *, int, char *, void *); 73extern void zfcp_erp_lun_reopen(struct scsi_device *, int, char *);
76extern void zfcp_erp_lun_shutdown(struct scsi_device *, int, char *, void *); 74extern void zfcp_erp_lun_shutdown(struct scsi_device *, int, char *);
77extern void zfcp_erp_lun_shutdown_wait(struct scsi_device *, char *); 75extern void zfcp_erp_lun_shutdown_wait(struct scsi_device *, char *);
78extern int zfcp_erp_thread_setup(struct zfcp_adapter *); 76extern int zfcp_erp_thread_setup(struct zfcp_adapter *);
79extern void zfcp_erp_thread_kill(struct zfcp_adapter *); 77extern void zfcp_erp_thread_kill(struct zfcp_adapter *);
diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c
index 7d44d9c59bdc..30cf91a787a3 100644
--- a/drivers/s390/scsi/zfcp_fc.c
+++ b/drivers/s390/scsi/zfcp_fc.c
@@ -174,7 +174,7 @@ static void _zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req, u32 range,
174 if (!port->d_id) 174 if (!port->d_id)
175 zfcp_erp_port_reopen(port, 175 zfcp_erp_port_reopen(port,
176 ZFCP_STATUS_COMMON_ERP_FAILED, 176 ZFCP_STATUS_COMMON_ERP_FAILED,
177 "fcrscn1", NULL); 177 "fcrscn1");
178 } 178 }
179 read_unlock_irqrestore(&adapter->port_list_lock, flags); 179 read_unlock_irqrestore(&adapter->port_list_lock, flags);
180} 180}
@@ -215,7 +215,7 @@ static void zfcp_fc_incoming_wwpn(struct zfcp_fsf_req *req, u64 wwpn)
215 read_lock_irqsave(&adapter->port_list_lock, flags); 215 read_lock_irqsave(&adapter->port_list_lock, flags);
216 list_for_each_entry(port, &adapter->port_list, list) 216 list_for_each_entry(port, &adapter->port_list, list)
217 if (port->wwpn == wwpn) { 217 if (port->wwpn == wwpn) {
218 zfcp_erp_port_forced_reopen(port, 0, "fciwwp1", req); 218 zfcp_erp_port_forced_reopen(port, 0, "fciwwp1");
219 break; 219 break;
220 } 220 }
221 read_unlock_irqrestore(&adapter->port_list_lock, flags); 221 read_unlock_irqrestore(&adapter->port_list_lock, flags);
@@ -360,7 +360,7 @@ void zfcp_fc_port_did_lookup(struct work_struct *work)
360 ret = zfcp_fc_ns_gid_pn(port); 360 ret = zfcp_fc_ns_gid_pn(port);
361 if (ret) { 361 if (ret) {
362 /* could not issue gid_pn for some reason */ 362 /* could not issue gid_pn for some reason */
363 zfcp_erp_adapter_reopen(port->adapter, 0, "fcgpn_1", NULL); 363 zfcp_erp_adapter_reopen(port->adapter, 0, "fcgpn_1");
364 goto out; 364 goto out;
365 } 365 }
366 366
@@ -369,7 +369,7 @@ void zfcp_fc_port_did_lookup(struct work_struct *work)
369 goto out; 369 goto out;
370 } 370 }
371 371
372 zfcp_erp_port_reopen(port, 0, "fcgpn_3", NULL); 372 zfcp_erp_port_reopen(port, 0, "fcgpn_3");
373out: 373out:
374 put_device(&port->dev); 374 put_device(&port->dev);
375} 375}
@@ -426,7 +426,7 @@ static void zfcp_fc_adisc_handler(void *data)
426 if (adisc->els.status) { 426 if (adisc->els.status) {
427 /* request rejected or timed out */ 427 /* request rejected or timed out */
428 zfcp_erp_port_forced_reopen(port, ZFCP_STATUS_COMMON_ERP_FAILED, 428 zfcp_erp_port_forced_reopen(port, ZFCP_STATUS_COMMON_ERP_FAILED,
429 "fcadh_1", NULL); 429 "fcadh_1");
430 goto out; 430 goto out;
431 } 431 }
432 432
@@ -436,7 +436,7 @@ static void zfcp_fc_adisc_handler(void *data)
436 if ((port->wwpn != adisc_resp->adisc_wwpn) || 436 if ((port->wwpn != adisc_resp->adisc_wwpn) ||
437 !(atomic_read(&port->status) & ZFCP_STATUS_COMMON_OPEN)) { 437 !(atomic_read(&port->status) & ZFCP_STATUS_COMMON_OPEN)) {
438 zfcp_erp_port_reopen(port, ZFCP_STATUS_COMMON_ERP_FAILED, 438 zfcp_erp_port_reopen(port, ZFCP_STATUS_COMMON_ERP_FAILED,
439 "fcadh_2", NULL); 439 "fcadh_2");
440 goto out; 440 goto out;
441 } 441 }
442 442
@@ -507,7 +507,7 @@ void zfcp_fc_link_test_work(struct work_struct *work)
507 507
508 /* send of ADISC was not possible */ 508 /* send of ADISC was not possible */
509 atomic_clear_mask(ZFCP_STATUS_PORT_LINK_TEST, &port->status); 509 atomic_clear_mask(ZFCP_STATUS_PORT_LINK_TEST, &port->status);
510 zfcp_erp_port_forced_reopen(port, 0, "fcltwk1", NULL); 510 zfcp_erp_port_forced_reopen(port, 0, "fcltwk1");
511 511
512out: 512out:
513 put_device(&port->dev); 513 put_device(&port->dev);
@@ -659,7 +659,7 @@ static int zfcp_fc_eval_gpn_ft(struct zfcp_fc_gpn_ft *gpn_ft,
659 port = zfcp_port_enqueue(adapter, acc->fp_wwpn, 659 port = zfcp_port_enqueue(adapter, acc->fp_wwpn,
660 ZFCP_STATUS_COMMON_NOESC, d_id); 660 ZFCP_STATUS_COMMON_NOESC, d_id);
661 if (!IS_ERR(port)) 661 if (!IS_ERR(port))
662 zfcp_erp_port_reopen(port, 0, "fcegpf1", NULL); 662 zfcp_erp_port_reopen(port, 0, "fcegpf1");
663 else if (PTR_ERR(port) != -EEXIST) 663 else if (PTR_ERR(port) != -EEXIST)
664 ret = PTR_ERR(port); 664 ret = PTR_ERR(port);
665 } 665 }
@@ -671,7 +671,7 @@ static int zfcp_fc_eval_gpn_ft(struct zfcp_fc_gpn_ft *gpn_ft,
671 write_unlock_irqrestore(&adapter->port_list_lock, flags); 671 write_unlock_irqrestore(&adapter->port_list_lock, flags);
672 672
673 list_for_each_entry_safe(port, tmp, &remove_lh, list) { 673 list_for_each_entry_safe(port, tmp, &remove_lh, list) {
674 zfcp_erp_port_shutdown(port, 0, "fcegpf2", NULL); 674 zfcp_erp_port_shutdown(port, 0, "fcegpf2");
675 zfcp_device_unregister(&port->dev, &zfcp_sysfs_port_attrs); 675 zfcp_device_unregister(&port->dev, &zfcp_sysfs_port_attrs);
676 } 676 }
677 677
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
index 5bb118e01f36..60ff9d172c79 100644
--- a/drivers/s390/scsi/zfcp_fsf.c
+++ b/drivers/s390/scsi/zfcp_fsf.c
@@ -23,7 +23,7 @@ static void zfcp_fsf_request_timeout_handler(unsigned long data)
23 struct zfcp_adapter *adapter = (struct zfcp_adapter *) data; 23 struct zfcp_adapter *adapter = (struct zfcp_adapter *) data;
24 zfcp_qdio_siosl(adapter); 24 zfcp_qdio_siosl(adapter);
25 zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 25 zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED,
26 "fsrth_1", NULL); 26 "fsrth_1");
27} 27}
28 28
29static void zfcp_fsf_start_timer(struct zfcp_fsf_req *fsf_req, 29static void zfcp_fsf_start_timer(struct zfcp_fsf_req *fsf_req,
@@ -65,7 +65,7 @@ static void zfcp_fsf_class_not_supp(struct zfcp_fsf_req *req)
65{ 65{
66 dev_err(&req->adapter->ccw_device->dev, "FCP device not " 66 dev_err(&req->adapter->ccw_device->dev, "FCP device not "
67 "operational because of an unsupported FC class\n"); 67 "operational because of an unsupported FC class\n");
68 zfcp_erp_adapter_shutdown(req->adapter, 0, "fscns_1", req); 68 zfcp_erp_adapter_shutdown(req->adapter, 0, "fscns_1");
69 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 69 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
70} 70}
71 71
@@ -98,7 +98,7 @@ static void zfcp_fsf_status_read_port_closed(struct zfcp_fsf_req *req)
98 read_lock_irqsave(&adapter->port_list_lock, flags); 98 read_lock_irqsave(&adapter->port_list_lock, flags);
99 list_for_each_entry(port, &adapter->port_list, list) 99 list_for_each_entry(port, &adapter->port_list, list)
100 if (port->d_id == d_id) { 100 if (port->d_id == d_id) {
101 zfcp_erp_port_reopen(port, 0, "fssrpc1", req); 101 zfcp_erp_port_reopen(port, 0, "fssrpc1");
102 break; 102 break;
103 } 103 }
104 read_unlock_irqrestore(&adapter->port_list_lock, flags); 104 read_unlock_irqrestore(&adapter->port_list_lock, flags);
@@ -247,7 +247,7 @@ static void zfcp_fsf_status_read_handler(struct zfcp_fsf_req *req)
247 zfcp_erp_adapter_reopen(adapter, 247 zfcp_erp_adapter_reopen(adapter,
248 ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED | 248 ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED |
249 ZFCP_STATUS_COMMON_ERP_FAILED, 249 ZFCP_STATUS_COMMON_ERP_FAILED,
250 "fssrh_2", req); 250 "fssrh_2");
251 zfcp_fc_enqueue_event(adapter, FCH_EVT_LINKUP, 0); 251 zfcp_fc_enqueue_event(adapter, FCH_EVT_LINKUP, 0);
252 252
253 break; 253 break;
@@ -287,7 +287,7 @@ static void zfcp_fsf_fsfstatus_qual_eval(struct zfcp_fsf_req *req)
287 "The FCP adapter reported a problem " 287 "The FCP adapter reported a problem "
288 "that cannot be recovered\n"); 288 "that cannot be recovered\n");
289 zfcp_qdio_siosl(req->adapter); 289 zfcp_qdio_siosl(req->adapter);
290 zfcp_erp_adapter_shutdown(req->adapter, 0, "fsfsqe1", req); 290 zfcp_erp_adapter_shutdown(req->adapter, 0, "fsfsqe1");
291 break; 291 break;
292 } 292 }
293 /* all non-return stats set FSFREQ_ERROR*/ 293 /* all non-return stats set FSFREQ_ERROR*/
@@ -304,7 +304,7 @@ static void zfcp_fsf_fsfstatus_eval(struct zfcp_fsf_req *req)
304 dev_err(&req->adapter->ccw_device->dev, 304 dev_err(&req->adapter->ccw_device->dev,
305 "The FCP adapter does not recognize the command 0x%x\n", 305 "The FCP adapter does not recognize the command 0x%x\n",
306 req->qtcb->header.fsf_command); 306 req->qtcb->header.fsf_command);
307 zfcp_erp_adapter_shutdown(req->adapter, 0, "fsfse_1", req); 307 zfcp_erp_adapter_shutdown(req->adapter, 0, "fsfse_1");
308 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 308 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
309 break; 309 break;
310 case FSF_ADAPTER_STATUS_AVAILABLE: 310 case FSF_ADAPTER_STATUS_AVAILABLE:
@@ -335,17 +335,17 @@ static void zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *req)
335 "QTCB version 0x%x not supported by FCP adapter " 335 "QTCB version 0x%x not supported by FCP adapter "
336 "(0x%x to 0x%x)\n", FSF_QTCB_CURRENT_VERSION, 336 "(0x%x to 0x%x)\n", FSF_QTCB_CURRENT_VERSION,
337 psq->word[0], psq->word[1]); 337 psq->word[0], psq->word[1]);
338 zfcp_erp_adapter_shutdown(adapter, 0, "fspse_1", req); 338 zfcp_erp_adapter_shutdown(adapter, 0, "fspse_1");
339 break; 339 break;
340 case FSF_PROT_ERROR_STATE: 340 case FSF_PROT_ERROR_STATE:
341 case FSF_PROT_SEQ_NUMB_ERROR: 341 case FSF_PROT_SEQ_NUMB_ERROR:
342 zfcp_erp_adapter_reopen(adapter, 0, "fspse_2", req); 342 zfcp_erp_adapter_reopen(adapter, 0, "fspse_2");
343 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 343 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
344 break; 344 break;
345 case FSF_PROT_UNSUPP_QTCB_TYPE: 345 case FSF_PROT_UNSUPP_QTCB_TYPE:
346 dev_err(&adapter->ccw_device->dev, 346 dev_err(&adapter->ccw_device->dev,
347 "The QTCB type is not supported by the FCP adapter\n"); 347 "The QTCB type is not supported by the FCP adapter\n");
348 zfcp_erp_adapter_shutdown(adapter, 0, "fspse_3", req); 348 zfcp_erp_adapter_shutdown(adapter, 0, "fspse_3");
349 break; 349 break;
350 case FSF_PROT_HOST_CONNECTION_INITIALIZING: 350 case FSF_PROT_HOST_CONNECTION_INITIALIZING:
351 atomic_set_mask(ZFCP_STATUS_ADAPTER_HOST_CON_INIT, 351 atomic_set_mask(ZFCP_STATUS_ADAPTER_HOST_CON_INIT,
@@ -355,12 +355,12 @@ static void zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *req)
355 dev_err(&adapter->ccw_device->dev, 355 dev_err(&adapter->ccw_device->dev,
356 "0x%Lx is an ambiguous request identifier\n", 356 "0x%Lx is an ambiguous request identifier\n",
357 (unsigned long long)qtcb->bottom.support.req_handle); 357 (unsigned long long)qtcb->bottom.support.req_handle);
358 zfcp_erp_adapter_shutdown(adapter, 0, "fspse_4", req); 358 zfcp_erp_adapter_shutdown(adapter, 0, "fspse_4");
359 break; 359 break;
360 case FSF_PROT_LINK_DOWN: 360 case FSF_PROT_LINK_DOWN:
361 zfcp_fsf_link_down_info_eval(req, &psq->link_down_info); 361 zfcp_fsf_link_down_info_eval(req, &psq->link_down_info);
362 /* go through reopen to flush pending requests */ 362 /* go through reopen to flush pending requests */
363 zfcp_erp_adapter_reopen(adapter, 0, "fspse_6", req); 363 zfcp_erp_adapter_reopen(adapter, 0, "fspse_6");
364 break; 364 break;
365 case FSF_PROT_REEST_QUEUE: 365 case FSF_PROT_REEST_QUEUE:
366 /* All ports should be marked as ready to run again */ 366 /* All ports should be marked as ready to run again */
@@ -369,14 +369,14 @@ static void zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *req)
369 zfcp_erp_adapter_reopen(adapter, 369 zfcp_erp_adapter_reopen(adapter,
370 ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED | 370 ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED |
371 ZFCP_STATUS_COMMON_ERP_FAILED, 371 ZFCP_STATUS_COMMON_ERP_FAILED,
372 "fspse_8", req); 372 "fspse_8");
373 break; 373 break;
374 default: 374 default:
375 dev_err(&adapter->ccw_device->dev, 375 dev_err(&adapter->ccw_device->dev,
376 "0x%x is not a valid transfer protocol status\n", 376 "0x%x is not a valid transfer protocol status\n",
377 qtcb->prefix.prot_status); 377 qtcb->prefix.prot_status);
378 zfcp_qdio_siosl(adapter); 378 zfcp_qdio_siosl(adapter);
379 zfcp_erp_adapter_shutdown(adapter, 0, "fspse_9", req); 379 zfcp_erp_adapter_shutdown(adapter, 0, "fspse_9");
380 } 380 }
381 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 381 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
382} 382}
@@ -482,7 +482,7 @@ static int zfcp_fsf_exchange_config_evaluate(struct zfcp_fsf_req *req)
482 dev_err(&adapter->ccw_device->dev, 482 dev_err(&adapter->ccw_device->dev,
483 "Unknown or unsupported arbitrated loop " 483 "Unknown or unsupported arbitrated loop "
484 "fibre channel topology detected\n"); 484 "fibre channel topology detected\n");
485 zfcp_erp_adapter_shutdown(adapter, 0, "fsece_1", req); 485 zfcp_erp_adapter_shutdown(adapter, 0, "fsece_1");
486 return -EIO; 486 return -EIO;
487 } 487 }
488 488
@@ -518,7 +518,7 @@ static void zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *req)
518 "FCP adapter maximum QTCB size (%d bytes) " 518 "FCP adapter maximum QTCB size (%d bytes) "
519 "is too small\n", 519 "is too small\n",
520 bottom->max_qtcb_size); 520 bottom->max_qtcb_size);
521 zfcp_erp_adapter_shutdown(adapter, 0, "fsecdh1", req); 521 zfcp_erp_adapter_shutdown(adapter, 0, "fsecdh1");
522 return; 522 return;
523 } 523 }
524 atomic_set_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK, 524 atomic_set_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK,
@@ -536,7 +536,7 @@ static void zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *req)
536 &qtcb->header.fsf_status_qual.link_down_info); 536 &qtcb->header.fsf_status_qual.link_down_info);
537 break; 537 break;
538 default: 538 default:
539 zfcp_erp_adapter_shutdown(adapter, 0, "fsecdh3", req); 539 zfcp_erp_adapter_shutdown(adapter, 0, "fsecdh3");
540 return; 540 return;
541 } 541 }
542 542
@@ -552,14 +552,14 @@ static void zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *req)
552 dev_err(&adapter->ccw_device->dev, 552 dev_err(&adapter->ccw_device->dev,
553 "The FCP adapter only supports newer " 553 "The FCP adapter only supports newer "
554 "control block versions\n"); 554 "control block versions\n");
555 zfcp_erp_adapter_shutdown(adapter, 0, "fsecdh4", req); 555 zfcp_erp_adapter_shutdown(adapter, 0, "fsecdh4");
556 return; 556 return;
557 } 557 }
558 if (FSF_QTCB_CURRENT_VERSION > bottom->high_qtcb_version) { 558 if (FSF_QTCB_CURRENT_VERSION > bottom->high_qtcb_version) {
559 dev_err(&adapter->ccw_device->dev, 559 dev_err(&adapter->ccw_device->dev,
560 "The FCP adapter only supports older " 560 "The FCP adapter only supports older "
561 "control block versions\n"); 561 "control block versions\n");
562 zfcp_erp_adapter_shutdown(adapter, 0, "fsecdh5", req); 562 zfcp_erp_adapter_shutdown(adapter, 0, "fsecdh5");
563 } 563 }
564} 564}
565 565
@@ -700,7 +700,7 @@ static int zfcp_fsf_req_send(struct zfcp_fsf_req *req)
700 del_timer(&req->timer); 700 del_timer(&req->timer);
701 /* lookup request again, list might have changed */ 701 /* lookup request again, list might have changed */
702 zfcp_reqlist_find_rm(adapter->req_list, req_id); 702 zfcp_reqlist_find_rm(adapter->req_list, req_id);
703 zfcp_erp_adapter_reopen(adapter, 0, "fsrs__1", req); 703 zfcp_erp_adapter_reopen(adapter, 0, "fsrs__1");
704 return -EIO; 704 return -EIO;
705 } 705 }
706 706
@@ -777,14 +777,13 @@ static void zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *req)
777 case FSF_PORT_HANDLE_NOT_VALID: 777 case FSF_PORT_HANDLE_NOT_VALID:
778 if (fsq->word[0] == fsq->word[1]) { 778 if (fsq->word[0] == fsq->word[1]) {
779 zfcp_erp_adapter_reopen(zfcp_sdev->port->adapter, 0, 779 zfcp_erp_adapter_reopen(zfcp_sdev->port->adapter, 0,
780 "fsafch1", req); 780 "fsafch1");
781 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 781 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
782 } 782 }
783 break; 783 break;
784 case FSF_LUN_HANDLE_NOT_VALID: 784 case FSF_LUN_HANDLE_NOT_VALID:
785 if (fsq->word[0] == fsq->word[1]) { 785 if (fsq->word[0] == fsq->word[1]) {
786 zfcp_erp_port_reopen(zfcp_sdev->port, 0, "fsafch2", 786 zfcp_erp_port_reopen(zfcp_sdev->port, 0, "fsafch2");
787 req);
788 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 787 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
789 } 788 }
790 break; 789 break;
@@ -795,14 +794,13 @@ static void zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *req)
795 zfcp_erp_set_port_status(zfcp_sdev->port, 794 zfcp_erp_set_port_status(zfcp_sdev->port,
796 ZFCP_STATUS_COMMON_ACCESS_BOXED); 795 ZFCP_STATUS_COMMON_ACCESS_BOXED);
797 zfcp_erp_port_reopen(zfcp_sdev->port, 796 zfcp_erp_port_reopen(zfcp_sdev->port,
798 ZFCP_STATUS_COMMON_ERP_FAILED, "fsafch3", 797 ZFCP_STATUS_COMMON_ERP_FAILED, "fsafch3");
799 req);
800 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 798 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
801 break; 799 break;
802 case FSF_LUN_BOXED: 800 case FSF_LUN_BOXED:
803 zfcp_erp_set_lun_status(sdev, ZFCP_STATUS_COMMON_ACCESS_BOXED); 801 zfcp_erp_set_lun_status(sdev, ZFCP_STATUS_COMMON_ACCESS_BOXED);
804 zfcp_erp_lun_reopen(sdev, ZFCP_STATUS_COMMON_ERP_FAILED, 802 zfcp_erp_lun_reopen(sdev, ZFCP_STATUS_COMMON_ERP_FAILED,
805 "fsafch4", req); 803 "fsafch4");
806 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 804 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
807 break; 805 break;
808 case FSF_ADAPTER_STATUS_AVAILABLE: 806 case FSF_ADAPTER_STATUS_AVAILABLE:
@@ -903,7 +901,7 @@ static void zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *req)
903 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 901 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
904 break; 902 break;
905 case FSF_PORT_HANDLE_NOT_VALID: 903 case FSF_PORT_HANDLE_NOT_VALID:
906 zfcp_erp_adapter_reopen(adapter, 0, "fsscth1", req); 904 zfcp_erp_adapter_reopen(adapter, 0, "fsscth1");
907 /* fall through */ 905 /* fall through */
908 case FSF_GENERIC_COMMAND_REJECTED: 906 case FSF_GENERIC_COMMAND_REJECTED:
909 case FSF_PAYLOAD_SIZE_MISMATCH: 907 case FSF_PAYLOAD_SIZE_MISMATCH:
@@ -1449,7 +1447,7 @@ static void zfcp_fsf_close_port_handler(struct zfcp_fsf_req *req)
1449 1447
1450 switch (req->qtcb->header.fsf_status) { 1448 switch (req->qtcb->header.fsf_status) {
1451 case FSF_PORT_HANDLE_NOT_VALID: 1449 case FSF_PORT_HANDLE_NOT_VALID:
1452 zfcp_erp_adapter_reopen(port->adapter, 0, "fscph_1", req); 1450 zfcp_erp_adapter_reopen(port->adapter, 0, "fscph_1");
1453 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1451 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1454 break; 1452 break;
1455 case FSF_ADAPTER_STATUS_AVAILABLE: 1453 case FSF_ADAPTER_STATUS_AVAILABLE:
@@ -1581,7 +1579,7 @@ static void zfcp_fsf_close_wka_port_handler(struct zfcp_fsf_req *req)
1581 1579
1582 if (req->qtcb->header.fsf_status == FSF_PORT_HANDLE_NOT_VALID) { 1580 if (req->qtcb->header.fsf_status == FSF_PORT_HANDLE_NOT_VALID) {
1583 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1581 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1584 zfcp_erp_adapter_reopen(wka_port->adapter, 0, "fscwph1", req); 1582 zfcp_erp_adapter_reopen(wka_port->adapter, 0, "fscwph1");
1585 } 1583 }
1586 1584
1587 wka_port->status = ZFCP_FC_WKA_PORT_OFFLINE; 1585 wka_port->status = ZFCP_FC_WKA_PORT_OFFLINE;
@@ -1639,7 +1637,7 @@ static void zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *req)
1639 1637
1640 switch (header->fsf_status) { 1638 switch (header->fsf_status) {
1641 case FSF_PORT_HANDLE_NOT_VALID: 1639 case FSF_PORT_HANDLE_NOT_VALID:
1642 zfcp_erp_adapter_reopen(port->adapter, 0, "fscpph1", req); 1640 zfcp_erp_adapter_reopen(port->adapter, 0, "fscpph1");
1643 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1641 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1644 break; 1642 break;
1645 case FSF_ACCESS_DENIED: 1643 case FSF_ACCESS_DENIED:
@@ -1655,7 +1653,7 @@ static void zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *req)
1655 &sdev_to_zfcp(sdev)->status); 1653 &sdev_to_zfcp(sdev)->status);
1656 zfcp_erp_set_port_status(port, ZFCP_STATUS_COMMON_ACCESS_BOXED); 1654 zfcp_erp_set_port_status(port, ZFCP_STATUS_COMMON_ACCESS_BOXED);
1657 zfcp_erp_port_reopen(port, ZFCP_STATUS_COMMON_ERP_FAILED, 1655 zfcp_erp_port_reopen(port, ZFCP_STATUS_COMMON_ERP_FAILED,
1658 "fscpph2", req); 1656 "fscpph2");
1659 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1657 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1660 break; 1658 break;
1661 case FSF_ADAPTER_STATUS_AVAILABLE: 1659 case FSF_ADAPTER_STATUS_AVAILABLE:
@@ -1744,7 +1742,7 @@ static void zfcp_fsf_open_lun_handler(struct zfcp_fsf_req *req)
1744 switch (header->fsf_status) { 1742 switch (header->fsf_status) {
1745 1743
1746 case FSF_PORT_HANDLE_NOT_VALID: 1744 case FSF_PORT_HANDLE_NOT_VALID:
1747 zfcp_erp_adapter_reopen(adapter, 0, "fsouh_1", req); 1745 zfcp_erp_adapter_reopen(adapter, 0, "fsouh_1");
1748 /* fall through */ 1746 /* fall through */
1749 case FSF_LUN_ALREADY_OPEN: 1747 case FSF_LUN_ALREADY_OPEN:
1750 break; 1748 break;
@@ -1756,8 +1754,7 @@ static void zfcp_fsf_open_lun_handler(struct zfcp_fsf_req *req)
1756 zfcp_erp_set_port_status(zfcp_sdev->port, 1754 zfcp_erp_set_port_status(zfcp_sdev->port,
1757 ZFCP_STATUS_COMMON_ACCESS_BOXED); 1755 ZFCP_STATUS_COMMON_ACCESS_BOXED);
1758 zfcp_erp_port_reopen(zfcp_sdev->port, 1756 zfcp_erp_port_reopen(zfcp_sdev->port,
1759 ZFCP_STATUS_COMMON_ERP_FAILED, "fsouh_2", 1757 ZFCP_STATUS_COMMON_ERP_FAILED, "fsouh_2");
1760 req);
1761 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1758 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1762 break; 1759 break;
1763 case FSF_LUN_SHARING_VIOLATION: 1760 case FSF_LUN_SHARING_VIOLATION:
@@ -1853,20 +1850,18 @@ static void zfcp_fsf_close_lun_handler(struct zfcp_fsf_req *req)
1853 1850
1854 switch (req->qtcb->header.fsf_status) { 1851 switch (req->qtcb->header.fsf_status) {
1855 case FSF_PORT_HANDLE_NOT_VALID: 1852 case FSF_PORT_HANDLE_NOT_VALID:
1856 zfcp_erp_adapter_reopen(zfcp_sdev->port->adapter, 0, "fscuh_1", 1853 zfcp_erp_adapter_reopen(zfcp_sdev->port->adapter, 0, "fscuh_1");
1857 req);
1858 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1854 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1859 break; 1855 break;
1860 case FSF_LUN_HANDLE_NOT_VALID: 1856 case FSF_LUN_HANDLE_NOT_VALID:
1861 zfcp_erp_port_reopen(zfcp_sdev->port, 0, "fscuh_2", req); 1857 zfcp_erp_port_reopen(zfcp_sdev->port, 0, "fscuh_2");
1862 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1858 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1863 break; 1859 break;
1864 case FSF_PORT_BOXED: 1860 case FSF_PORT_BOXED:
1865 zfcp_erp_set_port_status(zfcp_sdev->port, 1861 zfcp_erp_set_port_status(zfcp_sdev->port,
1866 ZFCP_STATUS_COMMON_ACCESS_BOXED); 1862 ZFCP_STATUS_COMMON_ACCESS_BOXED);
1867 zfcp_erp_port_reopen(zfcp_sdev->port, 1863 zfcp_erp_port_reopen(zfcp_sdev->port,
1868 ZFCP_STATUS_COMMON_ERP_FAILED, "fscuh_3", 1864 ZFCP_STATUS_COMMON_ERP_FAILED, "fscuh_3");
1869 req);
1870 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1865 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1871 break; 1866 break;
1872 case FSF_ADAPTER_STATUS_AVAILABLE: 1867 case FSF_ADAPTER_STATUS_AVAILABLE:
@@ -2003,13 +1998,12 @@ static void zfcp_fsf_fcp_handler_common(struct zfcp_fsf_req *req)
2003 switch (header->fsf_status) { 1998 switch (header->fsf_status) {
2004 case FSF_HANDLE_MISMATCH: 1999 case FSF_HANDLE_MISMATCH:
2005 case FSF_PORT_HANDLE_NOT_VALID: 2000 case FSF_PORT_HANDLE_NOT_VALID:
2006 zfcp_erp_adapter_reopen(zfcp_sdev->port->adapter, 0, "fssfch1", 2001 zfcp_erp_adapter_reopen(zfcp_sdev->port->adapter, 0, "fssfch1");
2007 req);
2008 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2002 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2009 break; 2003 break;
2010 case FSF_FCPLUN_NOT_VALID: 2004 case FSF_FCPLUN_NOT_VALID:
2011 case FSF_LUN_HANDLE_NOT_VALID: 2005 case FSF_LUN_HANDLE_NOT_VALID:
2012 zfcp_erp_port_reopen(zfcp_sdev->port, 0, "fssfch2", req); 2006 zfcp_erp_port_reopen(zfcp_sdev->port, 0, "fssfch2");
2013 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2007 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2014 break; 2008 break;
2015 case FSF_SERVICE_CLASS_NOT_SUPPORTED: 2009 case FSF_SERVICE_CLASS_NOT_SUPPORTED:
@@ -2027,7 +2021,7 @@ static void zfcp_fsf_fcp_handler_common(struct zfcp_fsf_req *req)
2027 (unsigned long long)zfcp_scsi_dev_lun(sdev), 2021 (unsigned long long)zfcp_scsi_dev_lun(sdev),
2028 (unsigned long long)zfcp_sdev->port->wwpn); 2022 (unsigned long long)zfcp_sdev->port->wwpn);
2029 zfcp_erp_adapter_shutdown(zfcp_sdev->port->adapter, 0, 2023 zfcp_erp_adapter_shutdown(zfcp_sdev->port->adapter, 0,
2030 "fssfch3", req); 2024 "fssfch3");
2031 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2025 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2032 break; 2026 break;
2033 case FSF_CMND_LENGTH_NOT_VALID: 2027 case FSF_CMND_LENGTH_NOT_VALID:
@@ -2038,21 +2032,20 @@ static void zfcp_fsf_fcp_handler_common(struct zfcp_fsf_req *req)
2038 (unsigned long long)zfcp_scsi_dev_lun(sdev), 2032 (unsigned long long)zfcp_scsi_dev_lun(sdev),
2039 (unsigned long long)zfcp_sdev->port->wwpn); 2033 (unsigned long long)zfcp_sdev->port->wwpn);
2040 zfcp_erp_adapter_shutdown(zfcp_sdev->port->adapter, 0, 2034 zfcp_erp_adapter_shutdown(zfcp_sdev->port->adapter, 0,
2041 "fssfch4", req); 2035 "fssfch4");
2042 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2036 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2043 break; 2037 break;
2044 case FSF_PORT_BOXED: 2038 case FSF_PORT_BOXED:
2045 zfcp_erp_set_port_status(zfcp_sdev->port, 2039 zfcp_erp_set_port_status(zfcp_sdev->port,
2046 ZFCP_STATUS_COMMON_ACCESS_BOXED); 2040 ZFCP_STATUS_COMMON_ACCESS_BOXED);
2047 zfcp_erp_port_reopen(zfcp_sdev->port, 2041 zfcp_erp_port_reopen(zfcp_sdev->port,
2048 ZFCP_STATUS_COMMON_ERP_FAILED, "fssfch5", 2042 ZFCP_STATUS_COMMON_ERP_FAILED, "fssfch5");
2049 req);
2050 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2043 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2051 break; 2044 break;
2052 case FSF_LUN_BOXED: 2045 case FSF_LUN_BOXED:
2053 zfcp_erp_set_lun_status(sdev, ZFCP_STATUS_COMMON_ACCESS_BOXED); 2046 zfcp_erp_set_lun_status(sdev, ZFCP_STATUS_COMMON_ACCESS_BOXED);
2054 zfcp_erp_lun_reopen(sdev, ZFCP_STATUS_COMMON_ERP_FAILED, 2047 zfcp_erp_lun_reopen(sdev, ZFCP_STATUS_COMMON_ERP_FAILED,
2055 "fssfch6", req); 2048 "fssfch6");
2056 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2049 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2057 break; 2050 break;
2058 case FSF_ADAPTER_STATUS_AVAILABLE: 2051 case FSF_ADAPTER_STATUS_AVAILABLE:
diff --git a/drivers/s390/scsi/zfcp_qdio.c b/drivers/s390/scsi/zfcp_qdio.c
index 434a33ba0509..d99c9dc9cfcb 100644
--- a/drivers/s390/scsi/zfcp_qdio.c
+++ b/drivers/s390/scsi/zfcp_qdio.c
@@ -41,7 +41,7 @@ static void zfcp_qdio_handler_error(struct zfcp_qdio *qdio, char *id,
41 zfcp_qdio_siosl(adapter); 41 zfcp_qdio_siosl(adapter);
42 zfcp_erp_adapter_reopen(adapter, 42 zfcp_erp_adapter_reopen(adapter,
43 ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED | 43 ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED |
44 ZFCP_STATUS_COMMON_ERP_FAILED, id, NULL); 44 ZFCP_STATUS_COMMON_ERP_FAILED, id);
45} 45}
46 46
47static void zfcp_qdio_zero_sbals(struct qdio_buffer *sbal[], int first, int cnt) 47static void zfcp_qdio_zero_sbals(struct qdio_buffer *sbal[], int first, int cnt)
@@ -114,7 +114,7 @@ static void zfcp_qdio_int_resp(struct ccw_device *cdev, unsigned int qdio_err,
114 * put SBALs back to response queue 114 * put SBALs back to response queue
115 */ 115 */
116 if (do_QDIO(cdev, QDIO_FLAG_SYNC_INPUT, 0, idx, count)) 116 if (do_QDIO(cdev, QDIO_FLAG_SYNC_INPUT, 0, idx, count))
117 zfcp_erp_adapter_reopen(qdio->adapter, 0, "qdires2", NULL); 117 zfcp_erp_adapter_reopen(qdio->adapter, 0, "qdires2");
118} 118}
119 119
120static struct qdio_buffer_element * 120static struct qdio_buffer_element *
@@ -234,7 +234,7 @@ int zfcp_qdio_sbal_get(struct zfcp_qdio *qdio)
234 if (!ret) { 234 if (!ret) {
235 atomic_inc(&qdio->req_q_full); 235 atomic_inc(&qdio->req_q_full);
236 /* assume hanging outbound queue, try queue recovery */ 236 /* assume hanging outbound queue, try queue recovery */
237 zfcp_erp_adapter_reopen(qdio->adapter, 0, "qdsbg_1", NULL); 237 zfcp_erp_adapter_reopen(qdio->adapter, 0, "qdsbg_1");
238 } 238 }
239 239
240 spin_lock_irq(&qdio->req_q_lock); 240 spin_lock_irq(&qdio->req_q_lock);
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c
index 8c5c1c89c098..59a653d15a19 100644
--- a/drivers/s390/scsi/zfcp_scsi.c
+++ b/drivers/s390/scsi/zfcp_scsi.c
@@ -154,7 +154,7 @@ static int zfcp_scsi_slave_alloc(struct scsi_device *sdev)
154 spin_lock_init(&zfcp_sdev->latencies.lock); 154 spin_lock_init(&zfcp_sdev->latencies.lock);
155 155
156 zfcp_erp_set_lun_status(sdev, ZFCP_STATUS_COMMON_RUNNING); 156 zfcp_erp_set_lun_status(sdev, ZFCP_STATUS_COMMON_RUNNING);
157 zfcp_erp_lun_reopen(sdev, 0, "scsla_1", NULL); 157 zfcp_erp_lun_reopen(sdev, 0, "scsla_1");
158 zfcp_erp_wait(port->adapter); 158 zfcp_erp_wait(port->adapter);
159 159
160 return 0; 160 return 0;
@@ -278,7 +278,7 @@ static int zfcp_scsi_eh_host_reset_handler(struct scsi_cmnd *scpnt)
278 struct zfcp_adapter *adapter = zfcp_sdev->port->adapter; 278 struct zfcp_adapter *adapter = zfcp_sdev->port->adapter;
279 int ret; 279 int ret;
280 280
281 zfcp_erp_adapter_reopen(adapter, 0, "schrh_1", scpnt); 281 zfcp_erp_adapter_reopen(adapter, 0, "schrh_1");
282 zfcp_erp_wait(adapter); 282 zfcp_erp_wait(adapter);
283 ret = fc_block_scsi_eh(scpnt); 283 ret = fc_block_scsi_eh(scpnt);
284 if (ret) 284 if (ret)
@@ -516,7 +516,7 @@ static void zfcp_scsi_terminate_rport_io(struct fc_rport *rport)
516 port = zfcp_get_port_by_wwpn(adapter, rport->port_name); 516 port = zfcp_get_port_by_wwpn(adapter, rport->port_name);
517 517
518 if (port) { 518 if (port) {
519 zfcp_erp_port_forced_reopen(port, 0, "sctrpi1", NULL); 519 zfcp_erp_port_forced_reopen(port, 0, "sctrpi1");
520 put_device(&port->dev); 520 put_device(&port->dev);
521 } 521 }
522} 522}
diff --git a/drivers/s390/scsi/zfcp_sysfs.c b/drivers/s390/scsi/zfcp_sysfs.c
index 2f2c54f4718f..cdc4ff78a7ba 100644
--- a/drivers/s390/scsi/zfcp_sysfs.c
+++ b/drivers/s390/scsi/zfcp_sysfs.c
@@ -105,8 +105,7 @@ static ssize_t zfcp_sysfs_port_failed_store(struct device *dev,
105 return -EINVAL; 105 return -EINVAL;
106 106
107 zfcp_erp_set_port_status(port, ZFCP_STATUS_COMMON_RUNNING); 107 zfcp_erp_set_port_status(port, ZFCP_STATUS_COMMON_RUNNING);
108 zfcp_erp_port_reopen(port, ZFCP_STATUS_COMMON_ERP_FAILED, "sypfai2", 108 zfcp_erp_port_reopen(port, ZFCP_STATUS_COMMON_ERP_FAILED, "sypfai2");
109 NULL);
110 zfcp_erp_wait(port->adapter); 109 zfcp_erp_wait(port->adapter);
111 110
112 return count; 111 return count;
@@ -148,7 +147,7 @@ static ssize_t zfcp_sysfs_unit_failed_store(struct device *dev,
148 if (sdev) { 147 if (sdev) {
149 zfcp_erp_set_lun_status(sdev, ZFCP_STATUS_COMMON_RUNNING); 148 zfcp_erp_set_lun_status(sdev, ZFCP_STATUS_COMMON_RUNNING);
150 zfcp_erp_lun_reopen(sdev, ZFCP_STATUS_COMMON_ERP_FAILED, 149 zfcp_erp_lun_reopen(sdev, ZFCP_STATUS_COMMON_ERP_FAILED,
151 "syufai2", NULL); 150 "syufai2");
152 zfcp_erp_wait(unit->port->adapter); 151 zfcp_erp_wait(unit->port->adapter);
153 } else 152 } else
154 zfcp_unit_scsi_scan(unit); 153 zfcp_unit_scsi_scan(unit);
@@ -198,7 +197,7 @@ static ssize_t zfcp_sysfs_adapter_failed_store(struct device *dev,
198 197
199 zfcp_erp_set_adapter_status(adapter, ZFCP_STATUS_COMMON_RUNNING); 198 zfcp_erp_set_adapter_status(adapter, ZFCP_STATUS_COMMON_RUNNING);
200 zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 199 zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED,
201 "syafai2", NULL); 200 "syafai2");
202 zfcp_erp_wait(adapter); 201 zfcp_erp_wait(adapter);
203out: 202out:
204 zfcp_ccw_adapter_put(adapter); 203 zfcp_ccw_adapter_put(adapter);
@@ -256,7 +255,7 @@ static ssize_t zfcp_sysfs_port_remove_store(struct device *dev,
256 255
257 put_device(&port->dev); 256 put_device(&port->dev);
258 257
259 zfcp_erp_port_shutdown(port, 0, "syprs_1", NULL); 258 zfcp_erp_port_shutdown(port, 0, "syprs_1");
260 zfcp_device_unregister(&port->dev, &zfcp_sysfs_port_attrs); 259 zfcp_device_unregister(&port->dev, &zfcp_sysfs_port_attrs);
261 out: 260 out:
262 zfcp_ccw_adapter_put(adapter); 261 zfcp_ccw_adapter_put(adapter);