aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block/dasd_3990_erp.c
diff options
context:
space:
mode:
authorStefan Haberland <stefan.haberland@de.ibm.com>2009-03-26 10:23:49 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2009-03-26 10:24:05 -0400
commitfc19f381b3828aa4f8a3417dbefc3418ec6bbe10 (patch)
tree521d7537e5929de141ba4b616ccc2ab191d4b9fe /drivers/s390/block/dasd_3990_erp.c
parentf3eb5384cf0325c02e306b1d81e70f81a03d7432 (diff)
[S390] dasd: message cleanup
Moved some Messages into s390 debug feature and changed remaining messages to use the dev_xxx and pr_xxx macros. Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block/dasd_3990_erp.c')
-rw-r--r--drivers/s390/block/dasd_3990_erp.c730
1 files changed, 366 insertions, 364 deletions
diff --git a/drivers/s390/block/dasd_3990_erp.c b/drivers/s390/block/dasd_3990_erp.c
index 4cee45916144..27991b692056 100644
--- a/drivers/s390/block/dasd_3990_erp.c
+++ b/drivers/s390/block/dasd_3990_erp.c
@@ -7,6 +7,8 @@
7 * 7 *
8 */ 8 */
9 9
10#define KMSG_COMPONENT "dasd"
11
10#include <linux/timer.h> 12#include <linux/timer.h>
11#include <linux/slab.h> 13#include <linux/slab.h>
12#include <asm/idals.h> 14#include <asm/idals.h>
@@ -75,7 +77,7 @@ dasd_3990_erp_block_queue(struct dasd_ccw_req * erp, int expires)
75 struct dasd_device *device = erp->startdev; 77 struct dasd_device *device = erp->startdev;
76 unsigned long flags; 78 unsigned long flags;
77 79
78 DEV_MESSAGE(KERN_INFO, device, 80 DBF_DEV_EVENT(DBF_INFO, device,
79 "blocking request queue for %is", expires/HZ); 81 "blocking request queue for %is", expires/HZ);
80 82
81 spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags); 83 spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags);
@@ -114,9 +116,9 @@ dasd_3990_erp_int_req(struct dasd_ccw_req * erp)
114 } else { 116 } else {
115 117
116 /* issue a message and wait for 'device ready' interrupt */ 118 /* issue a message and wait for 'device ready' interrupt */
117 DEV_MESSAGE(KERN_ERR, device, "%s", 119 dev_err(&device->cdev->dev,
118 "is offline or not installed - " 120 "is offline or not installed - "
119 "INTERVENTION REQUIRED!!"); 121 "INTERVENTION REQUIRED!!\n");
120 122
121 dasd_3990_erp_block_queue(erp, 60*HZ); 123 dasd_3990_erp_block_queue(erp, 60*HZ);
122 } 124 }
@@ -158,7 +160,7 @@ dasd_3990_erp_alternate_path(struct dasd_ccw_req * erp)
158 160
159 if ((erp->lpm & opm) != 0x00) { 161 if ((erp->lpm & opm) != 0x00) {
160 162
161 DEV_MESSAGE(KERN_DEBUG, device, 163 DBF_DEV_EVENT(DBF_WARNING, device,
162 "try alternate lpm=%x (lpum=%x / opm=%x)", 164 "try alternate lpm=%x (lpum=%x / opm=%x)",
163 erp->lpm, erp->irb.esw.esw0.sublog.lpum, opm); 165 erp->lpm, erp->irb.esw.esw0.sublog.lpum, opm);
164 166
@@ -166,10 +168,9 @@ dasd_3990_erp_alternate_path(struct dasd_ccw_req * erp)
166 erp->status = DASD_CQR_FILLED; 168 erp->status = DASD_CQR_FILLED;
167 erp->retries = 10; 169 erp->retries = 10;
168 } else { 170 } else {
169 DEV_MESSAGE(KERN_ERR, device, 171 dev_err(&device->cdev->dev,
170 "No alternate channel path left (lpum=%x / " 172 "The DASD cannot be reached on any path (lpum=%x"
171 "opm=%x) -> permanent error", 173 "/opm=%x)\n", erp->irb.esw.esw0.sublog.lpum, opm);
172 erp->irb.esw.esw0.sublog.lpum, opm);
173 174
174 /* post request with permanent error */ 175 /* post request with permanent error */
175 erp->status = DASD_CQR_FAILED; 176 erp->status = DASD_CQR_FAILED;
@@ -204,8 +205,8 @@ dasd_3990_erp_DCTL(struct dasd_ccw_req * erp, char modifier)
204 sizeof(struct DCTL_data), 205 sizeof(struct DCTL_data),
205 device); 206 device);
206 if (IS_ERR(dctl_cqr)) { 207 if (IS_ERR(dctl_cqr)) {
207 DEV_MESSAGE(KERN_ERR, device, "%s", 208 dev_err(&device->cdev->dev,
208 "Unable to allocate DCTL-CQR"); 209 "Unable to allocate DCTL-CQR\n");
209 erp->status = DASD_CQR_FAILED; 210 erp->status = DASD_CQR_FAILED;
210 return erp; 211 return erp;
211 } 212 }
@@ -294,7 +295,7 @@ dasd_3990_erp_action_4(struct dasd_ccw_req * erp, char *sense)
294 /* interrupt (this enables easier enqueing of the cqr) */ 295 /* interrupt (this enables easier enqueing of the cqr) */
295 if (erp->function != dasd_3990_erp_action_4) { 296 if (erp->function != dasd_3990_erp_action_4) {
296 297
297 DEV_MESSAGE(KERN_INFO, device, "%s", 298 DBF_DEV_EVENT(DBF_INFO, device, "%s",
298 "dasd_3990_erp_action_4: first time retry"); 299 "dasd_3990_erp_action_4: first time retry");
299 300
300 erp->retries = 256; 301 erp->retries = 256;
@@ -303,7 +304,7 @@ dasd_3990_erp_action_4(struct dasd_ccw_req * erp, char *sense)
303 } else { 304 } else {
304 if (sense && (sense[25] == 0x1D)) { /* state change pending */ 305 if (sense && (sense[25] == 0x1D)) { /* state change pending */
305 306
306 DEV_MESSAGE(KERN_INFO, device, 307 DBF_DEV_EVENT(DBF_INFO, device,
307 "waiting for state change pending " 308 "waiting for state change pending "
308 "interrupt, %d retries left", 309 "interrupt, %d retries left",
309 erp->retries); 310 erp->retries);
@@ -311,15 +312,14 @@ dasd_3990_erp_action_4(struct dasd_ccw_req * erp, char *sense)
311 dasd_3990_erp_block_queue(erp, 30*HZ); 312 dasd_3990_erp_block_queue(erp, 30*HZ);
312 313
313 } else if (sense && (sense[25] == 0x1E)) { /* busy */ 314 } else if (sense && (sense[25] == 0x1E)) { /* busy */
314 DEV_MESSAGE(KERN_INFO, device, 315 DBF_DEV_EVENT(DBF_INFO, device,
315 "busy - redriving request later, " 316 "busy - redriving request later, "
316 "%d retries left", 317 "%d retries left",
317 erp->retries); 318 erp->retries);
318 dasd_3990_erp_block_queue(erp, HZ); 319 dasd_3990_erp_block_queue(erp, HZ);
319 } else { 320 } else {
320
321 /* no state change pending - retry */ 321 /* no state change pending - retry */
322 DEV_MESSAGE (KERN_INFO, device, 322 DBF_DEV_EVENT(DBF_INFO, device,
323 "redriving request immediately, " 323 "redriving request immediately, "
324 "%d retries left", 324 "%d retries left",
325 erp->retries); 325 erp->retries);
@@ -384,6 +384,7 @@ dasd_3990_handle_env_data(struct dasd_ccw_req * erp, char *sense)
384 struct dasd_device *device = erp->startdev; 384 struct dasd_device *device = erp->startdev;
385 char msg_format = (sense[7] & 0xF0); 385 char msg_format = (sense[7] & 0xF0);
386 char msg_no = (sense[7] & 0x0F); 386 char msg_no = (sense[7] & 0x0F);
387 char errorstring[ERRORLENGTH];
387 388
388 switch (msg_format) { 389 switch (msg_format) {
389 case 0x00: /* Format 0 - Program or System Checks */ 390 case 0x00: /* Format 0 - Program or System Checks */
@@ -394,95 +395,97 @@ dasd_3990_handle_env_data(struct dasd_ccw_req * erp, char *sense)
394 case 0x00: /* No Message */ 395 case 0x00: /* No Message */
395 break; 396 break;
396 case 0x01: 397 case 0x01:
397 DEV_MESSAGE(KERN_WARNING, device, "%s", 398 dev_warn(&device->cdev->dev,
398 "FORMAT 0 - Invalid Command"); 399 "FORMAT 0 - Invalid Command\n");
399 break; 400 break;
400 case 0x02: 401 case 0x02:
401 DEV_MESSAGE(KERN_WARNING, device, "%s", 402 dev_warn(&device->cdev->dev,
402 "FORMAT 0 - Invalid Command " 403 "FORMAT 0 - Invalid Command "
403 "Sequence"); 404 "Sequence\n");
404 break; 405 break;
405 case 0x03: 406 case 0x03:
406 DEV_MESSAGE(KERN_WARNING, device, "%s", 407 dev_warn(&device->cdev->dev,
407 "FORMAT 0 - CCW Count less than " 408 "FORMAT 0 - CCW Count less than "
408 "required"); 409 "required\n");
409 break; 410 break;
410 case 0x04: 411 case 0x04:
411 DEV_MESSAGE(KERN_WARNING, device, "%s", 412 dev_warn(&device->cdev->dev,
412 "FORMAT 0 - Invalid Parameter"); 413 "FORMAT 0 - Invalid Parameter\n");
413 break; 414 break;
414 case 0x05: 415 case 0x05:
415 DEV_MESSAGE(KERN_WARNING, device, "%s", 416 dev_warn(&device->cdev->dev,
416 "FORMAT 0 - Diagnostic of Sepecial" 417 "FORMAT 0 - Diagnostic of Special"
417 " Command Violates File Mask"); 418 " Command Violates File Mask\n");
418 break; 419 break;
419 case 0x07: 420 case 0x07:
420 DEV_MESSAGE(KERN_WARNING, device, "%s", 421 dev_warn(&device->cdev->dev,
421 "FORMAT 0 - Channel Returned with " 422 "FORMAT 0 - Channel Returned with "
422 "Incorrect retry CCW"); 423 "Incorrect retry CCW\n");
423 break; 424 break;
424 case 0x08: 425 case 0x08:
425 DEV_MESSAGE(KERN_WARNING, device, "%s", 426 dev_warn(&device->cdev->dev,
426 "FORMAT 0 - Reset Notification"); 427 "FORMAT 0 - Reset Notification\n");
427 break; 428 break;
428 case 0x09: 429 case 0x09:
429 DEV_MESSAGE(KERN_WARNING, device, "%s", 430 dev_warn(&device->cdev->dev,
430 "FORMAT 0 - Storage Path Restart"); 431 "FORMAT 0 - Storage Path Restart\n");
431 break; 432 break;
432 case 0x0A: 433 case 0x0A:
433 DEV_MESSAGE(KERN_WARNING, device, 434 dev_warn(&device->cdev->dev,
434 "FORMAT 0 - Channel requested " 435 "FORMAT 0 - Channel requested "
435 "... %02x", sense[8]); 436 "... %02x\n", sense[8]);
436 break; 437 break;
437 case 0x0B: 438 case 0x0B:
438 DEV_MESSAGE(KERN_WARNING, device, "%s", 439 dev_warn(&device->cdev->dev,
439 "FORMAT 0 - Invalid Defective/" 440 "FORMAT 0 - Invalid Defective/"
440 "Alternate Track Pointer"); 441 "Alternate Track Pointer\n");
441 break; 442 break;
442 case 0x0C: 443 case 0x0C:
443 DEV_MESSAGE(KERN_WARNING, device, "%s", 444 dev_warn(&device->cdev->dev,
444 "FORMAT 0 - DPS Installation " 445 "FORMAT 0 - DPS Installation "
445 "Check"); 446 "Check\n");
446 break; 447 break;
447 case 0x0E: 448 case 0x0E:
448 DEV_MESSAGE(KERN_WARNING, device, "%s", 449 dev_warn(&device->cdev->dev,
449 "FORMAT 0 - Command Invalid on " 450 "FORMAT 0 - Command Invalid on "
450 "Secondary Address"); 451 "Secondary Address\n");
451 break; 452 break;
452 case 0x0F: 453 case 0x0F:
453 DEV_MESSAGE(KERN_WARNING, device, 454 dev_warn(&device->cdev->dev,
454 "FORMAT 0 - Status Not As " 455 "FORMAT 0 - Status Not As "
455 "Required: reason %02x", sense[8]); 456 "Required: reason %02x\n",
457 sense[8]);
456 break; 458 break;
457 default: 459 default:
458 DEV_MESSAGE(KERN_WARNING, device, "%s", 460 dev_warn(&device->cdev->dev,
459 "FORMAT 0 - Reseved"); 461 "FORMAT 0 - Reserved\n");
460 } 462 }
461 } else { 463 } else {
462 switch (msg_no) { 464 switch (msg_no) {
463 case 0x00: /* No Message */ 465 case 0x00: /* No Message */
464 break; 466 break;
465 case 0x01: 467 case 0x01:
466 DEV_MESSAGE(KERN_WARNING, device, "%s", 468 dev_warn(&device->cdev->dev,
467 "FORMAT 0 - Device Error Source"); 469 "FORMAT 0 - Device Error "
470 "Source\n");
468 break; 471 break;
469 case 0x02: 472 case 0x02:
470 DEV_MESSAGE(KERN_WARNING, device, "%s", 473 dev_warn(&device->cdev->dev,
471 "FORMAT 0 - Reserved"); 474 "FORMAT 0 - Reserved\n");
472 break; 475 break;
473 case 0x03: 476 case 0x03:
474 DEV_MESSAGE(KERN_WARNING, device, 477 dev_warn(&device->cdev->dev,
475 "FORMAT 0 - Device Fenced - " 478 "FORMAT 0 - Device Fenced - "
476 "device = %02x", sense[4]); 479 "device = %02x\n", sense[4]);
477 break; 480 break;
478 case 0x04: 481 case 0x04:
479 DEV_MESSAGE(KERN_WARNING, device, "%s", 482 dev_warn(&device->cdev->dev,
480 "FORMAT 0 - Data Pinned for " 483 "FORMAT 0 - Data Pinned for "
481 "Device"); 484 "Device\n");
482 break; 485 break;
483 default: 486 default:
484 DEV_MESSAGE(KERN_WARNING, device, "%s", 487 dev_warn(&device->cdev->dev,
485 "FORMAT 0 - Reserved"); 488 "FORMAT 0 - Reserved\n");
486 } 489 }
487 } 490 }
488 break; 491 break;
@@ -492,348 +495,352 @@ dasd_3990_handle_env_data(struct dasd_ccw_req * erp, char *sense)
492 case 0x00: /* No Message */ 495 case 0x00: /* No Message */
493 break; 496 break;
494 case 0x01: 497 case 0x01:
495 DEV_MESSAGE(KERN_WARNING, device, "%s", 498 dev_warn(&device->cdev->dev,
496 "FORMAT 1 - Device Status 1 not as " 499 "FORMAT 1 - Device Status 1 not as "
497 "expected"); 500 "expected\n");
498 break; 501 break;
499 case 0x03: 502 case 0x03:
500 DEV_MESSAGE(KERN_WARNING, device, "%s", 503 dev_warn(&device->cdev->dev,
501 "FORMAT 1 - Index missing"); 504 "FORMAT 1 - Index missing\n");
502 break; 505 break;
503 case 0x04: 506 case 0x04:
504 DEV_MESSAGE(KERN_WARNING, device, "%s", 507 dev_warn(&device->cdev->dev,
505 "FORMAT 1 - Interruption cannot be reset"); 508 "FORMAT 1 - Interruption cannot be "
509 "reset\n");
506 break; 510 break;
507 case 0x05: 511 case 0x05:
508 DEV_MESSAGE(KERN_WARNING, device, "%s", 512 dev_warn(&device->cdev->dev,
509 "FORMAT 1 - Device did not respond to " 513 "FORMAT 1 - Device did not respond to "
510 "selection"); 514 "selection\n");
511 break; 515 break;
512 case 0x06: 516 case 0x06:
513 DEV_MESSAGE(KERN_WARNING, device, "%s", 517 dev_warn(&device->cdev->dev,
514 "FORMAT 1 - Device check-2 error or Set " 518 "FORMAT 1 - Device check-2 error or Set "
515 "Sector is not complete"); 519 "Sector is not complete\n");
516 break; 520 break;
517 case 0x07: 521 case 0x07:
518 DEV_MESSAGE(KERN_WARNING, device, "%s", 522 dev_warn(&device->cdev->dev,
519 "FORMAT 1 - Head address does not " 523 "FORMAT 1 - Head address does not "
520 "compare"); 524 "compare\n");
521 break; 525 break;
522 case 0x08: 526 case 0x08:
523 DEV_MESSAGE(KERN_WARNING, device, "%s", 527 dev_warn(&device->cdev->dev,
524 "FORMAT 1 - Device status 1 not valid"); 528 "FORMAT 1 - Device status 1 not valid\n");
525 break; 529 break;
526 case 0x09: 530 case 0x09:
527 DEV_MESSAGE(KERN_WARNING, device, "%s", 531 dev_warn(&device->cdev->dev,
528 "FORMAT 1 - Device not ready"); 532 "FORMAT 1 - Device not ready\n");
529 break; 533 break;
530 case 0x0A: 534 case 0x0A:
531 DEV_MESSAGE(KERN_WARNING, device, "%s", 535 dev_warn(&device->cdev->dev,
532 "FORMAT 1 - Track physical address did " 536 "FORMAT 1 - Track physical address did "
533 "not compare"); 537 "not compare\n");
534 break; 538 break;
535 case 0x0B: 539 case 0x0B:
536 DEV_MESSAGE(KERN_WARNING, device, "%s", 540 dev_warn(&device->cdev->dev,
537 "FORMAT 1 - Missing device address bit"); 541 "FORMAT 1 - Missing device address bit\n");
538 break; 542 break;
539 case 0x0C: 543 case 0x0C:
540 DEV_MESSAGE(KERN_WARNING, device, "%s", 544 dev_warn(&device->cdev->dev,
541 "FORMAT 1 - Drive motor switch is off"); 545 "FORMAT 1 - Drive motor switch is off\n");
542 break; 546 break;
543 case 0x0D: 547 case 0x0D:
544 DEV_MESSAGE(KERN_WARNING, device, "%s", 548 dev_warn(&device->cdev->dev,
545 "FORMAT 1 - Seek incomplete"); 549 "FORMAT 1 - Seek incomplete\n");
546 break; 550 break;
547 case 0x0E: 551 case 0x0E:
548 DEV_MESSAGE(KERN_WARNING, device, "%s", 552 dev_warn(&device->cdev->dev,
549 "FORMAT 1 - Cylinder address did not " 553 "FORMAT 1 - Cylinder address did not "
550 "compare"); 554 "compare\n");
551 break; 555 break;
552 case 0x0F: 556 case 0x0F:
553 DEV_MESSAGE(KERN_WARNING, device, "%s", 557 dev_warn(&device->cdev->dev,
554 "FORMAT 1 - Offset active cannot be " 558 "FORMAT 1 - Offset active cannot be "
555 "reset"); 559 "reset\n");
556 break; 560 break;
557 default: 561 default:
558 DEV_MESSAGE(KERN_WARNING, device, "%s", 562 dev_warn(&device->cdev->dev,
559 "FORMAT 1 - Reserved"); 563 "FORMAT 1 - Reserved\n");
560 } 564 }
561 break; 565 break;
562 566
563 case 0x20: /* Format 2 - 3990 Equipment Checks */ 567 case 0x20: /* Format 2 - 3990 Equipment Checks */
564 switch (msg_no) { 568 switch (msg_no) {
565 case 0x08: 569 case 0x08:
566 DEV_MESSAGE(KERN_WARNING, device, "%s", 570 dev_warn(&device->cdev->dev,
567 "FORMAT 2 - 3990 check-2 error"); 571 "FORMAT 2 - 3990 check-2 error\n");
568 break; 572 break;
569 case 0x0E: 573 case 0x0E:
570 DEV_MESSAGE(KERN_WARNING, device, "%s", 574 dev_warn(&device->cdev->dev,
571 "FORMAT 2 - Support facility errors"); 575 "FORMAT 2 - Support facility errors\n");
572 break; 576 break;
573 case 0x0F: 577 case 0x0F:
574 DEV_MESSAGE(KERN_WARNING, device, 578 dev_warn(&device->cdev->dev,
575 "FORMAT 2 - Microcode detected error %02x", 579 "FORMAT 2 - Microcode detected error "
576 sense[8]); 580 "%02x\n",
581 sense[8]);
577 break; 582 break;
578 default: 583 default:
579 DEV_MESSAGE(KERN_WARNING, device, "%s", 584 dev_warn(&device->cdev->dev,
580 "FORMAT 2 - Reserved"); 585 "FORMAT 2 - Reserved\n");
581 } 586 }
582 break; 587 break;
583 588
584 case 0x30: /* Format 3 - 3990 Control Checks */ 589 case 0x30: /* Format 3 - 3990 Control Checks */
585 switch (msg_no) { 590 switch (msg_no) {
586 case 0x0F: 591 case 0x0F:
587 DEV_MESSAGE(KERN_WARNING, device, "%s", 592 dev_warn(&device->cdev->dev,
588 "FORMAT 3 - Allegiance terminated"); 593 "FORMAT 3 - Allegiance terminated\n");
589 break; 594 break;
590 default: 595 default:
591 DEV_MESSAGE(KERN_WARNING, device, "%s", 596 dev_warn(&device->cdev->dev,
592 "FORMAT 3 - Reserved"); 597 "FORMAT 3 - Reserved\n");
593 } 598 }
594 break; 599 break;
595 600
596 case 0x40: /* Format 4 - Data Checks */ 601 case 0x40: /* Format 4 - Data Checks */
597 switch (msg_no) { 602 switch (msg_no) {
598 case 0x00: 603 case 0x00:
599 DEV_MESSAGE(KERN_WARNING, device, "%s", 604 dev_warn(&device->cdev->dev,
600 "FORMAT 4 - Home address area error"); 605 "FORMAT 4 - Home address area error\n");
601 break; 606 break;
602 case 0x01: 607 case 0x01:
603 DEV_MESSAGE(KERN_WARNING, device, "%s", 608 dev_warn(&device->cdev->dev,
604 "FORMAT 4 - Count area error"); 609 "FORMAT 4 - Count area error\n");
605 break; 610 break;
606 case 0x02: 611 case 0x02:
607 DEV_MESSAGE(KERN_WARNING, device, "%s", 612 dev_warn(&device->cdev->dev,
608 "FORMAT 4 - Key area error"); 613 "FORMAT 4 - Key area error\n");
609 break; 614 break;
610 case 0x03: 615 case 0x03:
611 DEV_MESSAGE(KERN_WARNING, device, "%s", 616 dev_warn(&device->cdev->dev,
612 "FORMAT 4 - Data area error"); 617 "FORMAT 4 - Data area error\n");
613 break; 618 break;
614 case 0x04: 619 case 0x04:
615 DEV_MESSAGE(KERN_WARNING, device, "%s", 620 dev_warn(&device->cdev->dev,
616 "FORMAT 4 - No sync byte in home address " 621 "FORMAT 4 - No sync byte in home address "
617 "area"); 622 "area\n");
618 break; 623 break;
619 case 0x05: 624 case 0x05:
620 DEV_MESSAGE(KERN_WARNING, device, "%s", 625 dev_warn(&device->cdev->dev,
621 "FORMAT 4 - No sync byte in count address " 626 "FORMAT 4 - No sync byte in count address "
622 "area"); 627 "area\n");
623 break; 628 break;
624 case 0x06: 629 case 0x06:
625 DEV_MESSAGE(KERN_WARNING, device, "%s", 630 dev_warn(&device->cdev->dev,
626 "FORMAT 4 - No sync byte in key area"); 631 "FORMAT 4 - No sync byte in key area\n");
627 break; 632 break;
628 case 0x07: 633 case 0x07:
629 DEV_MESSAGE(KERN_WARNING, device, "%s", 634 dev_warn(&device->cdev->dev,
630 "FORMAT 4 - No sync byte in data area"); 635 "FORMAT 4 - No sync byte in data area\n");
631 break; 636 break;
632 case 0x08: 637 case 0x08:
633 DEV_MESSAGE(KERN_WARNING, device, "%s", 638 dev_warn(&device->cdev->dev,
634 "FORMAT 4 - Home address area error; " 639 "FORMAT 4 - Home address area error; "
635 "offset active"); 640 "offset active\n");
636 break; 641 break;
637 case 0x09: 642 case 0x09:
638 DEV_MESSAGE(KERN_WARNING, device, "%s", 643 dev_warn(&device->cdev->dev,
639 "FORMAT 4 - Count area error; offset " 644 "FORMAT 4 - Count area error; offset "
640 "active"); 645 "active\n");
641 break; 646 break;
642 case 0x0A: 647 case 0x0A:
643 DEV_MESSAGE(KERN_WARNING, device, "%s", 648 dev_warn(&device->cdev->dev,
644 "FORMAT 4 - Key area error; offset " 649 "FORMAT 4 - Key area error; offset "
645 "active"); 650 "active\n");
646 break; 651 break;
647 case 0x0B: 652 case 0x0B:
648 DEV_MESSAGE(KERN_WARNING, device, "%s", 653 dev_warn(&device->cdev->dev,
649 "FORMAT 4 - Data area error; " 654 "FORMAT 4 - Data area error; "
650 "offset active"); 655 "offset active\n");
651 break; 656 break;
652 case 0x0C: 657 case 0x0C:
653 DEV_MESSAGE(KERN_WARNING, device, "%s", 658 dev_warn(&device->cdev->dev,
654 "FORMAT 4 - No sync byte in home " 659 "FORMAT 4 - No sync byte in home "
655 "address area; offset active"); 660 "address area; offset active\n");
656 break; 661 break;
657 case 0x0D: 662 case 0x0D:
658 DEV_MESSAGE(KERN_WARNING, device, "%s", 663 dev_warn(&device->cdev->dev,
659 "FORMAT 4 - No syn byte in count " 664 "FORMAT 4 - No syn byte in count "
660 "address area; offset active"); 665 "address area; offset active\n");
661 break; 666 break;
662 case 0x0E: 667 case 0x0E:
663 DEV_MESSAGE(KERN_WARNING, device, "%s", 668 dev_warn(&device->cdev->dev,
664 "FORMAT 4 - No sync byte in key area; " 669 "FORMAT 4 - No sync byte in key area; "
665 "offset active"); 670 "offset active\n");
666 break; 671 break;
667 case 0x0F: 672 case 0x0F:
668 DEV_MESSAGE(KERN_WARNING, device, "%s", 673 dev_warn(&device->cdev->dev,
669 "FORMAT 4 - No syn byte in data area; " 674 "FORMAT 4 - No syn byte in data area; "
670 "offset active"); 675 "offset active\n");
671 break; 676 break;
672 default: 677 default:
673 DEV_MESSAGE(KERN_WARNING, device, "%s", 678 dev_warn(&device->cdev->dev,
674 "FORMAT 4 - Reserved"); 679 "FORMAT 4 - Reserved\n");
675 } 680 }
676 break; 681 break;
677 682
678 case 0x50: /* Format 5 - Data Check with displacement information */ 683 case 0x50: /* Format 5 - Data Check with displacement information */
679 switch (msg_no) { 684 switch (msg_no) {
680 case 0x00: 685 case 0x00:
681 DEV_MESSAGE(KERN_WARNING, device, "%s", 686 dev_warn(&device->cdev->dev,
682 "FORMAT 5 - Data Check in the " 687 "FORMAT 5 - Data Check in the "
683 "home address area"); 688 "home address area\n");
684 break; 689 break;
685 case 0x01: 690 case 0x01:
686 DEV_MESSAGE(KERN_WARNING, device, "%s", 691 dev_warn(&device->cdev->dev,
687 "FORMAT 5 - Data Check in the count area"); 692 "FORMAT 5 - Data Check in the count "
693 "area\n");
688 break; 694 break;
689 case 0x02: 695 case 0x02:
690 DEV_MESSAGE(KERN_WARNING, device, "%s", 696 dev_warn(&device->cdev->dev,
691 "FORMAT 5 - Data Check in the key area"); 697 "FORMAT 5 - Data Check in the key area\n");
692 break; 698 break;
693 case 0x03: 699 case 0x03:
694 DEV_MESSAGE(KERN_WARNING, device, "%s", 700 dev_warn(&device->cdev->dev,
695 "FORMAT 5 - Data Check in the data area"); 701 "FORMAT 5 - Data Check in the data "
702 "area\n");
696 break; 703 break;
697 case 0x08: 704 case 0x08:
698 DEV_MESSAGE(KERN_WARNING, device, "%s", 705 dev_warn(&device->cdev->dev,
699 "FORMAT 5 - Data Check in the " 706 "FORMAT 5 - Data Check in the "
700 "home address area; offset active"); 707 "home address area; offset active\n");
701 break; 708 break;
702 case 0x09: 709 case 0x09:
703 DEV_MESSAGE(KERN_WARNING, device, "%s", 710 dev_warn(&device->cdev->dev,
704 "FORMAT 5 - Data Check in the count area; " 711 "FORMAT 5 - Data Check in the count area; "
705 "offset active"); 712 "offset active\n");
706 break; 713 break;
707 case 0x0A: 714 case 0x0A:
708 DEV_MESSAGE(KERN_WARNING, device, "%s", 715 dev_warn(&device->cdev->dev,
709 "FORMAT 5 - Data Check in the key area; " 716 "FORMAT 5 - Data Check in the key area; "
710 "offset active"); 717 "offset active\n");
711 break; 718 break;
712 case 0x0B: 719 case 0x0B:
713 DEV_MESSAGE(KERN_WARNING, device, "%s", 720 dev_warn(&device->cdev->dev,
714 "FORMAT 5 - Data Check in the data area; " 721 "FORMAT 5 - Data Check in the data area; "
715 "offset active"); 722 "offset active\n");
716 break; 723 break;
717 default: 724 default:
718 DEV_MESSAGE(KERN_WARNING, device, "%s", 725 dev_warn(&device->cdev->dev,
719 "FORMAT 5 - Reserved"); 726 "FORMAT 5 - Reserved\n");
720 } 727 }
721 break; 728 break;
722 729
723 case 0x60: /* Format 6 - Usage Statistics/Overrun Errors */ 730 case 0x60: /* Format 6 - Usage Statistics/Overrun Errors */
724 switch (msg_no) { 731 switch (msg_no) {
725 case 0x00: 732 case 0x00:
726 DEV_MESSAGE(KERN_WARNING, device, "%s", 733 dev_warn(&device->cdev->dev,
727 "FORMAT 6 - Overrun on channel A"); 734 "FORMAT 6 - Overrun on channel A\n");
728 break; 735 break;
729 case 0x01: 736 case 0x01:
730 DEV_MESSAGE(KERN_WARNING, device, "%s", 737 dev_warn(&device->cdev->dev,
731 "FORMAT 6 - Overrun on channel B"); 738 "FORMAT 6 - Overrun on channel B\n");
732 break; 739 break;
733 case 0x02: 740 case 0x02:
734 DEV_MESSAGE(KERN_WARNING, device, "%s", 741 dev_warn(&device->cdev->dev,
735 "FORMAT 6 - Overrun on channel C"); 742 "FORMAT 6 - Overrun on channel C\n");
736 break; 743 break;
737 case 0x03: 744 case 0x03:
738 DEV_MESSAGE(KERN_WARNING, device, "%s", 745 dev_warn(&device->cdev->dev,
739 "FORMAT 6 - Overrun on channel D"); 746 "FORMAT 6 - Overrun on channel D\n");
740 break; 747 break;
741 case 0x04: 748 case 0x04:
742 DEV_MESSAGE(KERN_WARNING, device, "%s", 749 dev_warn(&device->cdev->dev,
743 "FORMAT 6 - Overrun on channel E"); 750 "FORMAT 6 - Overrun on channel E\n");
744 break; 751 break;
745 case 0x05: 752 case 0x05:
746 DEV_MESSAGE(KERN_WARNING, device, "%s", 753 dev_warn(&device->cdev->dev,
747 "FORMAT 6 - Overrun on channel F"); 754 "FORMAT 6 - Overrun on channel F\n");
748 break; 755 break;
749 case 0x06: 756 case 0x06:
750 DEV_MESSAGE(KERN_WARNING, device, "%s", 757 dev_warn(&device->cdev->dev,
751 "FORMAT 6 - Overrun on channel G"); 758 "FORMAT 6 - Overrun on channel G\n");
752 break; 759 break;
753 case 0x07: 760 case 0x07:
754 DEV_MESSAGE(KERN_WARNING, device, "%s", 761 dev_warn(&device->cdev->dev,
755 "FORMAT 6 - Overrun on channel H"); 762 "FORMAT 6 - Overrun on channel H\n");
756 break; 763 break;
757 default: 764 default:
758 DEV_MESSAGE(KERN_WARNING, device, "%s", 765 dev_warn(&device->cdev->dev,
759 "FORMAT 6 - Reserved"); 766 "FORMAT 6 - Reserved\n");
760 } 767 }
761 break; 768 break;
762 769
763 case 0x70: /* Format 7 - Device Connection Control Checks */ 770 case 0x70: /* Format 7 - Device Connection Control Checks */
764 switch (msg_no) { 771 switch (msg_no) {
765 case 0x00: 772 case 0x00:
766 DEV_MESSAGE(KERN_WARNING, device, "%s", 773 dev_warn(&device->cdev->dev,
767 "FORMAT 7 - RCC initiated by a connection " 774 "FORMAT 7 - RCC initiated by a connection "
768 "check alert"); 775 "check alert\n");
769 break; 776 break;
770 case 0x01: 777 case 0x01:
771 DEV_MESSAGE(KERN_WARNING, device, "%s", 778 dev_warn(&device->cdev->dev,
772 "FORMAT 7 - RCC 1 sequence not " 779 "FORMAT 7 - RCC 1 sequence not "
773 "successful"); 780 "successful\n");
774 break; 781 break;
775 case 0x02: 782 case 0x02:
776 DEV_MESSAGE(KERN_WARNING, device, "%s", 783 dev_warn(&device->cdev->dev,
777 "FORMAT 7 - RCC 1 and RCC 2 sequences not " 784 "FORMAT 7 - RCC 1 and RCC 2 sequences not "
778 "successful"); 785 "successful\n");
779 break; 786 break;
780 case 0x03: 787 case 0x03:
781 DEV_MESSAGE(KERN_WARNING, device, "%s", 788 dev_warn(&device->cdev->dev,
782 "FORMAT 7 - Invalid tag-in during " 789 "FORMAT 7 - Invalid tag-in during "
783 "selection sequence"); 790 "selection sequence\n");
784 break; 791 break;
785 case 0x04: 792 case 0x04:
786 DEV_MESSAGE(KERN_WARNING, device, "%s", 793 dev_warn(&device->cdev->dev,
787 "FORMAT 7 - extra RCC required"); 794 "FORMAT 7 - extra RCC required\n");
788 break; 795 break;
789 case 0x05: 796 case 0x05:
790 DEV_MESSAGE(KERN_WARNING, device, "%s", 797 dev_warn(&device->cdev->dev,
791 "FORMAT 7 - Invalid DCC selection " 798 "FORMAT 7 - Invalid DCC selection "
792 "response or timeout"); 799 "response or timeout\n");
793 break; 800 break;
794 case 0x06: 801 case 0x06:
795 DEV_MESSAGE(KERN_WARNING, device, "%s", 802 dev_warn(&device->cdev->dev,
796 "FORMAT 7 - Missing end operation; device " 803 "FORMAT 7 - Missing end operation; device "
797 "transfer complete"); 804 "transfer complete\n");
798 break; 805 break;
799 case 0x07: 806 case 0x07:
800 DEV_MESSAGE(KERN_WARNING, device, "%s", 807 dev_warn(&device->cdev->dev,
801 "FORMAT 7 - Missing end operation; device " 808 "FORMAT 7 - Missing end operation; device "
802 "transfer incomplete"); 809 "transfer incomplete\n");
803 break; 810 break;
804 case 0x08: 811 case 0x08:
805 DEV_MESSAGE(KERN_WARNING, device, "%s", 812 dev_warn(&device->cdev->dev,
806 "FORMAT 7 - Invalid tag-in for an " 813 "FORMAT 7 - Invalid tag-in for an "
807 "immediate command sequence"); 814 "immediate command sequence\n");
808 break; 815 break;
809 case 0x09: 816 case 0x09:
810 DEV_MESSAGE(KERN_WARNING, device, "%s", 817 dev_warn(&device->cdev->dev,
811 "FORMAT 7 - Invalid tag-in for an " 818 "FORMAT 7 - Invalid tag-in for an "
812 "extended command sequence"); 819 "extended command sequence\n");
813 break; 820 break;
814 case 0x0A: 821 case 0x0A:
815 DEV_MESSAGE(KERN_WARNING, device, "%s", 822 dev_warn(&device->cdev->dev,
816 "FORMAT 7 - 3990 microcode time out when " 823 "FORMAT 7 - 3990 microcode time out when "
817 "stopping selection"); 824 "stopping selection\n");
818 break; 825 break;
819 case 0x0B: 826 case 0x0B:
820 DEV_MESSAGE(KERN_WARNING, device, "%s", 827 dev_warn(&device->cdev->dev,
821 "FORMAT 7 - No response to selection " 828 "FORMAT 7 - No response to selection "
822 "after a poll interruption"); 829 "after a poll interruption\n");
823 break; 830 break;
824 case 0x0C: 831 case 0x0C:
825 DEV_MESSAGE(KERN_WARNING, device, "%s", 832 dev_warn(&device->cdev->dev,
826 "FORMAT 7 - Permanent path error (DASD " 833 "FORMAT 7 - Permanent path error (DASD "
827 "controller not available)"); 834 "controller not available)\n");
828 break; 835 break;
829 case 0x0D: 836 case 0x0D:
830 DEV_MESSAGE(KERN_WARNING, device, "%s", 837 dev_warn(&device->cdev->dev,
831 "FORMAT 7 - DASD controller not available" 838 "FORMAT 7 - DASD controller not available"
832 " on disconnected command chain"); 839 " on disconnected command chain\n");
833 break; 840 break;
834 default: 841 default:
835 DEV_MESSAGE(KERN_WARNING, device, "%s", 842 dev_warn(&device->cdev->dev,
836 "FORMAT 7 - Reserved"); 843 "FORMAT 7 - Reserved\n");
837 } 844 }
838 break; 845 break;
839 846
@@ -841,52 +848,52 @@ dasd_3990_handle_env_data(struct dasd_ccw_req * erp, char *sense)
841 switch (msg_no) { 848 switch (msg_no) {
842 case 0x00: /* No Message */ 849 case 0x00: /* No Message */
843 case 0x01: 850 case 0x01:
844 DEV_MESSAGE(KERN_WARNING, device, "%s", 851 dev_warn(&device->cdev->dev,
845 "FORMAT 8 - Error correction code " 852 "FORMAT 8 - Error correction code "
846 "hardware fault"); 853 "hardware fault\n");
847 break; 854 break;
848 case 0x03: 855 case 0x03:
849 DEV_MESSAGE(KERN_WARNING, device, "%s", 856 dev_warn(&device->cdev->dev,
850 "FORMAT 8 - Unexpected end operation " 857 "FORMAT 8 - Unexpected end operation "
851 "response code"); 858 "response code\n");
852 break; 859 break;
853 case 0x04: 860 case 0x04:
854 DEV_MESSAGE(KERN_WARNING, device, "%s", 861 dev_warn(&device->cdev->dev,
855 "FORMAT 8 - End operation with transfer " 862 "FORMAT 8 - End operation with transfer "
856 "count not zero"); 863 "count not zero\n");
857 break; 864 break;
858 case 0x05: 865 case 0x05:
859 DEV_MESSAGE(KERN_WARNING, device, "%s", 866 dev_warn(&device->cdev->dev,
860 "FORMAT 8 - End operation with transfer " 867 "FORMAT 8 - End operation with transfer "
861 "count zero"); 868 "count zero\n");
862 break; 869 break;
863 case 0x06: 870 case 0x06:
864 DEV_MESSAGE(KERN_WARNING, device, "%s", 871 dev_warn(&device->cdev->dev,
865 "FORMAT 8 - DPS checks after a system " 872 "FORMAT 8 - DPS checks after a system "
866 "reset or selective reset"); 873 "reset or selective reset\n");
867 break; 874 break;
868 case 0x07: 875 case 0x07:
869 DEV_MESSAGE(KERN_WARNING, device, "%s", 876 dev_warn(&device->cdev->dev,
870 "FORMAT 8 - DPS cannot be filled"); 877 "FORMAT 8 - DPS cannot be filled\n");
871 break; 878 break;
872 case 0x08: 879 case 0x08:
873 DEV_MESSAGE(KERN_WARNING, device, "%s", 880 dev_warn(&device->cdev->dev,
874 "FORMAT 8 - Short busy time-out during " 881 "FORMAT 8 - Short busy time-out during "
875 "device selection"); 882 "device selection\n");
876 break; 883 break;
877 case 0x09: 884 case 0x09:
878 DEV_MESSAGE(KERN_WARNING, device, "%s", 885 dev_warn(&device->cdev->dev,
879 "FORMAT 8 - DASD controller failed to " 886 "FORMAT 8 - DASD controller failed to "
880 "set or reset the long busy latch"); 887 "set or reset the long busy latch\n");
881 break; 888 break;
882 case 0x0A: 889 case 0x0A:
883 DEV_MESSAGE(KERN_WARNING, device, "%s", 890 dev_warn(&device->cdev->dev,
884 "FORMAT 8 - No interruption from device " 891 "FORMAT 8 - No interruption from device "
885 "during a command chain"); 892 "during a command chain\n");
886 break; 893 break;
887 default: 894 default:
888 DEV_MESSAGE(KERN_WARNING, device, "%s", 895 dev_warn(&device->cdev->dev,
889 "FORMAT 8 - Reserved"); 896 "FORMAT 8 - Reserved\n");
890 } 897 }
891 break; 898 break;
892 899
@@ -895,97 +902,100 @@ dasd_3990_handle_env_data(struct dasd_ccw_req * erp, char *sense)
895 case 0x00: 902 case 0x00:
896 break; /* No Message */ 903 break; /* No Message */
897 case 0x06: 904 case 0x06:
898 DEV_MESSAGE(KERN_WARNING, device, "%s", 905 dev_warn(&device->cdev->dev,
899 "FORMAT 9 - Device check-2 error"); 906 "FORMAT 9 - Device check-2 error\n");
900 break; 907 break;
901 case 0x07: 908 case 0x07:
902 DEV_MESSAGE(KERN_WARNING, device, "%s", 909 dev_warn(&device->cdev->dev,
903 "FORMAT 9 - Head address did not compare"); 910 "FORMAT 9 - Head address did not "
911 "compare\n");
904 break; 912 break;
905 case 0x0A: 913 case 0x0A:
906 DEV_MESSAGE(KERN_WARNING, device, "%s", 914 dev_warn(&device->cdev->dev,
907 "FORMAT 9 - Track physical address did " 915 "FORMAT 9 - Track physical address did "
908 "not compare while oriented"); 916 "not compare while oriented\n");
909 break; 917 break;
910 case 0x0E: 918 case 0x0E:
911 DEV_MESSAGE(KERN_WARNING, device, "%s", 919 dev_warn(&device->cdev->dev,
912 "FORMAT 9 - Cylinder address did not " 920 "FORMAT 9 - Cylinder address did not "
913 "compare"); 921 "compare\n");
914 break; 922 break;
915 default: 923 default:
916 DEV_MESSAGE(KERN_WARNING, device, "%s", 924 dev_warn(&device->cdev->dev,
917 "FORMAT 9 - Reserved"); 925 "FORMAT 9 - Reserved\n");
918 } 926 }
919 break; 927 break;
920 928
921 case 0xF0: /* Format F - Cache Storage Checks */ 929 case 0xF0: /* Format F - Cache Storage Checks */
922 switch (msg_no) { 930 switch (msg_no) {
923 case 0x00: 931 case 0x00:
924 DEV_MESSAGE(KERN_WARNING, device, "%s", 932 dev_warn(&device->cdev->dev,
925 "FORMAT F - Operation Terminated"); 933 "FORMAT F - Operation Terminated\n");
926 break; 934 break;
927 case 0x01: 935 case 0x01:
928 DEV_MESSAGE(KERN_WARNING, device, "%s", 936 dev_warn(&device->cdev->dev,
929 "FORMAT F - Subsystem Processing Error"); 937 "FORMAT F - Subsystem Processing Error\n");
930 break; 938 break;
931 case 0x02: 939 case 0x02:
932 DEV_MESSAGE(KERN_WARNING, device, "%s", 940 dev_warn(&device->cdev->dev,
933 "FORMAT F - Cache or nonvolatile storage " 941 "FORMAT F - Cache or nonvolatile storage "
934 "equipment failure"); 942 "equipment failure\n");
935 break; 943 break;
936 case 0x04: 944 case 0x04:
937 DEV_MESSAGE(KERN_WARNING, device, "%s", 945 dev_warn(&device->cdev->dev,
938 "FORMAT F - Caching terminated"); 946 "FORMAT F - Caching terminated\n");
939 break; 947 break;
940 case 0x06: 948 case 0x06:
941 DEV_MESSAGE(KERN_WARNING, device, "%s", 949 dev_warn(&device->cdev->dev,
942 "FORMAT F - Cache fast write access not " 950 "FORMAT F - Cache fast write access not "
943 "authorized"); 951 "authorized\n");
944 break; 952 break;
945 case 0x07: 953 case 0x07:
946 DEV_MESSAGE(KERN_WARNING, device, "%s", 954 dev_warn(&device->cdev->dev,
947 "FORMAT F - Track format incorrect"); 955 "FORMAT F - Track format incorrect\n");
948 break; 956 break;
949 case 0x09: 957 case 0x09:
950 DEV_MESSAGE(KERN_WARNING, device, "%s", 958 dev_warn(&device->cdev->dev,
951 "FORMAT F - Caching reinitiated"); 959 "FORMAT F - Caching reinitiated\n");
952 break; 960 break;
953 case 0x0A: 961 case 0x0A:
954 DEV_MESSAGE(KERN_WARNING, device, "%s", 962 dev_warn(&device->cdev->dev,
955 "FORMAT F - Nonvolatile storage " 963 "FORMAT F - Nonvolatile storage "
956 "terminated"); 964 "terminated\n");
957 break; 965 break;
958 case 0x0B: 966 case 0x0B:
959 DEV_MESSAGE(KERN_WARNING, device, "%s", 967 dev_warn(&device->cdev->dev,
960 "FORMAT F - Volume is suspended duplex"); 968 "FORMAT F - Volume is suspended duplex\n");
961 /* call extended error reporting (EER) */ 969 /* call extended error reporting (EER) */
962 dasd_eer_write(device, erp->refers, 970 dasd_eer_write(device, erp->refers,
963 DASD_EER_PPRCSUSPEND); 971 DASD_EER_PPRCSUSPEND);
964 break; 972 break;
965 case 0x0C: 973 case 0x0C:
966 DEV_MESSAGE(KERN_WARNING, device, "%s", 974 dev_warn(&device->cdev->dev,
967 "FORMAT F - Subsystem status connot be " 975 "FORMAT F - Subsystem status cannot be "
968 "determined"); 976 "determined\n");
969 break; 977 break;
970 case 0x0D: 978 case 0x0D:
971 DEV_MESSAGE(KERN_WARNING, device, "%s", 979 dev_warn(&device->cdev->dev,
972 "FORMAT F - Caching status reset to " 980 "FORMAT F - Caching status reset to "
973 "default"); 981 "default\n");
974 break; 982 break;
975 case 0x0E: 983 case 0x0E:
976 DEV_MESSAGE(KERN_WARNING, device, "%s", 984 dev_warn(&device->cdev->dev,
977 "FORMAT F - DASD Fast Write inhibited"); 985 "FORMAT F - DASD Fast Write inhibited\n");
978 break; 986 break;
979 default: 987 default:
980 DEV_MESSAGE(KERN_WARNING, device, "%s", 988 dev_warn(&device->cdev->dev,
981 "FORMAT D - Reserved"); 989 "FORMAT D - Reserved\n");
982 } 990 }
983 break; 991 break;
984 992
985 default: /* unknown message format - should not happen */ 993 default: /* unknown message format - should not happen
986 DEV_MESSAGE (KERN_WARNING, device, 994 internal error 03 - unknown message format */
987 "unknown message format %02x", 995 snprintf(errorstring, ERRORLENGTH, "03 %x02", msg_format);
988 msg_format); 996 dev_err(&device->cdev->dev,
997 "An error occurred in the DASD device driver, "
998 "reason=%s\n", errorstring);
989 break; 999 break;
990 } /* end switch message format */ 1000 } /* end switch message format */
991 1001
@@ -1015,7 +1025,7 @@ dasd_3990_erp_com_rej(struct dasd_ccw_req * erp, char *sense)
1015 /* env data present (ACTION 10 - retry should work) */ 1025 /* env data present (ACTION 10 - retry should work) */
1016 if (sense[2] & SNS2_ENV_DATA_PRESENT) { 1026 if (sense[2] & SNS2_ENV_DATA_PRESENT) {
1017 1027
1018 DEV_MESSAGE(KERN_DEBUG, device, "%s", 1028 DBF_DEV_EVENT(DBF_WARNING, device, "%s",
1019 "Command Reject - environmental data present"); 1029 "Command Reject - environmental data present");
1020 1030
1021 dasd_3990_handle_env_data(erp, sense); 1031 dasd_3990_handle_env_data(erp, sense);
@@ -1023,9 +1033,10 @@ dasd_3990_erp_com_rej(struct dasd_ccw_req * erp, char *sense)
1023 erp->retries = 5; 1033 erp->retries = 5;
1024 1034
1025 } else { 1035 } else {
1026 /* fatal error - set status to FAILED */ 1036 /* fatal error - set status to FAILED
1027 DEV_MESSAGE(KERN_ERR, device, "%s", 1037 internal error 09 - Command Reject */
1028 "Command Reject - Fatal error"); 1038 dev_err(&device->cdev->dev, "An error occurred in the DASD "
1039 "device driver, reason=%s\n", "09");
1029 1040
1030 erp = dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED); 1041 erp = dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED);
1031 } 1042 }
@@ -1061,7 +1072,7 @@ dasd_3990_erp_bus_out(struct dasd_ccw_req * erp)
1061 } else { 1072 } else {
1062 1073
1063 /* issue a message and wait for 'device ready' interrupt */ 1074 /* issue a message and wait for 'device ready' interrupt */
1064 DEV_MESSAGE(KERN_DEBUG, device, "%s", 1075 DBF_DEV_EVENT(DBF_WARNING, device, "%s",
1065 "bus out parity error or BOPC requested by " 1076 "bus out parity error or BOPC requested by "
1066 "channel"); 1077 "channel");
1067 1078
@@ -1093,21 +1104,19 @@ dasd_3990_erp_equip_check(struct dasd_ccw_req * erp, char *sense)
1093 erp->function = dasd_3990_erp_equip_check; 1104 erp->function = dasd_3990_erp_equip_check;
1094 1105
1095 if (sense[1] & SNS1_WRITE_INHIBITED) { 1106 if (sense[1] & SNS1_WRITE_INHIBITED) {
1107 dev_info(&device->cdev->dev,
1108 "Write inhibited path encountered\n");
1096 1109
1097 DEV_MESSAGE(KERN_DEBUG, device, "%s", 1110 /* vary path offline
1098 "Write inhibited path encountered"); 1111 internal error 04 - Path should be varied off-line.*/
1099 1112 dev_err(&device->cdev->dev, "An error occurred in the DASD "
1100 /* vary path offline */ 1113 "device driver, reason=%s\n", "04");
1101 DEV_MESSAGE(KERN_ERR, device, "%s",
1102 "Path should be varied off-line. "
1103 "This is not implemented yet \n - please report "
1104 "to linux390@de.ibm.com");
1105 1114
1106 erp = dasd_3990_erp_action_1(erp); 1115 erp = dasd_3990_erp_action_1(erp);
1107 1116
1108 } else if (sense[2] & SNS2_ENV_DATA_PRESENT) { 1117 } else if (sense[2] & SNS2_ENV_DATA_PRESENT) {
1109 1118
1110 DEV_MESSAGE(KERN_DEBUG, device, "%s", 1119 DBF_DEV_EVENT(DBF_WARNING, device, "%s",
1111 "Equipment Check - " "environmental data present"); 1120 "Equipment Check - " "environmental data present");
1112 1121
1113 dasd_3990_handle_env_data(erp, sense); 1122 dasd_3990_handle_env_data(erp, sense);
@@ -1116,7 +1125,7 @@ dasd_3990_erp_equip_check(struct dasd_ccw_req * erp, char *sense)
1116 1125
1117 } else if (sense[1] & SNS1_PERM_ERR) { 1126 } else if (sense[1] & SNS1_PERM_ERR) {
1118 1127
1119 DEV_MESSAGE(KERN_DEBUG, device, "%s", 1128 DBF_DEV_EVENT(DBF_WARNING, device, "%s",
1120 "Equipment Check - retry exhausted or " 1129 "Equipment Check - retry exhausted or "
1121 "undesirable"); 1130 "undesirable");
1122 1131
@@ -1125,7 +1134,7 @@ dasd_3990_erp_equip_check(struct dasd_ccw_req * erp, char *sense)
1125 } else { 1134 } else {
1126 /* all other equipment checks - Action 5 */ 1135 /* all other equipment checks - Action 5 */
1127 /* rest is done when retries == 0 */ 1136 /* rest is done when retries == 0 */
1128 DEV_MESSAGE(KERN_DEBUG, device, "%s", 1137 DBF_DEV_EVENT(DBF_WARNING, device, "%s",
1129 "Equipment check or processing error"); 1138 "Equipment check or processing error");
1130 1139
1131 erp = dasd_3990_erp_action_5(erp); 1140 erp = dasd_3990_erp_action_5(erp);
@@ -1156,9 +1165,9 @@ dasd_3990_erp_data_check(struct dasd_ccw_req * erp, char *sense)
1156 if (sense[2] & SNS2_CORRECTABLE) { /* correctable data check */ 1165 if (sense[2] & SNS2_CORRECTABLE) { /* correctable data check */
1157 1166
1158 /* issue message that the data has been corrected */ 1167 /* issue message that the data has been corrected */
1159 DEV_MESSAGE(KERN_EMERG, device, "%s", 1168 dev_emerg(&device->cdev->dev,
1160 "Data recovered during retry with PCI " 1169 "Data recovered during retry with PCI "
1161 "fetch mode active"); 1170 "fetch mode active\n");
1162 1171
1163 /* not possible to handle this situation in Linux */ 1172 /* not possible to handle this situation in Linux */
1164 panic("No way to inform application about the possibly " 1173 panic("No way to inform application about the possibly "
@@ -1166,7 +1175,7 @@ dasd_3990_erp_data_check(struct dasd_ccw_req * erp, char *sense)
1166 1175
1167 } else if (sense[2] & SNS2_ENV_DATA_PRESENT) { 1176 } else if (sense[2] & SNS2_ENV_DATA_PRESENT) {
1168 1177
1169 DEV_MESSAGE(KERN_DEBUG, device, "%s", 1178 DBF_DEV_EVENT(DBF_WARNING, device, "%s",
1170 "Uncorrectable data check recovered secondary " 1179 "Uncorrectable data check recovered secondary "
1171 "addr of duplex pair"); 1180 "addr of duplex pair");
1172 1181
@@ -1174,7 +1183,7 @@ dasd_3990_erp_data_check(struct dasd_ccw_req * erp, char *sense)
1174 1183
1175 } else if (sense[1] & SNS1_PERM_ERR) { 1184 } else if (sense[1] & SNS1_PERM_ERR) {
1176 1185
1177 DEV_MESSAGE(KERN_DEBUG, device, "%s", 1186 DBF_DEV_EVENT(DBF_WARNING, device, "%s",
1178 "Uncorrectable data check with internal " 1187 "Uncorrectable data check with internal "
1179 "retry exhausted"); 1188 "retry exhausted");
1180 1189
@@ -1182,7 +1191,7 @@ dasd_3990_erp_data_check(struct dasd_ccw_req * erp, char *sense)
1182 1191
1183 } else { 1192 } else {
1184 /* all other data checks */ 1193 /* all other data checks */
1185 DEV_MESSAGE(KERN_DEBUG, device, "%s", 1194 DBF_DEV_EVENT(DBF_WARNING, device, "%s",
1186 "Uncorrectable data check with retry count " 1195 "Uncorrectable data check with retry count "
1187 "exhausted..."); 1196 "exhausted...");
1188 1197
@@ -1212,7 +1221,7 @@ dasd_3990_erp_overrun(struct dasd_ccw_req * erp, char *sense)
1212 1221
1213 erp->function = dasd_3990_erp_overrun; 1222 erp->function = dasd_3990_erp_overrun;
1214 1223
1215 DEV_MESSAGE(KERN_DEBUG, device, "%s", 1224 DBF_DEV_EVENT(DBF_WARNING, device, "%s",
1216 "Overrun - service overrun or overrun" 1225 "Overrun - service overrun or overrun"
1217 " error requested by channel"); 1226 " error requested by channel");
1218 1227
@@ -1243,7 +1252,7 @@ dasd_3990_erp_inv_format(struct dasd_ccw_req * erp, char *sense)
1243 1252
1244 if (sense[2] & SNS2_ENV_DATA_PRESENT) { 1253 if (sense[2] & SNS2_ENV_DATA_PRESENT) {
1245 1254
1246 DEV_MESSAGE(KERN_DEBUG, device, "%s", 1255 DBF_DEV_EVENT(DBF_WARNING, device, "%s",
1247 "Track format error when destaging or " 1256 "Track format error when destaging or "
1248 "staging data"); 1257 "staging data");
1249 1258
@@ -1252,8 +1261,10 @@ dasd_3990_erp_inv_format(struct dasd_ccw_req * erp, char *sense)
1252 erp = dasd_3990_erp_action_4(erp, sense); 1261 erp = dasd_3990_erp_action_4(erp, sense);
1253 1262
1254 } else { 1263 } else {
1255 DEV_MESSAGE(KERN_ERR, device, "%s", 1264 /* internal error 06 - The track format is not valid*/
1256 "Invalid Track Format - Fatal error"); 1265 dev_err(&device->cdev->dev,
1266 "An error occurred in the DASD device driver, "
1267 "reason=%s\n", "06");
1257 1268
1258 erp = dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED); 1269 erp = dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED);
1259 } 1270 }
@@ -1279,8 +1290,8 @@ dasd_3990_erp_EOC(struct dasd_ccw_req * default_erp, char *sense)
1279 1290
1280 struct dasd_device *device = default_erp->startdev; 1291 struct dasd_device *device = default_erp->startdev;
1281 1292
1282 DEV_MESSAGE(KERN_ERR, device, "%s", 1293 dev_err(&device->cdev->dev,
1283 "End-of-Cylinder - must never happen"); 1294 "The cylinder data for accessing the DASD is inconsistent\n");
1284 1295
1285 /* implement action 7 - BUG */ 1296 /* implement action 7 - BUG */
1286 return dasd_3990_erp_cleanup(default_erp, DASD_CQR_FAILED); 1297 return dasd_3990_erp_cleanup(default_erp, DASD_CQR_FAILED);
@@ -1306,7 +1317,7 @@ dasd_3990_erp_env_data(struct dasd_ccw_req * erp, char *sense)
1306 1317
1307 erp->function = dasd_3990_erp_env_data; 1318 erp->function = dasd_3990_erp_env_data;
1308 1319
1309 DEV_MESSAGE(KERN_DEBUG, device, "%s", "Environmental data present"); 1320 DBF_DEV_EVENT(DBF_WARNING, device, "%s", "Environmental data present");
1310 1321
1311 dasd_3990_handle_env_data(erp, sense); 1322 dasd_3990_handle_env_data(erp, sense);
1312 1323
@@ -1339,8 +1350,8 @@ dasd_3990_erp_no_rec(struct dasd_ccw_req * default_erp, char *sense)
1339 1350
1340 struct dasd_device *device = default_erp->startdev; 1351 struct dasd_device *device = default_erp->startdev;
1341 1352
1342 DEV_MESSAGE(KERN_ERR, device, "%s", 1353 dev_err(&device->cdev->dev,
1343 "No Record Found - Fatal error "); 1354 "The specified record was not found\n");
1344 1355
1345 return dasd_3990_erp_cleanup(default_erp, DASD_CQR_FAILED); 1356 return dasd_3990_erp_cleanup(default_erp, DASD_CQR_FAILED);
1346 1357
@@ -1365,7 +1376,8 @@ dasd_3990_erp_file_prot(struct dasd_ccw_req * erp)
1365 1376
1366 struct dasd_device *device = erp->startdev; 1377 struct dasd_device *device = erp->startdev;
1367 1378
1368 DEV_MESSAGE(KERN_ERR, device, "%s", "File Protected"); 1379 dev_err(&device->cdev->dev, "Accessing the DASD failed because of "
1380 "a hardware error\n");
1369 1381
1370 return dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED); 1382 return dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED);
1371 1383
@@ -1394,7 +1406,7 @@ static struct dasd_ccw_req *dasd_3990_erp_inspect_alias(
1394 if (cqr->block && 1406 if (cqr->block &&
1395 (cqr->block->base != cqr->startdev)) { 1407 (cqr->block->base != cqr->startdev)) {
1396 if (cqr->startdev->features & DASD_FEATURE_ERPLOG) { 1408 if (cqr->startdev->features & DASD_FEATURE_ERPLOG) {
1397 DEV_MESSAGE(KERN_ERR, cqr->startdev, 1409 DBF_DEV_EVENT(DBF_ERR, cqr->startdev,
1398 "ERP on alias device for request %p," 1410 "ERP on alias device for request %p,"
1399 " recover on base device %s", cqr, 1411 " recover on base device %s", cqr,
1400 dev_name(&cqr->block->base->cdev->dev)); 1412 dev_name(&cqr->block->base->cdev->dev));
@@ -1511,7 +1523,7 @@ dasd_3990_erp_action_10_32(struct dasd_ccw_req * erp, char *sense)
1511 erp->retries = 256; 1523 erp->retries = 256;
1512 erp->function = dasd_3990_erp_action_10_32; 1524 erp->function = dasd_3990_erp_action_10_32;
1513 1525
1514 DEV_MESSAGE(KERN_DEBUG, device, "%s", "Perform logging requested"); 1526 DBF_DEV_EVENT(DBF_WARNING, device, "%s", "Perform logging requested");
1515 1527
1516 return erp; 1528 return erp;
1517 1529
@@ -1549,7 +1561,7 @@ dasd_3990_erp_action_1B_32(struct dasd_ccw_req * default_erp, char *sense)
1549 char *LO_data; /* LO_eckd_data_t */ 1561 char *LO_data; /* LO_eckd_data_t */
1550 struct ccw1 *ccw, *oldccw; 1562 struct ccw1 *ccw, *oldccw;
1551 1563
1552 DEV_MESSAGE(KERN_DEBUG, device, "%s", 1564 DBF_DEV_EVENT(DBF_WARNING, device, "%s",
1553 "Write not finished because of unexpected condition"); 1565 "Write not finished because of unexpected condition");
1554 1566
1555 default_erp->function = dasd_3990_erp_action_1B_32; 1567 default_erp->function = dasd_3990_erp_action_1B_32;
@@ -1570,8 +1582,7 @@ dasd_3990_erp_action_1B_32(struct dasd_ccw_req * default_erp, char *sense)
1570 1582
1571 /* for imprecise ending just do default erp */ 1583 /* for imprecise ending just do default erp */
1572 if (sense[1] & 0x01) { 1584 if (sense[1] & 0x01) {
1573 1585 DBF_DEV_EVENT(DBF_WARNING, device, "%s",
1574 DEV_MESSAGE(KERN_DEBUG, device, "%s",
1575 "Imprecise ending is set - just retry"); 1586 "Imprecise ending is set - just retry");
1576 1587
1577 return default_erp; 1588 return default_erp;
@@ -1582,8 +1593,7 @@ dasd_3990_erp_action_1B_32(struct dasd_ccw_req * default_erp, char *sense)
1582 cpa = default_erp->refers->irb.scsw.cmd.cpa; 1593 cpa = default_erp->refers->irb.scsw.cmd.cpa;
1583 1594
1584 if (cpa == 0) { 1595 if (cpa == 0) {
1585 1596 DBF_DEV_EVENT(DBF_WARNING, device, "%s",
1586 DEV_MESSAGE(KERN_DEBUG, device, "%s",
1587 "Unable to determine address of the CCW " 1597 "Unable to determine address of the CCW "
1588 "to be restarted"); 1598 "to be restarted");
1589 1599
@@ -1597,7 +1607,9 @@ dasd_3990_erp_action_1B_32(struct dasd_ccw_req * default_erp, char *sense)
1597 sizeof(struct LO_eckd_data), device); 1607 sizeof(struct LO_eckd_data), device);
1598 1608
1599 if (IS_ERR(erp)) { 1609 if (IS_ERR(erp)) {
1600 DEV_MESSAGE(KERN_ERR, device, "%s", "Unable to allocate ERP"); 1610 /* internal error 01 - Unable to allocate ERP */
1611 dev_err(&device->cdev->dev, "An error occurred in the DASD "
1612 "device driver, reason=%s\n", "01");
1601 return dasd_3990_erp_cleanup(default_erp, DASD_CQR_FAILED); 1613 return dasd_3990_erp_cleanup(default_erp, DASD_CQR_FAILED);
1602 } 1614 }
1603 1615
@@ -1615,10 +1627,7 @@ dasd_3990_erp_action_1B_32(struct dasd_ccw_req * default_erp, char *sense)
1615 LO_data = erp->data + sizeof(struct DE_eckd_data); 1627 LO_data = erp->data + sizeof(struct DE_eckd_data);
1616 1628
1617 if ((sense[3] == 0x01) && (LO_data[1] & 0x01)) { 1629 if ((sense[3] == 0x01) && (LO_data[1] & 0x01)) {
1618 1630 /* should not */
1619 DEV_MESSAGE(KERN_ERR, device, "%s",
1620 "BUG - this should not happen");
1621
1622 return dasd_3990_erp_cleanup(default_erp, DASD_CQR_FAILED); 1631 return dasd_3990_erp_cleanup(default_erp, DASD_CQR_FAILED);
1623 } 1632 }
1624 1633
@@ -1708,7 +1717,7 @@ dasd_3990_update_1B(struct dasd_ccw_req * previous_erp, char *sense)
1708 char *LO_data; /* struct LO_eckd_data */ 1717 char *LO_data; /* struct LO_eckd_data */
1709 struct ccw1 *ccw; 1718 struct ccw1 *ccw;
1710 1719
1711 DEV_MESSAGE(KERN_DEBUG, device, "%s", 1720 DBF_DEV_EVENT(DBF_WARNING, device, "%s",
1712 "Write not finished because of unexpected condition" 1721 "Write not finished because of unexpected condition"
1713 " - follow on"); 1722 " - follow on");
1714 1723
@@ -1728,8 +1737,7 @@ dasd_3990_update_1B(struct dasd_ccw_req * previous_erp, char *sense)
1728 1737
1729 /* for imprecise ending just do default erp */ 1738 /* for imprecise ending just do default erp */
1730 if (sense[1] & 0x01) { 1739 if (sense[1] & 0x01) {
1731 1740 DBF_DEV_EVENT(DBF_WARNING, device, "%s",
1732 DEV_MESSAGE(KERN_DEBUG, device, "%s",
1733 "Imprecise ending is set - just retry"); 1741 "Imprecise ending is set - just retry");
1734 1742
1735 previous_erp->status = DASD_CQR_FILLED; 1743 previous_erp->status = DASD_CQR_FILLED;
@@ -1742,10 +1750,10 @@ dasd_3990_update_1B(struct dasd_ccw_req * previous_erp, char *sense)
1742 cpa = previous_erp->irb.scsw.cmd.cpa; 1750 cpa = previous_erp->irb.scsw.cmd.cpa;
1743 1751
1744 if (cpa == 0) { 1752 if (cpa == 0) {
1745 1753 /* internal error 02 -
1746 DEV_MESSAGE(KERN_DEBUG, device, "%s", 1754 Unable to determine address of the CCW to be restarted */
1747 "Unable to determine address of the CCW " 1755 dev_err(&device->cdev->dev, "An error occurred in the DASD "
1748 "to be restarted"); 1756 "device driver, reason=%s\n", "02");
1749 1757
1750 previous_erp->status = DASD_CQR_FAILED; 1758 previous_erp->status = DASD_CQR_FAILED;
1751 1759
@@ -1758,10 +1766,7 @@ dasd_3990_update_1B(struct dasd_ccw_req * previous_erp, char *sense)
1758 LO_data = erp->data + sizeof(struct DE_eckd_data); 1766 LO_data = erp->data + sizeof(struct DE_eckd_data);
1759 1767
1760 if ((sense[3] == 0x01) && (LO_data[1] & 0x01)) { 1768 if ((sense[3] == 0x01) && (LO_data[1] & 0x01)) {
1761 1769 /* should not happen */
1762 DEV_MESSAGE(KERN_ERR, device, "%s",
1763 "BUG - this should not happen");
1764
1765 previous_erp->status = DASD_CQR_FAILED; 1770 previous_erp->status = DASD_CQR_FAILED;
1766 1771
1767 return previous_erp; 1772 return previous_erp;
@@ -1949,14 +1954,13 @@ dasd_3990_erp_compound_config(struct dasd_ccw_req * erp, char *sense)
1949 1954
1950 if ((sense[25] & DASD_SENSE_BIT_1) && (sense[26] & DASD_SENSE_BIT_2)) { 1955 if ((sense[25] & DASD_SENSE_BIT_1) && (sense[26] & DASD_SENSE_BIT_2)) {
1951 1956
1952 /* set to suspended duplex state then restart */ 1957 /* set to suspended duplex state then restart
1958 internal error 05 - Set device to suspended duplex state
1959 should be done */
1953 struct dasd_device *device = erp->startdev; 1960 struct dasd_device *device = erp->startdev;
1954 1961 dev_err(&device->cdev->dev,
1955 DEV_MESSAGE(KERN_ERR, device, "%s", 1962 "An error occurred in the DASD device driver, "
1956 "Set device to suspended duplex state should be " 1963 "reason=%s\n", "05");
1957 "done!\n"
1958 "This is not implemented yet (for compound ERP)"
1959 " - please report to linux390@de.ibm.com");
1960 1964
1961 } 1965 }
1962 1966
@@ -2026,15 +2030,14 @@ dasd_3990_erp_handle_sim(struct dasd_device *device, char *sense)
2026{ 2030{
2027 /* print message according to log or message to operator mode */ 2031 /* print message according to log or message to operator mode */
2028 if ((sense[24] & DASD_SIM_MSG_TO_OP) || (sense[1] & 0x10)) { 2032 if ((sense[24] & DASD_SIM_MSG_TO_OP) || (sense[1] & 0x10)) {
2029
2030 /* print SIM SRC from RefCode */ 2033 /* print SIM SRC from RefCode */
2031 DEV_MESSAGE(KERN_ERR, device, "SIM - SRC: " 2034 dev_err(&device->cdev->dev, "SIM - SRC: "
2032 "%02x%02x%02x%02x", sense[22], 2035 "%02x%02x%02x%02x\n", sense[22],
2033 sense[23], sense[11], sense[12]); 2036 sense[23], sense[11], sense[12]);
2034 } else if (sense[24] & DASD_SIM_LOG) { 2037 } else if (sense[24] & DASD_SIM_LOG) {
2035 /* print SIM SRC Refcode */ 2038 /* print SIM SRC Refcode */
2036 DEV_MESSAGE(KERN_WARNING, device, "SIM - SRC: " 2039 dev_warn(&device->cdev->dev, "log SIM - SRC: "
2037 "%02x%02x%02x%02x", sense[22], 2040 "%02x%02x%02x%02x\n", sense[22],
2038 sense[23], sense[11], sense[12]); 2041 sense[23], sense[11], sense[12]);
2039 } 2042 }
2040} 2043}
@@ -2077,14 +2080,14 @@ dasd_3990_erp_inspect_32(struct dasd_ccw_req * erp, char *sense)
2077 switch (sense[25]) { 2080 switch (sense[25]) {
2078 2081
2079 case 0x00: /* success - use default ERP for retries */ 2082 case 0x00: /* success - use default ERP for retries */
2080 DEV_MESSAGE(KERN_DEBUG, device, "%s", 2083 DBF_DEV_EVENT(DBF_DEBUG, device, "%s",
2081 "ERP called for successful request" 2084 "ERP called for successful request"
2082 " - just retry"); 2085 " - just retry");
2083 break; 2086 break;
2084 2087
2085 case 0x01: /* fatal error */ 2088 case 0x01: /* fatal error */
2086 DEV_MESSAGE(KERN_ERR, device, "%s", 2089 dev_err(&device->cdev->dev,
2087 "Retry not recommended - Fatal error"); 2090 "ERP failed for the DASD\n");
2088 2091
2089 erp = dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED); 2092 erp = dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED);
2090 break; 2093 break;
@@ -2094,13 +2097,10 @@ dasd_3990_erp_inspect_32(struct dasd_ccw_req * erp, char *sense)
2094 erp = dasd_3990_erp_int_req(erp); 2097 erp = dasd_3990_erp_int_req(erp);
2095 break; 2098 break;
2096 2099
2097 case 0x0F: /* length mismatch during update write command */ 2100 case 0x0F: /* length mismatch during update write command
2098 DEV_MESSAGE(KERN_ERR, device, "%s", 2101 internal error 08 - update write command error*/
2099 "update write command error - should not " 2102 dev_err(&device->cdev->dev, "An error occurred in the "
2100 "happen;\n" 2103 "DASD device driver, reason=%s\n", "08");
2101 "Please send this message together with "
2102 "the above sense data to linux390@de."
2103 "ibm.com");
2104 2104
2105 erp = dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED); 2105 erp = dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED);
2106 break; 2106 break;
@@ -2109,13 +2109,12 @@ dasd_3990_erp_inspect_32(struct dasd_ccw_req * erp, char *sense)
2109 erp = dasd_3990_erp_action_10_32(erp, sense); 2109 erp = dasd_3990_erp_action_10_32(erp, sense);
2110 break; 2110 break;
2111 2111
2112 case 0x15: /* next track outside defined extend */ 2112 case 0x15: /* next track outside defined extend
2113 DEV_MESSAGE(KERN_ERR, device, "%s", 2113 internal error 07 - The next track is not
2114 "next track outside defined extend - " 2114 within the defined storage extent */
2115 "should not happen;\n" 2115 dev_err(&device->cdev->dev,
2116 "Please send this message together with " 2116 "An error occurred in the DASD device driver, "
2117 "the above sense data to linux390@de." 2117 "reason=%s\n", "07");
2118 "ibm.com");
2119 2118
2120 erp = dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED); 2119 erp = dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED);
2121 break; 2120 break;
@@ -2126,9 +2125,9 @@ dasd_3990_erp_inspect_32(struct dasd_ccw_req * erp, char *sense)
2126 break; 2125 break;
2127 2126
2128 case 0x1C: /* invalid data */ 2127 case 0x1C: /* invalid data */
2129 DEV_MESSAGE(KERN_EMERG, device, "%s", 2128 dev_emerg(&device->cdev->dev,
2130 "Data recovered during retry with PCI " 2129 "Data recovered during retry with PCI "
2131 "fetch mode active"); 2130 "fetch mode active\n");
2132 2131
2133 /* not possible to handle this situation in Linux */ 2132 /* not possible to handle this situation in Linux */
2134 panic 2133 panic
@@ -2137,7 +2136,7 @@ dasd_3990_erp_inspect_32(struct dasd_ccw_req * erp, char *sense)
2137 break; 2136 break;
2138 2137
2139 case 0x1D: /* state-change pending */ 2138 case 0x1D: /* state-change pending */
2140 DEV_MESSAGE(KERN_DEBUG, device, "%s", 2139 DBF_DEV_EVENT(DBF_WARNING, device, "%s",
2141 "A State change pending condition exists " 2140 "A State change pending condition exists "
2142 "for the subsystem or device"); 2141 "for the subsystem or device");
2143 2142
@@ -2145,7 +2144,7 @@ dasd_3990_erp_inspect_32(struct dasd_ccw_req * erp, char *sense)
2145 break; 2144 break;
2146 2145
2147 case 0x1E: /* busy */ 2146 case 0x1E: /* busy */
2148 DEV_MESSAGE(KERN_DEBUG, device, "%s", 2147 DBF_DEV_EVENT(DBF_WARNING, device, "%s",
2149 "Busy condition exists " 2148 "Busy condition exists "
2150 "for the subsystem or device"); 2149 "for the subsystem or device");
2151 erp = dasd_3990_erp_action_4(erp, sense); 2150 erp = dasd_3990_erp_action_4(erp, sense);
@@ -2187,7 +2186,7 @@ dasd_3990_erp_control_check(struct dasd_ccw_req *erp)
2187 2186
2188 if (scsw_cstat(&erp->refers->irb.scsw) & (SCHN_STAT_INTF_CTRL_CHK 2187 if (scsw_cstat(&erp->refers->irb.scsw) & (SCHN_STAT_INTF_CTRL_CHK
2189 | SCHN_STAT_CHN_CTRL_CHK)) { 2188 | SCHN_STAT_CHN_CTRL_CHK)) {
2190 DEV_MESSAGE(KERN_DEBUG, device, "%s", 2189 DBF_DEV_EVENT(DBF_WARNING, device, "%s",
2191 "channel or interface control check"); 2190 "channel or interface control check");
2192 erp = dasd_3990_erp_action_4(erp, NULL); 2191 erp = dasd_3990_erp_action_4(erp, NULL);
2193 } 2192 }
@@ -2282,12 +2281,12 @@ static struct dasd_ccw_req *dasd_3990_erp_add_erp(struct dasd_ccw_req *cqr)
2282 cplength, datasize, device); 2281 cplength, datasize, device);
2283 if (IS_ERR(erp)) { 2282 if (IS_ERR(erp)) {
2284 if (cqr->retries <= 0) { 2283 if (cqr->retries <= 0) {
2285 DEV_MESSAGE(KERN_ERR, device, "%s", 2284 DBF_DEV_EVENT(DBF_ERR, device, "%s",
2286 "Unable to allocate ERP request"); 2285 "Unable to allocate ERP request");
2287 cqr->status = DASD_CQR_FAILED; 2286 cqr->status = DASD_CQR_FAILED;
2288 cqr->stopclk = get_clock (); 2287 cqr->stopclk = get_clock ();
2289 } else { 2288 } else {
2290 DEV_MESSAGE (KERN_ERR, device, 2289 DBF_DEV_EVENT(DBF_ERR, device,
2291 "Unable to allocate ERP request " 2290 "Unable to allocate ERP request "
2292 "(%i retries left)", 2291 "(%i retries left)",
2293 cqr->retries); 2292 cqr->retries);
@@ -2516,7 +2515,7 @@ dasd_3990_erp_further_erp(struct dasd_ccw_req *erp)
2516 break; 2515 break;
2517 } 2516 }
2518 default: 2517 default:
2519 DEV_MESSAGE(KERN_DEBUG, device, 2518 DBF_DEV_EVENT(DBF_WARNING, device,
2520 "invalid subcommand modifier 0x%x " 2519 "invalid subcommand modifier 0x%x "
2521 "for Diagnostic Control Command", 2520 "for Diagnostic Control Command",
2522 sense[25]); 2521 sense[25]);
@@ -2533,11 +2532,12 @@ dasd_3990_erp_further_erp(struct dasd_ccw_req *erp)
2533 erp = dasd_3990_erp_compound(erp, sense); 2532 erp = dasd_3990_erp_compound(erp, sense);
2534 2533
2535 } else { 2534 } else {
2536 /* No retry left and no additional special handling */ 2535 /*
2537 /*necessary */ 2536 * No retry left and no additional special handling
2538 DEV_MESSAGE(KERN_ERR, device, 2537 * necessary
2539 "no retries left for erp %p - " 2538 */
2540 "set status to FAILED", erp); 2539 dev_err(&device->cdev->dev,
2540 "ERP %p has run out of retries and failed\n", erp);
2541 2541
2542 erp->status = DASD_CQR_FAILED; 2542 erp->status = DASD_CQR_FAILED;
2543 } 2543 }
@@ -2612,7 +2612,7 @@ dasd_3990_erp_handle_match_erp(struct dasd_ccw_req *erp_head,
2612 2612
2613 } else { 2613 } else {
2614 /* simple retry */ 2614 /* simple retry */
2615 DEV_MESSAGE(KERN_DEBUG, device, 2615 DBF_DEV_EVENT(DBF_DEBUG, device,
2616 "%i retries left for erp %p", 2616 "%i retries left for erp %p",
2617 erp->retries, erp); 2617 erp->retries, erp);
2618 2618
@@ -2656,13 +2656,13 @@ dasd_3990_erp_action(struct dasd_ccw_req * cqr)
2656 2656
2657 if (device->features & DASD_FEATURE_ERPLOG) { 2657 if (device->features & DASD_FEATURE_ERPLOG) {
2658 /* print current erp_chain */ 2658 /* print current erp_chain */
2659 DEV_MESSAGE(KERN_ERR, device, "%s", 2659 dev_err(&device->cdev->dev,
2660 "ERP chain at BEGINNING of ERP-ACTION"); 2660 "ERP chain at BEGINNING of ERP-ACTION\n");
2661 for (temp_erp = cqr; 2661 for (temp_erp = cqr;
2662 temp_erp != NULL; temp_erp = temp_erp->refers) { 2662 temp_erp != NULL; temp_erp = temp_erp->refers) {
2663 2663
2664 DEV_MESSAGE(KERN_ERR, device, 2664 dev_err(&device->cdev->dev,
2665 " erp %p (%02x) refers to %p", 2665 "ERP %p (%02x) refers to %p\n",
2666 temp_erp, temp_erp->status, 2666 temp_erp, temp_erp->status,
2667 temp_erp->refers); 2667 temp_erp->refers);
2668 } 2668 }
@@ -2673,7 +2673,7 @@ dasd_3990_erp_action(struct dasd_ccw_req * cqr)
2673 (scsw_dstat(&cqr->irb.scsw) == 2673 (scsw_dstat(&cqr->irb.scsw) ==
2674 (DEV_STAT_CHN_END | DEV_STAT_DEV_END))) { 2674 (DEV_STAT_CHN_END | DEV_STAT_DEV_END))) {
2675 2675
2676 DEV_MESSAGE(KERN_DEBUG, device, 2676 DBF_DEV_EVENT(DBF_DEBUG, device,
2677 "ERP called for successful request %p" 2677 "ERP called for successful request %p"
2678 " - NO ERP necessary", cqr); 2678 " - NO ERP necessary", cqr);
2679 2679
@@ -2695,13 +2695,13 @@ dasd_3990_erp_action(struct dasd_ccw_req * cqr)
2695 2695
2696 if (device->features & DASD_FEATURE_ERPLOG) { 2696 if (device->features & DASD_FEATURE_ERPLOG) {
2697 /* print current erp_chain */ 2697 /* print current erp_chain */
2698 DEV_MESSAGE(KERN_ERR, device, "%s", 2698 dev_err(&device->cdev->dev,
2699 "ERP chain at END of ERP-ACTION"); 2699 "ERP chain at END of ERP-ACTION\n");
2700 for (temp_erp = erp; 2700 for (temp_erp = erp;
2701 temp_erp != NULL; temp_erp = temp_erp->refers) { 2701 temp_erp != NULL; temp_erp = temp_erp->refers) {
2702 2702
2703 DEV_MESSAGE(KERN_ERR, device, 2703 dev_err(&device->cdev->dev,
2704 " erp %p (%02x) refers to %p", 2704 "ERP %p (%02x) refers to %p\n",
2705 temp_erp, temp_erp->status, 2705 temp_erp, temp_erp->status,
2706 temp_erp->refers); 2706 temp_erp->refers);
2707 } 2707 }
@@ -2714,6 +2714,8 @@ dasd_3990_erp_action(struct dasd_ccw_req * cqr)
2714 list_add_tail(&erp->blocklist, &cqr->blocklist); 2714 list_add_tail(&erp->blocklist, &cqr->blocklist);
2715 } 2715 }
2716 2716
2717
2718
2717 return erp; 2719 return erp;
2718 2720
2719} /* end dasd_3990_erp_action */ 2721} /* end dasd_3990_erp_action */