diff options
Diffstat (limited to 'drivers/s390/scsi/zfcp_erp.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_erp.c | 137 |
1 files changed, 70 insertions, 67 deletions
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index 28c7185f24bc..65addf6a91ec 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c | |||
@@ -55,7 +55,7 @@ enum zfcp_erp_act_result { | |||
55 | 55 | ||
56 | static void zfcp_erp_adapter_block(struct zfcp_adapter *adapter, int mask) | 56 | static void zfcp_erp_adapter_block(struct zfcp_adapter *adapter, int mask) |
57 | { | 57 | { |
58 | zfcp_erp_modify_adapter_status(adapter, 15, NULL, | 58 | zfcp_erp_modify_adapter_status(adapter, "erablk1", NULL, |
59 | ZFCP_STATUS_COMMON_UNBLOCKED | mask, | 59 | ZFCP_STATUS_COMMON_UNBLOCKED | mask, |
60 | ZFCP_CLEAR); | 60 | ZFCP_CLEAR); |
61 | } | 61 | } |
@@ -75,9 +75,9 @@ static void zfcp_erp_action_ready(struct zfcp_erp_action *act) | |||
75 | struct zfcp_adapter *adapter = act->adapter; | 75 | struct zfcp_adapter *adapter = act->adapter; |
76 | 76 | ||
77 | list_move(&act->list, &act->adapter->erp_ready_head); | 77 | list_move(&act->list, &act->adapter->erp_ready_head); |
78 | zfcp_rec_dbf_event_action(146, act); | 78 | zfcp_rec_dbf_event_action("erardy1", act); |
79 | up(&adapter->erp_ready_sem); | 79 | up(&adapter->erp_ready_sem); |
80 | zfcp_rec_dbf_event_thread(2, adapter); | 80 | zfcp_rec_dbf_event_thread("erardy2", adapter); |
81 | } | 81 | } |
82 | 82 | ||
83 | static void zfcp_erp_action_dismiss(struct zfcp_erp_action *act) | 83 | static void zfcp_erp_action_dismiss(struct zfcp_erp_action *act) |
@@ -208,7 +208,7 @@ static struct zfcp_erp_action *zfcp_erp_setup_act(int need, | |||
208 | 208 | ||
209 | static int zfcp_erp_action_enqueue(int want, struct zfcp_adapter *adapter, | 209 | static int zfcp_erp_action_enqueue(int want, struct zfcp_adapter *adapter, |
210 | struct zfcp_port *port, | 210 | struct zfcp_port *port, |
211 | struct zfcp_unit *unit, u8 id, void *ref) | 211 | struct zfcp_unit *unit, char *id, void *ref) |
212 | { | 212 | { |
213 | int retval = 1, need; | 213 | int retval = 1, need; |
214 | struct zfcp_erp_action *act = NULL; | 214 | struct zfcp_erp_action *act = NULL; |
@@ -228,7 +228,7 @@ static int zfcp_erp_action_enqueue(int want, struct zfcp_adapter *adapter, | |||
228 | ++adapter->erp_total_count; | 228 | ++adapter->erp_total_count; |
229 | list_add_tail(&act->list, &adapter->erp_ready_head); | 229 | list_add_tail(&act->list, &adapter->erp_ready_head); |
230 | up(&adapter->erp_ready_sem); | 230 | up(&adapter->erp_ready_sem); |
231 | zfcp_rec_dbf_event_thread(1, adapter); | 231 | zfcp_rec_dbf_event_thread("eracte1", adapter); |
232 | retval = 0; | 232 | retval = 0; |
233 | out: | 233 | out: |
234 | zfcp_rec_dbf_event_trigger(id, ref, want, need, act, | 234 | zfcp_rec_dbf_event_trigger(id, ref, want, need, act, |
@@ -237,13 +237,13 @@ static int zfcp_erp_action_enqueue(int want, struct zfcp_adapter *adapter, | |||
237 | } | 237 | } |
238 | 238 | ||
239 | static int _zfcp_erp_adapter_reopen(struct zfcp_adapter *adapter, | 239 | static int _zfcp_erp_adapter_reopen(struct zfcp_adapter *adapter, |
240 | int clear_mask, u8 id, void *ref) | 240 | int clear_mask, char *id, void *ref) |
241 | { | 241 | { |
242 | zfcp_erp_adapter_block(adapter, clear_mask); | 242 | zfcp_erp_adapter_block(adapter, clear_mask); |
243 | 243 | ||
244 | /* ensure propagation of failed status to new devices */ | 244 | /* ensure propagation of failed status to new devices */ |
245 | if (atomic_read(&adapter->status) & ZFCP_STATUS_COMMON_ERP_FAILED) { | 245 | if (atomic_read(&adapter->status) & ZFCP_STATUS_COMMON_ERP_FAILED) { |
246 | zfcp_erp_adapter_failed(adapter, 13, NULL); | 246 | zfcp_erp_adapter_failed(adapter, "erareo1", NULL); |
247 | return -EIO; | 247 | return -EIO; |
248 | } | 248 | } |
249 | return zfcp_erp_action_enqueue(ZFCP_ERP_ACTION_REOPEN_ADAPTER, | 249 | return zfcp_erp_action_enqueue(ZFCP_ERP_ACTION_REOPEN_ADAPTER, |
@@ -258,7 +258,7 @@ static int _zfcp_erp_adapter_reopen(struct zfcp_adapter *adapter, | |||
258 | * @ref: Reference for debug trace event. | 258 | * @ref: Reference for debug trace event. |
259 | */ | 259 | */ |
260 | void zfcp_erp_adapter_reopen(struct zfcp_adapter *adapter, int clear, | 260 | void zfcp_erp_adapter_reopen(struct zfcp_adapter *adapter, int clear, |
261 | u8 id, void *ref) | 261 | char *id, void *ref) |
262 | { | 262 | { |
263 | unsigned long flags; | 263 | unsigned long flags; |
264 | 264 | ||
@@ -277,7 +277,7 @@ void zfcp_erp_adapter_reopen(struct zfcp_adapter *adapter, int clear, | |||
277 | * @ref: Reference for debug trace event. | 277 | * @ref: Reference for debug trace event. |
278 | */ | 278 | */ |
279 | void zfcp_erp_adapter_shutdown(struct zfcp_adapter *adapter, int clear, | 279 | void zfcp_erp_adapter_shutdown(struct zfcp_adapter *adapter, int clear, |
280 | u8 id, void *ref) | 280 | char *id, void *ref) |
281 | { | 281 | { |
282 | int flags = ZFCP_STATUS_COMMON_RUNNING | ZFCP_STATUS_COMMON_ERP_FAILED; | 282 | int flags = ZFCP_STATUS_COMMON_RUNNING | ZFCP_STATUS_COMMON_ERP_FAILED; |
283 | zfcp_erp_adapter_reopen(adapter, clear | flags, id, ref); | 283 | zfcp_erp_adapter_reopen(adapter, clear | flags, id, ref); |
@@ -290,7 +290,8 @@ void zfcp_erp_adapter_shutdown(struct zfcp_adapter *adapter, int clear, | |||
290 | * @id: Id for debug trace event. | 290 | * @id: Id for debug trace event. |
291 | * @ref: Reference for debug trace event. | 291 | * @ref: Reference for debug trace event. |
292 | */ | 292 | */ |
293 | void zfcp_erp_port_shutdown(struct zfcp_port *port, int clear, u8 id, void *ref) | 293 | void zfcp_erp_port_shutdown(struct zfcp_port *port, int clear, char *id, |
294 | void *ref) | ||
294 | { | 295 | { |
295 | int flags = ZFCP_STATUS_COMMON_RUNNING | ZFCP_STATUS_COMMON_ERP_FAILED; | 296 | int flags = ZFCP_STATUS_COMMON_RUNNING | ZFCP_STATUS_COMMON_ERP_FAILED; |
296 | zfcp_erp_port_reopen(port, clear | flags, id, ref); | 297 | zfcp_erp_port_reopen(port, clear | flags, id, ref); |
@@ -303,7 +304,8 @@ void zfcp_erp_port_shutdown(struct zfcp_port *port, int clear, u8 id, void *ref) | |||
303 | * @id: Id for debug trace event. | 304 | * @id: Id for debug trace event. |
304 | * @ref: Reference for debug trace event. | 305 | * @ref: Reference for debug trace event. |
305 | */ | 306 | */ |
306 | void zfcp_erp_unit_shutdown(struct zfcp_unit *unit, int clear, u8 id, void *ref) | 307 | void zfcp_erp_unit_shutdown(struct zfcp_unit *unit, int clear, char *id, |
308 | void *ref) | ||
307 | { | 309 | { |
308 | int flags = ZFCP_STATUS_COMMON_RUNNING | ZFCP_STATUS_COMMON_ERP_FAILED; | 310 | int flags = ZFCP_STATUS_COMMON_RUNNING | ZFCP_STATUS_COMMON_ERP_FAILED; |
309 | zfcp_erp_unit_reopen(unit, clear | flags, id, ref); | 311 | zfcp_erp_unit_reopen(unit, clear | flags, id, ref); |
@@ -311,13 +313,13 @@ void zfcp_erp_unit_shutdown(struct zfcp_unit *unit, int clear, u8 id, void *ref) | |||
311 | 313 | ||
312 | static void zfcp_erp_port_block(struct zfcp_port *port, int clear) | 314 | static void zfcp_erp_port_block(struct zfcp_port *port, int clear) |
313 | { | 315 | { |
314 | zfcp_erp_modify_port_status(port, 17, NULL, | 316 | zfcp_erp_modify_port_status(port, "erpblk1", NULL, |
315 | ZFCP_STATUS_COMMON_UNBLOCKED | clear, | 317 | ZFCP_STATUS_COMMON_UNBLOCKED | clear, |
316 | ZFCP_CLEAR); | 318 | ZFCP_CLEAR); |
317 | } | 319 | } |
318 | 320 | ||
319 | static void _zfcp_erp_port_forced_reopen(struct zfcp_port *port, | 321 | static void _zfcp_erp_port_forced_reopen(struct zfcp_port *port, |
320 | int clear, u8 id, void *ref) | 322 | int clear, char *id, void *ref) |
321 | { | 323 | { |
322 | zfcp_erp_port_block(port, clear); | 324 | zfcp_erp_port_block(port, clear); |
323 | 325 | ||
@@ -334,7 +336,7 @@ static void _zfcp_erp_port_forced_reopen(struct zfcp_port *port, | |||
334 | * @id: Id for debug trace event. | 336 | * @id: Id for debug trace event. |
335 | * @ref: Reference for debug trace event. | 337 | * @ref: Reference for debug trace event. |
336 | */ | 338 | */ |
337 | void zfcp_erp_port_forced_reopen(struct zfcp_port *port, int clear, u8 id, | 339 | void zfcp_erp_port_forced_reopen(struct zfcp_port *port, int clear, char *id, |
338 | void *ref) | 340 | void *ref) |
339 | { | 341 | { |
340 | unsigned long flags; | 342 | unsigned long flags; |
@@ -347,14 +349,14 @@ void zfcp_erp_port_forced_reopen(struct zfcp_port *port, int clear, u8 id, | |||
347 | read_unlock_irqrestore(&zfcp_data.config_lock, flags); | 349 | read_unlock_irqrestore(&zfcp_data.config_lock, flags); |
348 | } | 350 | } |
349 | 351 | ||
350 | static int _zfcp_erp_port_reopen(struct zfcp_port *port, int clear, u8 id, | 352 | static int _zfcp_erp_port_reopen(struct zfcp_port *port, int clear, char *id, |
351 | void *ref) | 353 | void *ref) |
352 | { | 354 | { |
353 | zfcp_erp_port_block(port, clear); | 355 | zfcp_erp_port_block(port, clear); |
354 | 356 | ||
355 | if (atomic_read(&port->status) & ZFCP_STATUS_COMMON_ERP_FAILED) { | 357 | if (atomic_read(&port->status) & ZFCP_STATUS_COMMON_ERP_FAILED) { |
356 | /* ensure propagation of failed status to new devices */ | 358 | /* ensure propagation of failed status to new devices */ |
357 | zfcp_erp_port_failed(port, 14, NULL); | 359 | zfcp_erp_port_failed(port, "erpreo1", NULL); |
358 | return -EIO; | 360 | return -EIO; |
359 | } | 361 | } |
360 | 362 | ||
@@ -369,7 +371,7 @@ static int _zfcp_erp_port_reopen(struct zfcp_port *port, int clear, u8 id, | |||
369 | * | 371 | * |
370 | * Returns 0 if recovery has been triggered, < 0 if not. | 372 | * Returns 0 if recovery has been triggered, < 0 if not. |
371 | */ | 373 | */ |
372 | int zfcp_erp_port_reopen(struct zfcp_port *port, int clear, u8 id, void *ref) | 374 | int zfcp_erp_port_reopen(struct zfcp_port *port, int clear, char *id, void *ref) |
373 | { | 375 | { |
374 | unsigned long flags; | 376 | unsigned long flags; |
375 | int retval; | 377 | int retval; |
@@ -386,12 +388,12 @@ int zfcp_erp_port_reopen(struct zfcp_port *port, int clear, u8 id, void *ref) | |||
386 | 388 | ||
387 | static void zfcp_erp_unit_block(struct zfcp_unit *unit, int clear_mask) | 389 | static void zfcp_erp_unit_block(struct zfcp_unit *unit, int clear_mask) |
388 | { | 390 | { |
389 | zfcp_erp_modify_unit_status(unit, 19, NULL, | 391 | zfcp_erp_modify_unit_status(unit, "erublk1", NULL, |
390 | ZFCP_STATUS_COMMON_UNBLOCKED | clear_mask, | 392 | ZFCP_STATUS_COMMON_UNBLOCKED | clear_mask, |
391 | ZFCP_CLEAR); | 393 | ZFCP_CLEAR); |
392 | } | 394 | } |
393 | 395 | ||
394 | static void _zfcp_erp_unit_reopen(struct zfcp_unit *unit, int clear, u8 id, | 396 | static void _zfcp_erp_unit_reopen(struct zfcp_unit *unit, int clear, char *id, |
395 | void *ref) | 397 | void *ref) |
396 | { | 398 | { |
397 | struct zfcp_adapter *adapter = unit->port->adapter; | 399 | struct zfcp_adapter *adapter = unit->port->adapter; |
@@ -411,7 +413,8 @@ static void _zfcp_erp_unit_reopen(struct zfcp_unit *unit, int clear, u8 id, | |||
411 | * @clear_mask: specifies flags in unit status to be cleared | 413 | * @clear_mask: specifies flags in unit status to be cleared |
412 | * Return: 0 on success, < 0 on error | 414 | * Return: 0 on success, < 0 on error |
413 | */ | 415 | */ |
414 | void zfcp_erp_unit_reopen(struct zfcp_unit *unit, int clear, u8 id, void *ref) | 416 | void zfcp_erp_unit_reopen(struct zfcp_unit *unit, int clear, char *id, |
417 | void *ref) | ||
415 | { | 418 | { |
416 | unsigned long flags; | 419 | unsigned long flags; |
417 | struct zfcp_port *port = unit->port; | 420 | struct zfcp_port *port = unit->port; |
@@ -437,28 +440,28 @@ static int status_change_clear(unsigned long mask, atomic_t *status) | |||
437 | static void zfcp_erp_adapter_unblock(struct zfcp_adapter *adapter) | 440 | static void zfcp_erp_adapter_unblock(struct zfcp_adapter *adapter) |
438 | { | 441 | { |
439 | if (status_change_set(ZFCP_STATUS_COMMON_UNBLOCKED, &adapter->status)) | 442 | if (status_change_set(ZFCP_STATUS_COMMON_UNBLOCKED, &adapter->status)) |
440 | zfcp_rec_dbf_event_adapter(16, NULL, adapter); | 443 | zfcp_rec_dbf_event_adapter("eraubl1", NULL, adapter); |
441 | atomic_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED, &adapter->status); | 444 | atomic_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED, &adapter->status); |
442 | } | 445 | } |
443 | 446 | ||
444 | static void zfcp_erp_port_unblock(struct zfcp_port *port) | 447 | static void zfcp_erp_port_unblock(struct zfcp_port *port) |
445 | { | 448 | { |
446 | if (status_change_set(ZFCP_STATUS_COMMON_UNBLOCKED, &port->status)) | 449 | if (status_change_set(ZFCP_STATUS_COMMON_UNBLOCKED, &port->status)) |
447 | zfcp_rec_dbf_event_port(18, NULL, port); | 450 | zfcp_rec_dbf_event_port("erpubl1", NULL, port); |
448 | atomic_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED, &port->status); | 451 | atomic_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED, &port->status); |
449 | } | 452 | } |
450 | 453 | ||
451 | static void zfcp_erp_unit_unblock(struct zfcp_unit *unit) | 454 | static void zfcp_erp_unit_unblock(struct zfcp_unit *unit) |
452 | { | 455 | { |
453 | if (status_change_set(ZFCP_STATUS_COMMON_UNBLOCKED, &unit->status)) | 456 | if (status_change_set(ZFCP_STATUS_COMMON_UNBLOCKED, &unit->status)) |
454 | zfcp_rec_dbf_event_unit(20, NULL, unit); | 457 | zfcp_rec_dbf_event_unit("eruubl1", NULL, unit); |
455 | atomic_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED, &unit->status); | 458 | atomic_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED, &unit->status); |
456 | } | 459 | } |
457 | 460 | ||
458 | static void zfcp_erp_action_to_running(struct zfcp_erp_action *erp_action) | 461 | static void zfcp_erp_action_to_running(struct zfcp_erp_action *erp_action) |
459 | { | 462 | { |
460 | list_move(&erp_action->list, &erp_action->adapter->erp_running_head); | 463 | list_move(&erp_action->list, &erp_action->adapter->erp_running_head); |
461 | zfcp_rec_dbf_event_action(145, erp_action); | 464 | zfcp_rec_dbf_event_action("erator1", erp_action); |
462 | } | 465 | } |
463 | 466 | ||
464 | static void zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *act) | 467 | static void zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *act) |
@@ -474,11 +477,11 @@ static void zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *act) | |||
474 | if (act->status & (ZFCP_STATUS_ERP_DISMISSED | | 477 | if (act->status & (ZFCP_STATUS_ERP_DISMISSED | |
475 | ZFCP_STATUS_ERP_TIMEDOUT)) { | 478 | ZFCP_STATUS_ERP_TIMEDOUT)) { |
476 | act->fsf_req->status |= ZFCP_STATUS_FSFREQ_DISMISSED; | 479 | act->fsf_req->status |= ZFCP_STATUS_FSFREQ_DISMISSED; |
477 | zfcp_rec_dbf_event_action(142, act); | 480 | zfcp_rec_dbf_event_action("erscf_1", act); |
478 | act->fsf_req->erp_action = NULL; | 481 | act->fsf_req->erp_action = NULL; |
479 | } | 482 | } |
480 | if (act->status & ZFCP_STATUS_ERP_TIMEDOUT) | 483 | if (act->status & ZFCP_STATUS_ERP_TIMEDOUT) |
481 | zfcp_rec_dbf_event_action(143, act); | 484 | zfcp_rec_dbf_event_action("erscf_2", act); |
482 | if (act->fsf_req->status & (ZFCP_STATUS_FSFREQ_COMPLETED | | 485 | if (act->fsf_req->status & (ZFCP_STATUS_FSFREQ_COMPLETED | |
483 | ZFCP_STATUS_FSFREQ_DISMISSED)) | 486 | ZFCP_STATUS_FSFREQ_DISMISSED)) |
484 | act->fsf_req = NULL; | 487 | act->fsf_req = NULL; |
@@ -530,7 +533,7 @@ static void zfcp_erp_strategy_memwait(struct zfcp_erp_action *erp_action) | |||
530 | } | 533 | } |
531 | 534 | ||
532 | static void _zfcp_erp_port_reopen_all(struct zfcp_adapter *adapter, | 535 | static void _zfcp_erp_port_reopen_all(struct zfcp_adapter *adapter, |
533 | int clear, u8 id, void *ref) | 536 | int clear, char *id, void *ref) |
534 | { | 537 | { |
535 | struct zfcp_port *port; | 538 | struct zfcp_port *port; |
536 | 539 | ||
@@ -538,8 +541,8 @@ static void _zfcp_erp_port_reopen_all(struct zfcp_adapter *adapter, | |||
538 | _zfcp_erp_port_reopen(port, clear, id, ref); | 541 | _zfcp_erp_port_reopen(port, clear, id, ref); |
539 | } | 542 | } |
540 | 543 | ||
541 | static void _zfcp_erp_unit_reopen_all(struct zfcp_port *port, int clear, u8 id, | 544 | static void _zfcp_erp_unit_reopen_all(struct zfcp_port *port, int clear, |
542 | void *ref) | 545 | char *id, void *ref) |
543 | { | 546 | { |
544 | struct zfcp_unit *unit; | 547 | struct zfcp_unit *unit; |
545 | 548 | ||
@@ -559,28 +562,28 @@ static void zfcp_erp_strategy_followup_actions(struct zfcp_erp_action *act) | |||
559 | 562 | ||
560 | case ZFCP_ERP_ACTION_REOPEN_ADAPTER: | 563 | case ZFCP_ERP_ACTION_REOPEN_ADAPTER: |
561 | if (status == ZFCP_ERP_SUCCEEDED) | 564 | if (status == ZFCP_ERP_SUCCEEDED) |
562 | _zfcp_erp_port_reopen_all(adapter, 0, 70, NULL); | 565 | _zfcp_erp_port_reopen_all(adapter, 0, "ersfa_1", NULL); |
563 | else | 566 | else |
564 | _zfcp_erp_adapter_reopen(adapter, 0, 71, NULL); | 567 | _zfcp_erp_adapter_reopen(adapter, 0, "ersfa_2", NULL); |
565 | break; | 568 | break; |
566 | 569 | ||
567 | case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED: | 570 | case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED: |
568 | if (status == ZFCP_ERP_SUCCEEDED) | 571 | if (status == ZFCP_ERP_SUCCEEDED) |
569 | _zfcp_erp_port_reopen(port, 0, 72, NULL); | 572 | _zfcp_erp_port_reopen(port, 0, "ersfa_3", NULL); |
570 | else | 573 | else |
571 | _zfcp_erp_adapter_reopen(adapter, 0, 73, NULL); | 574 | _zfcp_erp_adapter_reopen(adapter, 0, "ersfa_4", NULL); |
572 | break; | 575 | break; |
573 | 576 | ||
574 | case ZFCP_ERP_ACTION_REOPEN_PORT: | 577 | case ZFCP_ERP_ACTION_REOPEN_PORT: |
575 | if (status == ZFCP_ERP_SUCCEEDED) | 578 | if (status == ZFCP_ERP_SUCCEEDED) |
576 | _zfcp_erp_unit_reopen_all(port, 0, 74, NULL); | 579 | _zfcp_erp_unit_reopen_all(port, 0, "ersfa_5", NULL); |
577 | else | 580 | else |
578 | _zfcp_erp_port_forced_reopen(port, 0, 75, NULL); | 581 | _zfcp_erp_port_forced_reopen(port, 0, "ersfa_6", NULL); |
579 | break; | 582 | break; |
580 | 583 | ||
581 | case ZFCP_ERP_ACTION_REOPEN_UNIT: | 584 | case ZFCP_ERP_ACTION_REOPEN_UNIT: |
582 | if (status != ZFCP_ERP_SUCCEEDED) | 585 | if (status != ZFCP_ERP_SUCCEEDED) |
583 | _zfcp_erp_port_reopen(unit->port, 0, 76, NULL); | 586 | _zfcp_erp_port_reopen(unit->port, 0, "ersfa_7", NULL); |
584 | break; | 587 | break; |
585 | } | 588 | } |
586 | } | 589 | } |
@@ -617,7 +620,7 @@ static void zfcp_erp_enqueue_ptp_port(struct zfcp_adapter *adapter) | |||
617 | adapter->peer_d_id); | 620 | adapter->peer_d_id); |
618 | if (IS_ERR(port)) /* error or port already attached */ | 621 | if (IS_ERR(port)) /* error or port already attached */ |
619 | return; | 622 | return; |
620 | _zfcp_erp_port_reopen(port, 0, 150, NULL); | 623 | _zfcp_erp_port_reopen(port, 0, "ereptp1", NULL); |
621 | } | 624 | } |
622 | 625 | ||
623 | static int zfcp_erp_adapter_strat_fsf_xconf(struct zfcp_erp_action *erp_action) | 626 | static int zfcp_erp_adapter_strat_fsf_xconf(struct zfcp_erp_action *erp_action) |
@@ -640,9 +643,9 @@ static int zfcp_erp_adapter_strat_fsf_xconf(struct zfcp_erp_action *erp_action) | |||
640 | return ZFCP_ERP_FAILED; | 643 | return ZFCP_ERP_FAILED; |
641 | } | 644 | } |
642 | 645 | ||
643 | zfcp_rec_dbf_event_thread_lock(6, adapter); | 646 | zfcp_rec_dbf_event_thread_lock("erasfx1", adapter); |
644 | down(&adapter->erp_ready_sem); | 647 | down(&adapter->erp_ready_sem); |
645 | zfcp_rec_dbf_event_thread_lock(7, adapter); | 648 | zfcp_rec_dbf_event_thread_lock("erasfx2", adapter); |
646 | if (erp_action->status & ZFCP_STATUS_ERP_TIMEDOUT) | 649 | if (erp_action->status & ZFCP_STATUS_ERP_TIMEDOUT) |
647 | break; | 650 | break; |
648 | 651 | ||
@@ -681,9 +684,9 @@ static int zfcp_erp_adapter_strategy_open_fsf_xport(struct zfcp_erp_action *act) | |||
681 | if (ret) | 684 | if (ret) |
682 | return ZFCP_ERP_FAILED; | 685 | return ZFCP_ERP_FAILED; |
683 | 686 | ||
684 | zfcp_rec_dbf_event_thread_lock(8, adapter); | 687 | zfcp_rec_dbf_event_thread_lock("erasox1", adapter); |
685 | down(&adapter->erp_ready_sem); | 688 | down(&adapter->erp_ready_sem); |
686 | zfcp_rec_dbf_event_thread_lock(9, adapter); | 689 | zfcp_rec_dbf_event_thread_lock("erasox2", adapter); |
687 | if (act->status & ZFCP_STATUS_ERP_TIMEDOUT) | 690 | if (act->status & ZFCP_STATUS_ERP_TIMEDOUT) |
688 | return ZFCP_ERP_FAILED; | 691 | return ZFCP_ERP_FAILED; |
689 | 692 | ||
@@ -714,7 +717,7 @@ static void zfcp_erp_adapter_strategy_close(struct zfcp_erp_action *act) | |||
714 | zfcp_fsf_req_dismiss_all(adapter); | 717 | zfcp_fsf_req_dismiss_all(adapter); |
715 | adapter->fsf_req_seq_no = 0; | 718 | adapter->fsf_req_seq_no = 0; |
716 | /* all ports and units are closed */ | 719 | /* all ports and units are closed */ |
717 | zfcp_erp_modify_adapter_status(adapter, 24, NULL, | 720 | zfcp_erp_modify_adapter_status(adapter, "erascl1", NULL, |
718 | ZFCP_STATUS_COMMON_OPEN, ZFCP_CLEAR); | 721 | ZFCP_STATUS_COMMON_OPEN, ZFCP_CLEAR); |
719 | 722 | ||
720 | atomic_clear_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK | | 723 | atomic_clear_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK | |
@@ -832,7 +835,7 @@ static int zfcp_erp_open_ptp_port(struct zfcp_erp_action *act) | |||
832 | struct zfcp_port *port = act->port; | 835 | struct zfcp_port *port = act->port; |
833 | 836 | ||
834 | if (port->wwpn != adapter->peer_wwpn) { | 837 | if (port->wwpn != adapter->peer_wwpn) { |
835 | zfcp_erp_port_failed(port, 25, NULL); | 838 | zfcp_erp_port_failed(port, "eroptp1", NULL); |
836 | return ZFCP_ERP_FAILED; | 839 | return ZFCP_ERP_FAILED; |
837 | } | 840 | } |
838 | port->d_id = adapter->peer_d_id; | 841 | port->d_id = adapter->peer_d_id; |
@@ -986,7 +989,7 @@ static int zfcp_erp_strategy_check_unit(struct zfcp_unit *unit, int result) | |||
986 | "port 0x%016Lx\n", | 989 | "port 0x%016Lx\n", |
987 | (unsigned long long)unit->fcp_lun, | 990 | (unsigned long long)unit->fcp_lun, |
988 | (unsigned long long)unit->port->wwpn); | 991 | (unsigned long long)unit->port->wwpn); |
989 | zfcp_erp_unit_failed(unit, 21, NULL); | 992 | zfcp_erp_unit_failed(unit, "erusck1", NULL); |
990 | } | 993 | } |
991 | break; | 994 | break; |
992 | } | 995 | } |
@@ -1016,7 +1019,7 @@ static int zfcp_erp_strategy_check_port(struct zfcp_port *port, int result) | |||
1016 | dev_err(&port->adapter->ccw_device->dev, | 1019 | dev_err(&port->adapter->ccw_device->dev, |
1017 | "ERP failed for remote port 0x%016Lx\n", | 1020 | "ERP failed for remote port 0x%016Lx\n", |
1018 | (unsigned long long)port->wwpn); | 1021 | (unsigned long long)port->wwpn); |
1019 | zfcp_erp_port_failed(port, 22, NULL); | 1022 | zfcp_erp_port_failed(port, "erpsck1", NULL); |
1020 | } | 1023 | } |
1021 | break; | 1024 | break; |
1022 | } | 1025 | } |
@@ -1043,7 +1046,7 @@ static int zfcp_erp_strategy_check_adapter(struct zfcp_adapter *adapter, | |||
1043 | dev_err(&adapter->ccw_device->dev, | 1046 | dev_err(&adapter->ccw_device->dev, |
1044 | "ERP cannot recover an error " | 1047 | "ERP cannot recover an error " |
1045 | "on the FCP device\n"); | 1048 | "on the FCP device\n"); |
1046 | zfcp_erp_adapter_failed(adapter, 23, NULL); | 1049 | zfcp_erp_adapter_failed(adapter, "erasck1", NULL); |
1047 | } | 1050 | } |
1048 | break; | 1051 | break; |
1049 | } | 1052 | } |
@@ -1108,7 +1111,7 @@ static int zfcp_erp_strategy_statechange(struct zfcp_erp_action *act, int ret) | |||
1108 | if (zfcp_erp_strat_change_det(&adapter->status, erp_status)) { | 1111 | if (zfcp_erp_strat_change_det(&adapter->status, erp_status)) { |
1109 | _zfcp_erp_adapter_reopen(adapter, | 1112 | _zfcp_erp_adapter_reopen(adapter, |
1110 | ZFCP_STATUS_COMMON_ERP_FAILED, | 1113 | ZFCP_STATUS_COMMON_ERP_FAILED, |
1111 | 67, NULL); | 1114 | "ersscg1", NULL); |
1112 | return ZFCP_ERP_EXIT; | 1115 | return ZFCP_ERP_EXIT; |
1113 | } | 1116 | } |
1114 | break; | 1117 | break; |
@@ -1118,7 +1121,7 @@ static int zfcp_erp_strategy_statechange(struct zfcp_erp_action *act, int ret) | |||
1118 | if (zfcp_erp_strat_change_det(&port->status, erp_status)) { | 1121 | if (zfcp_erp_strat_change_det(&port->status, erp_status)) { |
1119 | _zfcp_erp_port_reopen(port, | 1122 | _zfcp_erp_port_reopen(port, |
1120 | ZFCP_STATUS_COMMON_ERP_FAILED, | 1123 | ZFCP_STATUS_COMMON_ERP_FAILED, |
1121 | 68, NULL); | 1124 | "ersscg2", NULL); |
1122 | return ZFCP_ERP_EXIT; | 1125 | return ZFCP_ERP_EXIT; |
1123 | } | 1126 | } |
1124 | break; | 1127 | break; |
@@ -1127,7 +1130,7 @@ static int zfcp_erp_strategy_statechange(struct zfcp_erp_action *act, int ret) | |||
1127 | if (zfcp_erp_strat_change_det(&unit->status, erp_status)) { | 1130 | if (zfcp_erp_strat_change_det(&unit->status, erp_status)) { |
1128 | _zfcp_erp_unit_reopen(unit, | 1131 | _zfcp_erp_unit_reopen(unit, |
1129 | ZFCP_STATUS_COMMON_ERP_FAILED, | 1132 | ZFCP_STATUS_COMMON_ERP_FAILED, |
1130 | 69, NULL); | 1133 | "ersscg3", NULL); |
1131 | return ZFCP_ERP_EXIT; | 1134 | return ZFCP_ERP_EXIT; |
1132 | } | 1135 | } |
1133 | break; | 1136 | break; |
@@ -1146,7 +1149,7 @@ static void zfcp_erp_action_dequeue(struct zfcp_erp_action *erp_action) | |||
1146 | } | 1149 | } |
1147 | 1150 | ||
1148 | list_del(&erp_action->list); | 1151 | list_del(&erp_action->list); |
1149 | zfcp_rec_dbf_event_action(144, erp_action); | 1152 | zfcp_rec_dbf_event_action("eractd1", erp_action); |
1150 | 1153 | ||
1151 | switch (erp_action->action) { | 1154 | switch (erp_action->action) { |
1152 | case ZFCP_ERP_ACTION_REOPEN_UNIT: | 1155 | case ZFCP_ERP_ACTION_REOPEN_UNIT: |
@@ -1331,7 +1334,7 @@ static int zfcp_erp_strategy(struct zfcp_erp_action *erp_action) | |||
1331 | erp_action->status |= ZFCP_STATUS_ERP_LOWMEM; | 1334 | erp_action->status |= ZFCP_STATUS_ERP_LOWMEM; |
1332 | } | 1335 | } |
1333 | if (adapter->erp_total_count == adapter->erp_low_mem_count) | 1336 | if (adapter->erp_total_count == adapter->erp_low_mem_count) |
1334 | _zfcp_erp_adapter_reopen(adapter, 0, 66, NULL); | 1337 | _zfcp_erp_adapter_reopen(adapter, 0, "erstgy1", NULL); |
1335 | else { | 1338 | else { |
1336 | zfcp_erp_strategy_memwait(erp_action); | 1339 | zfcp_erp_strategy_memwait(erp_action); |
1337 | retval = ZFCP_ERP_CONTINUES; | 1340 | retval = ZFCP_ERP_CONTINUES; |
@@ -1391,9 +1394,9 @@ static int zfcp_erp_thread(void *data) | |||
1391 | zfcp_erp_wakeup(adapter); | 1394 | zfcp_erp_wakeup(adapter); |
1392 | } | 1395 | } |
1393 | 1396 | ||
1394 | zfcp_rec_dbf_event_thread_lock(4, adapter); | 1397 | zfcp_rec_dbf_event_thread_lock("erthrd1", adapter); |
1395 | ignore = down_interruptible(&adapter->erp_ready_sem); | 1398 | ignore = down_interruptible(&adapter->erp_ready_sem); |
1396 | zfcp_rec_dbf_event_thread_lock(5, adapter); | 1399 | zfcp_rec_dbf_event_thread_lock("erthrd2", adapter); |
1397 | } | 1400 | } |
1398 | 1401 | ||
1399 | atomic_clear_mask(ZFCP_STATUS_ADAPTER_ERP_THREAD_UP, &adapter->status); | 1402 | atomic_clear_mask(ZFCP_STATUS_ADAPTER_ERP_THREAD_UP, &adapter->status); |
@@ -1438,7 +1441,7 @@ void zfcp_erp_thread_kill(struct zfcp_adapter *adapter) | |||
1438 | { | 1441 | { |
1439 | atomic_set_mask(ZFCP_STATUS_ADAPTER_ERP_THREAD_KILL, &adapter->status); | 1442 | atomic_set_mask(ZFCP_STATUS_ADAPTER_ERP_THREAD_KILL, &adapter->status); |
1440 | up(&adapter->erp_ready_sem); | 1443 | up(&adapter->erp_ready_sem); |
1441 | zfcp_rec_dbf_event_thread_lock(3, adapter); | 1444 | zfcp_rec_dbf_event_thread_lock("erthrk1", adapter); |
1442 | 1445 | ||
1443 | wait_event(adapter->erp_thread_wqh, | 1446 | wait_event(adapter->erp_thread_wqh, |
1444 | !(atomic_read(&adapter->status) & | 1447 | !(atomic_read(&adapter->status) & |
@@ -1454,7 +1457,7 @@ void zfcp_erp_thread_kill(struct zfcp_adapter *adapter) | |||
1454 | * @id: Event id for debug trace. | 1457 | * @id: Event id for debug trace. |
1455 | * @ref: Reference for debug trace. | 1458 | * @ref: Reference for debug trace. |
1456 | */ | 1459 | */ |
1457 | void zfcp_erp_adapter_failed(struct zfcp_adapter *adapter, u8 id, void *ref) | 1460 | void zfcp_erp_adapter_failed(struct zfcp_adapter *adapter, char *id, void *ref) |
1458 | { | 1461 | { |
1459 | zfcp_erp_modify_adapter_status(adapter, id, ref, | 1462 | zfcp_erp_modify_adapter_status(adapter, id, ref, |
1460 | ZFCP_STATUS_COMMON_ERP_FAILED, ZFCP_SET); | 1463 | ZFCP_STATUS_COMMON_ERP_FAILED, ZFCP_SET); |
@@ -1466,7 +1469,7 @@ void zfcp_erp_adapter_failed(struct zfcp_adapter *adapter, u8 id, void *ref) | |||
1466 | * @id: Event id for debug trace. | 1469 | * @id: Event id for debug trace. |
1467 | * @ref: Reference for debug trace. | 1470 | * @ref: Reference for debug trace. |
1468 | */ | 1471 | */ |
1469 | void zfcp_erp_port_failed(struct zfcp_port *port, u8 id, void *ref) | 1472 | void zfcp_erp_port_failed(struct zfcp_port *port, char *id, void *ref) |
1470 | { | 1473 | { |
1471 | zfcp_erp_modify_port_status(port, id, ref, | 1474 | zfcp_erp_modify_port_status(port, id, ref, |
1472 | ZFCP_STATUS_COMMON_ERP_FAILED, ZFCP_SET); | 1475 | ZFCP_STATUS_COMMON_ERP_FAILED, ZFCP_SET); |
@@ -1478,7 +1481,7 @@ void zfcp_erp_port_failed(struct zfcp_port *port, u8 id, void *ref) | |||
1478 | * @id: Event id for debug trace. | 1481 | * @id: Event id for debug trace. |
1479 | * @ref: Reference for debug trace. | 1482 | * @ref: Reference for debug trace. |
1480 | */ | 1483 | */ |
1481 | void zfcp_erp_unit_failed(struct zfcp_unit *unit, u8 id, void *ref) | 1484 | void zfcp_erp_unit_failed(struct zfcp_unit *unit, char *id, void *ref) |
1482 | { | 1485 | { |
1483 | zfcp_erp_modify_unit_status(unit, id, ref, | 1486 | zfcp_erp_modify_unit_status(unit, id, ref, |
1484 | ZFCP_STATUS_COMMON_ERP_FAILED, ZFCP_SET); | 1487 | ZFCP_STATUS_COMMON_ERP_FAILED, ZFCP_SET); |
@@ -1505,7 +1508,7 @@ void zfcp_erp_wait(struct zfcp_adapter *adapter) | |||
1505 | * | 1508 | * |
1506 | * Changes in common status bits are propagated to attached ports and units. | 1509 | * Changes in common status bits are propagated to attached ports and units. |
1507 | */ | 1510 | */ |
1508 | void zfcp_erp_modify_adapter_status(struct zfcp_adapter *adapter, u8 id, | 1511 | void zfcp_erp_modify_adapter_status(struct zfcp_adapter *adapter, char *id, |
1509 | void *ref, u32 mask, int set_or_clear) | 1512 | void *ref, u32 mask, int set_or_clear) |
1510 | { | 1513 | { |
1511 | struct zfcp_port *port; | 1514 | struct zfcp_port *port; |
@@ -1539,7 +1542,7 @@ void zfcp_erp_modify_adapter_status(struct zfcp_adapter *adapter, u8 id, | |||
1539 | * | 1542 | * |
1540 | * Changes in common status bits are propagated to attached units. | 1543 | * Changes in common status bits are propagated to attached units. |
1541 | */ | 1544 | */ |
1542 | void zfcp_erp_modify_port_status(struct zfcp_port *port, u8 id, void *ref, | 1545 | void zfcp_erp_modify_port_status(struct zfcp_port *port, char *id, void *ref, |
1543 | u32 mask, int set_or_clear) | 1546 | u32 mask, int set_or_clear) |
1544 | { | 1547 | { |
1545 | struct zfcp_unit *unit; | 1548 | struct zfcp_unit *unit; |
@@ -1571,7 +1574,7 @@ void zfcp_erp_modify_port_status(struct zfcp_port *port, u8 id, void *ref, | |||
1571 | * @mask: status bits to change | 1574 | * @mask: status bits to change |
1572 | * @set_or_clear: ZFCP_SET or ZFCP_CLEAR | 1575 | * @set_or_clear: ZFCP_SET or ZFCP_CLEAR |
1573 | */ | 1576 | */ |
1574 | void zfcp_erp_modify_unit_status(struct zfcp_unit *unit, u8 id, void *ref, | 1577 | void zfcp_erp_modify_unit_status(struct zfcp_unit *unit, char *id, void *ref, |
1575 | u32 mask, int set_or_clear) | 1578 | u32 mask, int set_or_clear) |
1576 | { | 1579 | { |
1577 | if (set_or_clear == ZFCP_SET) { | 1580 | if (set_or_clear == ZFCP_SET) { |
@@ -1594,7 +1597,7 @@ void zfcp_erp_modify_unit_status(struct zfcp_unit *unit, u8 id, void *ref, | |||
1594 | * @id: The debug trace id. | 1597 | * @id: The debug trace id. |
1595 | * @id: Reference for the debug trace. | 1598 | * @id: Reference for the debug trace. |
1596 | */ | 1599 | */ |
1597 | void zfcp_erp_port_boxed(struct zfcp_port *port, u8 id, void *ref) | 1600 | void zfcp_erp_port_boxed(struct zfcp_port *port, char *id, void *ref) |
1598 | { | 1601 | { |
1599 | unsigned long flags; | 1602 | unsigned long flags; |
1600 | 1603 | ||
@@ -1611,7 +1614,7 @@ void zfcp_erp_port_boxed(struct zfcp_port *port, u8 id, void *ref) | |||
1611 | * @id: The debug trace id. | 1614 | * @id: The debug trace id. |
1612 | * @id: Reference for the debug trace. | 1615 | * @id: Reference for the debug trace. |
1613 | */ | 1616 | */ |
1614 | void zfcp_erp_unit_boxed(struct zfcp_unit *unit, u8 id, void *ref) | 1617 | void zfcp_erp_unit_boxed(struct zfcp_unit *unit, char *id, void *ref) |
1615 | { | 1618 | { |
1616 | zfcp_erp_modify_unit_status(unit, id, ref, | 1619 | zfcp_erp_modify_unit_status(unit, id, ref, |
1617 | ZFCP_STATUS_COMMON_ACCESS_BOXED, ZFCP_SET); | 1620 | ZFCP_STATUS_COMMON_ACCESS_BOXED, ZFCP_SET); |
@@ -1627,7 +1630,7 @@ void zfcp_erp_unit_boxed(struct zfcp_unit *unit, u8 id, void *ref) | |||
1627 | * Since the adapter has denied access, stop using the port and the | 1630 | * Since the adapter has denied access, stop using the port and the |
1628 | * attached units. | 1631 | * attached units. |
1629 | */ | 1632 | */ |
1630 | void zfcp_erp_port_access_denied(struct zfcp_port *port, u8 id, void *ref) | 1633 | void zfcp_erp_port_access_denied(struct zfcp_port *port, char *id, void *ref) |
1631 | { | 1634 | { |
1632 | unsigned long flags; | 1635 | unsigned long flags; |
1633 | 1636 | ||
@@ -1646,14 +1649,14 @@ void zfcp_erp_port_access_denied(struct zfcp_port *port, u8 id, void *ref) | |||
1646 | * | 1649 | * |
1647 | * Since the adapter has denied access, stop using the unit. | 1650 | * Since the adapter has denied access, stop using the unit. |
1648 | */ | 1651 | */ |
1649 | void zfcp_erp_unit_access_denied(struct zfcp_unit *unit, u8 id, void *ref) | 1652 | void zfcp_erp_unit_access_denied(struct zfcp_unit *unit, char *id, void *ref) |
1650 | { | 1653 | { |
1651 | zfcp_erp_modify_unit_status(unit, id, ref, | 1654 | zfcp_erp_modify_unit_status(unit, id, ref, |
1652 | ZFCP_STATUS_COMMON_ERP_FAILED | | 1655 | ZFCP_STATUS_COMMON_ERP_FAILED | |
1653 | ZFCP_STATUS_COMMON_ACCESS_DENIED, ZFCP_SET); | 1656 | ZFCP_STATUS_COMMON_ACCESS_DENIED, ZFCP_SET); |
1654 | } | 1657 | } |
1655 | 1658 | ||
1656 | static void zfcp_erp_unit_access_changed(struct zfcp_unit *unit, u8 id, | 1659 | static void zfcp_erp_unit_access_changed(struct zfcp_unit *unit, char *id, |
1657 | void *ref) | 1660 | void *ref) |
1658 | { | 1661 | { |
1659 | int status = atomic_read(&unit->status); | 1662 | int status = atomic_read(&unit->status); |
@@ -1664,7 +1667,7 @@ static void zfcp_erp_unit_access_changed(struct zfcp_unit *unit, u8 id, | |||
1664 | zfcp_erp_unit_reopen(unit, ZFCP_STATUS_COMMON_ERP_FAILED, id, ref); | 1667 | zfcp_erp_unit_reopen(unit, ZFCP_STATUS_COMMON_ERP_FAILED, id, ref); |
1665 | } | 1668 | } |
1666 | 1669 | ||
1667 | static void zfcp_erp_port_access_changed(struct zfcp_port *port, u8 id, | 1670 | static void zfcp_erp_port_access_changed(struct zfcp_port *port, char *id, |
1668 | void *ref) | 1671 | void *ref) |
1669 | { | 1672 | { |
1670 | struct zfcp_unit *unit; | 1673 | struct zfcp_unit *unit; |
@@ -1686,7 +1689,7 @@ static void zfcp_erp_port_access_changed(struct zfcp_port *port, u8 id, | |||
1686 | * @id: Id for debug trace | 1689 | * @id: Id for debug trace |
1687 | * @ref: Reference for debug trace | 1690 | * @ref: Reference for debug trace |
1688 | */ | 1691 | */ |
1689 | void zfcp_erp_adapter_access_changed(struct zfcp_adapter *adapter, u8 id, | 1692 | void zfcp_erp_adapter_access_changed(struct zfcp_adapter *adapter, char *id, |
1690 | void *ref) | 1693 | void *ref) |
1691 | { | 1694 | { |
1692 | struct zfcp_port *port; | 1695 | struct zfcp_port *port; |