diff options
author | Carsten Otte <cotte@de.ibm.com> | 2009-03-26 10:24:38 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-03-26 10:24:25 -0400 |
commit | ab640db01013192f6867785a7def7c9d9ec8903d (patch) | |
tree | 3df0fb5b788eeaaa4b0540fbf136b20c9ffd56f4 /drivers/s390/char/tape_34xx.c | |
parent | 1edad85b16fdda43c8ab809e2779e8bf64ab8bb2 (diff) |
[S390] tape message cleanup
This is a cleanup of all the messages this driver prints. It uses the
dev_message macros now.
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/char/tape_34xx.c')
-rw-r--r-- | drivers/s390/char/tape_34xx.c | 161 |
1 files changed, 70 insertions, 91 deletions
diff --git a/drivers/s390/char/tape_34xx.c b/drivers/s390/char/tape_34xx.c index 22ca34361ed7..807ded5eb049 100644 --- a/drivers/s390/char/tape_34xx.c +++ b/drivers/s390/char/tape_34xx.c | |||
@@ -8,6 +8,8 @@ | |||
8 | * Martin Schwidefsky <schwidefsky@de.ibm.com> | 8 | * Martin Schwidefsky <schwidefsky@de.ibm.com> |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #define KMSG_COMPONENT "tape" | ||
12 | |||
11 | #include <linux/module.h> | 13 | #include <linux/module.h> |
12 | #include <linux/init.h> | 14 | #include <linux/init.h> |
13 | #include <linux/bio.h> | 15 | #include <linux/bio.h> |
@@ -18,8 +20,6 @@ | |||
18 | #include "tape.h" | 20 | #include "tape.h" |
19 | #include "tape_std.h" | 21 | #include "tape_std.h" |
20 | 22 | ||
21 | #define PRINTK_HEADER "TAPE_34XX: " | ||
22 | |||
23 | /* | 23 | /* |
24 | * Pointer to debug area. | 24 | * Pointer to debug area. |
25 | */ | 25 | */ |
@@ -203,8 +203,7 @@ tape_34xx_unsolicited_irq(struct tape_device *device, struct irb *irb) | |||
203 | tape_34xx_schedule_work(device, TO_MSEN); | 203 | tape_34xx_schedule_work(device, TO_MSEN); |
204 | } else { | 204 | } else { |
205 | DBF_EVENT(3, "unsol.irq! dev end: %08x\n", device->cdev_id); | 205 | DBF_EVENT(3, "unsol.irq! dev end: %08x\n", device->cdev_id); |
206 | PRINT_WARN("Unsolicited IRQ (Device End) caught.\n"); | 206 | tape_dump_sense_dbf(device, NULL, irb); |
207 | tape_dump_sense(device, NULL, irb); | ||
208 | } | 207 | } |
209 | return TAPE_IO_SUCCESS; | 208 | return TAPE_IO_SUCCESS; |
210 | } | 209 | } |
@@ -226,9 +225,7 @@ tape_34xx_erp_read_opposite(struct tape_device *device, | |||
226 | tape_std_read_backward(device, request); | 225 | tape_std_read_backward(device, request); |
227 | return tape_34xx_erp_retry(request); | 226 | return tape_34xx_erp_retry(request); |
228 | } | 227 | } |
229 | if (request->op != TO_RBA) | 228 | |
230 | PRINT_ERR("read_opposite called with state:%s\n", | ||
231 | tape_op_verbose[request->op]); | ||
232 | /* | 229 | /* |
233 | * We tried to read forward and backward, but hat no | 230 | * We tried to read forward and backward, but hat no |
234 | * success -> failed. | 231 | * success -> failed. |
@@ -241,13 +238,9 @@ tape_34xx_erp_bug(struct tape_device *device, struct tape_request *request, | |||
241 | struct irb *irb, int no) | 238 | struct irb *irb, int no) |
242 | { | 239 | { |
243 | if (request->op != TO_ASSIGN) { | 240 | if (request->op != TO_ASSIGN) { |
244 | PRINT_WARN("An unexpected condition #%d was caught in " | 241 | dev_err(&device->cdev->dev, "An unexpected condition %d " |
245 | "tape error recovery.\n", no); | 242 | "occurred in tape error recovery\n", no); |
246 | PRINT_WARN("Please report this incident.\n"); | 243 | tape_dump_sense_dbf(device, request, irb); |
247 | if (request) | ||
248 | PRINT_WARN("Operation of tape:%s\n", | ||
249 | tape_op_verbose[request->op]); | ||
250 | tape_dump_sense(device, request, irb); | ||
251 | } | 244 | } |
252 | return tape_34xx_erp_failed(request, -EIO); | 245 | return tape_34xx_erp_failed(request, -EIO); |
253 | } | 246 | } |
@@ -261,9 +254,8 @@ tape_34xx_erp_overrun(struct tape_device *device, struct tape_request *request, | |||
261 | struct irb *irb) | 254 | struct irb *irb) |
262 | { | 255 | { |
263 | if (irb->ecw[3] == 0x40) { | 256 | if (irb->ecw[3] == 0x40) { |
264 | PRINT_WARN ("Data overrun error between control-unit " | 257 | dev_warn (&device->cdev->dev, "A data overrun occurred between" |
265 | "and drive. Use a faster channel connection, " | 258 | " the control unit and tape unit\n"); |
266 | "if possible! \n"); | ||
267 | return tape_34xx_erp_failed(request, -EIO); | 259 | return tape_34xx_erp_failed(request, -EIO); |
268 | } | 260 | } |
269 | return tape_34xx_erp_bug(device, request, irb, -1); | 261 | return tape_34xx_erp_bug(device, request, irb, -1); |
@@ -280,7 +272,8 @@ tape_34xx_erp_sequence(struct tape_device *device, | |||
280 | /* | 272 | /* |
281 | * cu detected incorrect block-id sequence on tape. | 273 | * cu detected incorrect block-id sequence on tape. |
282 | */ | 274 | */ |
283 | PRINT_WARN("Illegal block-id sequence found!\n"); | 275 | dev_warn (&device->cdev->dev, "The block ID sequence on the " |
276 | "tape is incorrect\n"); | ||
284 | return tape_34xx_erp_failed(request, -EIO); | 277 | return tape_34xx_erp_failed(request, -EIO); |
285 | } | 278 | } |
286 | /* | 279 | /* |
@@ -393,8 +386,6 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request, | |||
393 | /* Writing at physical end of volume */ | 386 | /* Writing at physical end of volume */ |
394 | return tape_34xx_erp_failed(request, -ENOSPC); | 387 | return tape_34xx_erp_failed(request, -ENOSPC); |
395 | default: | 388 | default: |
396 | PRINT_ERR("Invalid op in %s:%i\n", | ||
397 | __func__, __LINE__); | ||
398 | return tape_34xx_erp_failed(request, 0); | 389 | return tape_34xx_erp_failed(request, 0); |
399 | } | 390 | } |
400 | } | 391 | } |
@@ -420,7 +411,8 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request, | |||
420 | irb, -4); | 411 | irb, -4); |
421 | 412 | ||
422 | /* data check is permanent, CU recovery has failed */ | 413 | /* data check is permanent, CU recovery has failed */ |
423 | PRINT_WARN("Permanent read error\n"); | 414 | dev_warn (&device->cdev->dev, "A read error occurred " |
415 | "that cannot be recovered\n"); | ||
424 | return tape_34xx_erp_failed(request, -EIO); | 416 | return tape_34xx_erp_failed(request, -EIO); |
425 | case 0x25: | 417 | case 0x25: |
426 | // a write data check occurred | 418 | // a write data check occurred |
@@ -433,22 +425,26 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request, | |||
433 | irb, -5); | 425 | irb, -5); |
434 | 426 | ||
435 | // data check is permanent, cu-recovery has failed | 427 | // data check is permanent, cu-recovery has failed |
436 | PRINT_WARN("Permanent write error\n"); | 428 | dev_warn (&device->cdev->dev, "A write error on the " |
429 | "tape cannot be recovered\n"); | ||
437 | return tape_34xx_erp_failed(request, -EIO); | 430 | return tape_34xx_erp_failed(request, -EIO); |
438 | case 0x26: | 431 | case 0x26: |
439 | /* Data Check (read opposite) occurred. */ | 432 | /* Data Check (read opposite) occurred. */ |
440 | return tape_34xx_erp_read_opposite(device, request); | 433 | return tape_34xx_erp_read_opposite(device, request); |
441 | case 0x28: | 434 | case 0x28: |
442 | /* ID-Mark at tape start couldn't be written */ | 435 | /* ID-Mark at tape start couldn't be written */ |
443 | PRINT_WARN("ID-Mark could not be written.\n"); | 436 | dev_warn (&device->cdev->dev, "Writing the ID-mark " |
437 | "failed\n"); | ||
444 | return tape_34xx_erp_failed(request, -EIO); | 438 | return tape_34xx_erp_failed(request, -EIO); |
445 | case 0x31: | 439 | case 0x31: |
446 | /* Tape void. Tried to read beyond end of device. */ | 440 | /* Tape void. Tried to read beyond end of device. */ |
447 | PRINT_WARN("Read beyond end of recorded area.\n"); | 441 | dev_warn (&device->cdev->dev, "Reading the tape beyond" |
442 | " the end of the recorded area failed\n"); | ||
448 | return tape_34xx_erp_failed(request, -ENOSPC); | 443 | return tape_34xx_erp_failed(request, -ENOSPC); |
449 | case 0x41: | 444 | case 0x41: |
450 | /* Record sequence error. */ | 445 | /* Record sequence error. */ |
451 | PRINT_WARN("Invalid block-id sequence found.\n"); | 446 | dev_warn (&device->cdev->dev, "The tape contains an " |
447 | "incorrect block ID sequence\n"); | ||
452 | return tape_34xx_erp_failed(request, -EIO); | 448 | return tape_34xx_erp_failed(request, -EIO); |
453 | default: | 449 | default: |
454 | /* all data checks for 3480 should result in one of | 450 | /* all data checks for 3480 should result in one of |
@@ -470,16 +466,12 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request, | |||
470 | switch (sense[3]) { | 466 | switch (sense[3]) { |
471 | case 0x00: | 467 | case 0x00: |
472 | /* Unit check with erpa code 0. Report and ignore. */ | 468 | /* Unit check with erpa code 0. Report and ignore. */ |
473 | PRINT_WARN("Non-error sense was found. " | ||
474 | "Unit-check will be ignored.\n"); | ||
475 | return TAPE_IO_SUCCESS; | 469 | return TAPE_IO_SUCCESS; |
476 | case 0x21: | 470 | case 0x21: |
477 | /* | 471 | /* |
478 | * Data streaming not operational. CU will switch to | 472 | * Data streaming not operational. CU will switch to |
479 | * interlock mode. Reissue the command. | 473 | * interlock mode. Reissue the command. |
480 | */ | 474 | */ |
481 | PRINT_WARN("Data streaming not operational. " | ||
482 | "Switching to interlock-mode.\n"); | ||
483 | return tape_34xx_erp_retry(request); | 475 | return tape_34xx_erp_retry(request); |
484 | case 0x22: | 476 | case 0x22: |
485 | /* | 477 | /* |
@@ -487,11 +479,8 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request, | |||
487 | * error on the lower interface, internal path not usable, | 479 | * error on the lower interface, internal path not usable, |
488 | * or error during cartridge load. | 480 | * or error during cartridge load. |
489 | */ | 481 | */ |
490 | PRINT_WARN("A path equipment check occurred. One of the " | 482 | dev_warn (&device->cdev->dev, "A path equipment check occurred" |
491 | "following conditions occurred:\n"); | 483 | " for the tape device\n"); |
492 | PRINT_WARN("drive adapter error, buffer error on the lower " | ||
493 | "interface, internal path not usable, error " | ||
494 | "during cartridge load.\n"); | ||
495 | return tape_34xx_erp_failed(request, -EIO); | 484 | return tape_34xx_erp_failed(request, -EIO); |
496 | case 0x24: | 485 | case 0x24: |
497 | /* | 486 | /* |
@@ -514,7 +503,6 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request, | |||
514 | * but the hardware isn't capable to do idrc, or a perform | 503 | * but the hardware isn't capable to do idrc, or a perform |
515 | * subsystem func is issued and the CU is not on-line. | 504 | * subsystem func is issued and the CU is not on-line. |
516 | */ | 505 | */ |
517 | PRINT_WARN ("Function incompatible. Try to switch off idrc\n"); | ||
518 | return tape_34xx_erp_failed(request, -EIO); | 506 | return tape_34xx_erp_failed(request, -EIO); |
519 | case 0x2a: | 507 | case 0x2a: |
520 | /* | 508 | /* |
@@ -552,23 +540,26 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request, | |||
552 | * reading the format id mark or that that format specified | 540 | * reading the format id mark or that that format specified |
553 | * is not supported by the drive. | 541 | * is not supported by the drive. |
554 | */ | 542 | */ |
555 | PRINT_WARN("Drive not capable processing the tape format!\n"); | 543 | dev_warn (&device->cdev->dev, "The tape unit cannot process " |
544 | "the tape format\n"); | ||
556 | return tape_34xx_erp_failed(request, -EMEDIUMTYPE); | 545 | return tape_34xx_erp_failed(request, -EMEDIUMTYPE); |
557 | case 0x30: | 546 | case 0x30: |
558 | /* The medium is write protected. */ | 547 | /* The medium is write protected. */ |
559 | PRINT_WARN("Medium is write protected!\n"); | 548 | dev_warn (&device->cdev->dev, "The tape medium is write-" |
549 | "protected\n"); | ||
560 | return tape_34xx_erp_failed(request, -EACCES); | 550 | return tape_34xx_erp_failed(request, -EACCES); |
561 | case 0x32: | 551 | case 0x32: |
562 | // Tension loss. We cannot recover this, it's an I/O error. | 552 | // Tension loss. We cannot recover this, it's an I/O error. |
563 | PRINT_WARN("The drive lost tape tension.\n"); | 553 | dev_warn (&device->cdev->dev, "The tape does not have the " |
554 | "required tape tension\n"); | ||
564 | return tape_34xx_erp_failed(request, -EIO); | 555 | return tape_34xx_erp_failed(request, -EIO); |
565 | case 0x33: | 556 | case 0x33: |
566 | /* | 557 | /* |
567 | * Load Failure. The cartridge was not inserted correctly or | 558 | * Load Failure. The cartridge was not inserted correctly or |
568 | * the tape is not threaded correctly. | 559 | * the tape is not threaded correctly. |
569 | */ | 560 | */ |
570 | PRINT_WARN("Cartridge load failure. Reload the cartridge " | 561 | dev_warn (&device->cdev->dev, "The tape unit failed to load" |
571 | "and try again.\n"); | 562 | " the cartridge\n"); |
572 | tape_34xx_delete_sbid_from(device, 0); | 563 | tape_34xx_delete_sbid_from(device, 0); |
573 | return tape_34xx_erp_failed(request, -EIO); | 564 | return tape_34xx_erp_failed(request, -EIO); |
574 | case 0x34: | 565 | case 0x34: |
@@ -576,8 +567,8 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request, | |||
576 | * Unload failure. The drive cannot maintain tape tension | 567 | * Unload failure. The drive cannot maintain tape tension |
577 | * and control tape movement during an unload operation. | 568 | * and control tape movement during an unload operation. |
578 | */ | 569 | */ |
579 | PRINT_WARN("Failure during cartridge unload. " | 570 | dev_warn (&device->cdev->dev, "Automatic unloading of the tape" |
580 | "Please try manually.\n"); | 571 | " cartridge failed\n"); |
581 | if (request->op == TO_RUN) | 572 | if (request->op == TO_RUN) |
582 | return tape_34xx_erp_failed(request, -EIO); | 573 | return tape_34xx_erp_failed(request, -EIO); |
583 | return tape_34xx_erp_bug(device, request, irb, sense[3]); | 574 | return tape_34xx_erp_bug(device, request, irb, sense[3]); |
@@ -589,8 +580,8 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request, | |||
589 | * - the cartridge loader does not respond correctly | 580 | * - the cartridge loader does not respond correctly |
590 | * - a failure occurs during an index, load, or unload cycle | 581 | * - a failure occurs during an index, load, or unload cycle |
591 | */ | 582 | */ |
592 | PRINT_WARN("Equipment check! Please check the drive and " | 583 | dev_warn (&device->cdev->dev, "An equipment check has occurred" |
593 | "the cartridge loader.\n"); | 584 | " on the tape unit\n"); |
594 | return tape_34xx_erp_failed(request, -EIO); | 585 | return tape_34xx_erp_failed(request, -EIO); |
595 | case 0x36: | 586 | case 0x36: |
596 | if (device->cdev->id.driver_info == tape_3490) | 587 | if (device->cdev->id.driver_info == tape_3490) |
@@ -603,7 +594,8 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request, | |||
603 | * Tape length error. The tape is shorter than reported in | 594 | * Tape length error. The tape is shorter than reported in |
604 | * the beginning-of-tape data. | 595 | * the beginning-of-tape data. |
605 | */ | 596 | */ |
606 | PRINT_WARN("Tape length error.\n"); | 597 | dev_warn (&device->cdev->dev, "The tape information states an" |
598 | " incorrect length\n"); | ||
607 | return tape_34xx_erp_failed(request, -EIO); | 599 | return tape_34xx_erp_failed(request, -EIO); |
608 | case 0x38: | 600 | case 0x38: |
609 | /* | 601 | /* |
@@ -620,12 +612,12 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request, | |||
620 | return tape_34xx_erp_failed(request, -EIO); | 612 | return tape_34xx_erp_failed(request, -EIO); |
621 | case 0x3a: | 613 | case 0x3a: |
622 | /* Drive switched to not ready. */ | 614 | /* Drive switched to not ready. */ |
623 | PRINT_WARN("Drive not ready. Turn the ready/not ready switch " | 615 | dev_warn (&device->cdev->dev, "The tape unit is not ready\n"); |
624 | "to ready position and try again.\n"); | ||
625 | return tape_34xx_erp_failed(request, -EIO); | 616 | return tape_34xx_erp_failed(request, -EIO); |
626 | case 0x3b: | 617 | case 0x3b: |
627 | /* Manual rewind or unload. This causes an I/O error. */ | 618 | /* Manual rewind or unload. This causes an I/O error. */ |
628 | PRINT_WARN("Medium was rewound or unloaded manually.\n"); | 619 | dev_warn (&device->cdev->dev, "The tape medium has been " |
620 | "rewound or unloaded manually\n"); | ||
629 | tape_34xx_delete_sbid_from(device, 0); | 621 | tape_34xx_delete_sbid_from(device, 0); |
630 | return tape_34xx_erp_failed(request, -EIO); | 622 | return tape_34xx_erp_failed(request, -EIO); |
631 | case 0x42: | 623 | case 0x42: |
@@ -633,7 +625,8 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request, | |||
633 | * Degraded mode. A condition that can cause degraded | 625 | * Degraded mode. A condition that can cause degraded |
634 | * performance is detected. | 626 | * performance is detected. |
635 | */ | 627 | */ |
636 | PRINT_WARN("Subsystem is running in degraded mode.\n"); | 628 | dev_warn (&device->cdev->dev, "The tape subsystem is running " |
629 | "in degraded mode\n"); | ||
637 | return tape_34xx_erp_retry(request); | 630 | return tape_34xx_erp_retry(request); |
638 | case 0x43: | 631 | case 0x43: |
639 | /* Drive not ready. */ | 632 | /* Drive not ready. */ |
@@ -652,7 +645,6 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request, | |||
652 | break; | 645 | break; |
653 | } | 646 | } |
654 | } | 647 | } |
655 | PRINT_WARN("The drive is not ready.\n"); | ||
656 | return tape_34xx_erp_failed(request, -ENOMEDIUM); | 648 | return tape_34xx_erp_failed(request, -ENOMEDIUM); |
657 | case 0x44: | 649 | case 0x44: |
658 | /* Locate Block unsuccessful. */ | 650 | /* Locate Block unsuccessful. */ |
@@ -663,7 +655,8 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request, | |||
663 | return tape_34xx_erp_failed(request, -EIO); | 655 | return tape_34xx_erp_failed(request, -EIO); |
664 | case 0x45: | 656 | case 0x45: |
665 | /* The drive is assigned to a different channel path. */ | 657 | /* The drive is assigned to a different channel path. */ |
666 | PRINT_WARN("The drive is assigned elsewhere.\n"); | 658 | dev_warn (&device->cdev->dev, "The tape unit is already " |
659 | "assigned\n"); | ||
667 | return tape_34xx_erp_failed(request, -EIO); | 660 | return tape_34xx_erp_failed(request, -EIO); |
668 | case 0x46: | 661 | case 0x46: |
669 | /* | 662 | /* |
@@ -671,11 +664,12 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request, | |||
671 | * the power supply may be switched off or | 664 | * the power supply may be switched off or |
672 | * the drive address may not be set correctly. | 665 | * the drive address may not be set correctly. |
673 | */ | 666 | */ |
674 | PRINT_WARN("The drive is not on-line."); | 667 | dev_warn (&device->cdev->dev, "The tape unit is not online\n"); |
675 | return tape_34xx_erp_failed(request, -EIO); | 668 | return tape_34xx_erp_failed(request, -EIO); |
676 | case 0x47: | 669 | case 0x47: |
677 | /* Volume fenced. CU reports volume integrity is lost. */ | 670 | /* Volume fenced. CU reports volume integrity is lost. */ |
678 | PRINT_WARN("Volume fenced. The volume integrity is lost.\n"); | 671 | dev_warn (&device->cdev->dev, "The control unit has fenced " |
672 | "access to the tape volume\n"); | ||
679 | tape_34xx_delete_sbid_from(device, 0); | 673 | tape_34xx_delete_sbid_from(device, 0); |
680 | return tape_34xx_erp_failed(request, -EIO); | 674 | return tape_34xx_erp_failed(request, -EIO); |
681 | case 0x48: | 675 | case 0x48: |
@@ -683,20 +677,21 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request, | |||
683 | return tape_34xx_erp_retry(request); | 677 | return tape_34xx_erp_retry(request); |
684 | case 0x49: | 678 | case 0x49: |
685 | /* Bus out check. A parity check error on the bus was found. */ | 679 | /* Bus out check. A parity check error on the bus was found. */ |
686 | PRINT_WARN("Bus out check. A data transfer over the bus " | 680 | dev_warn (&device->cdev->dev, "A parity error occurred on the " |
687 | "has been corrupted.\n"); | 681 | "tape bus\n"); |
688 | return tape_34xx_erp_failed(request, -EIO); | 682 | return tape_34xx_erp_failed(request, -EIO); |
689 | case 0x4a: | 683 | case 0x4a: |
690 | /* Control unit erp failed. */ | 684 | /* Control unit erp failed. */ |
691 | PRINT_WARN("The control unit I/O error recovery failed.\n"); | 685 | dev_warn (&device->cdev->dev, "I/O error recovery failed on " |
686 | "the tape control unit\n"); | ||
692 | return tape_34xx_erp_failed(request, -EIO); | 687 | return tape_34xx_erp_failed(request, -EIO); |
693 | case 0x4b: | 688 | case 0x4b: |
694 | /* | 689 | /* |
695 | * CU and drive incompatible. The drive requests micro-program | 690 | * CU and drive incompatible. The drive requests micro-program |
696 | * patches, which are not available on the CU. | 691 | * patches, which are not available on the CU. |
697 | */ | 692 | */ |
698 | PRINT_WARN("The drive needs microprogram patches from the " | 693 | dev_warn (&device->cdev->dev, "The tape unit requires a " |
699 | "control unit, which are not available.\n"); | 694 | "firmware update\n"); |
700 | return tape_34xx_erp_failed(request, -EIO); | 695 | return tape_34xx_erp_failed(request, -EIO); |
701 | case 0x4c: | 696 | case 0x4c: |
702 | /* | 697 | /* |
@@ -721,8 +716,8 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request, | |||
721 | * the block to be written is larger than allowed for | 716 | * the block to be written is larger than allowed for |
722 | * buffered mode. | 717 | * buffered mode. |
723 | */ | 718 | */ |
724 | PRINT_WARN("Maximum block size for buffered " | 719 | dev_warn (&device->cdev->dev, "The maximum block size" |
725 | "mode exceeded.\n"); | 720 | " for buffered mode is exceeded\n"); |
726 | return tape_34xx_erp_failed(request, -ENOBUFS); | 721 | return tape_34xx_erp_failed(request, -ENOBUFS); |
727 | } | 722 | } |
728 | /* This erpa is reserved for 3480. */ | 723 | /* This erpa is reserved for 3480. */ |
@@ -759,22 +754,20 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request, | |||
759 | return tape_34xx_erp_retry(request); | 754 | return tape_34xx_erp_retry(request); |
760 | case 0x55: | 755 | case 0x55: |
761 | /* Channel interface recovery (permanent). */ | 756 | /* Channel interface recovery (permanent). */ |
762 | PRINT_WARN("A permanent channel interface error occurred.\n"); | 757 | dev_warn (&device->cdev->dev, "A channel interface error cannot be" |
758 | " recovered\n"); | ||
763 | return tape_34xx_erp_failed(request, -EIO); | 759 | return tape_34xx_erp_failed(request, -EIO); |
764 | case 0x56: | 760 | case 0x56: |
765 | /* Channel protocol error. */ | 761 | /* Channel protocol error. */ |
766 | PRINT_WARN("A channel protocol error occurred.\n"); | 762 | dev_warn (&device->cdev->dev, "A channel protocol error " |
763 | "occurred\n"); | ||
767 | return tape_34xx_erp_failed(request, -EIO); | 764 | return tape_34xx_erp_failed(request, -EIO); |
768 | case 0x57: | 765 | case 0x57: |
769 | if (device->cdev->id.driver_info == tape_3480) { | 766 | if (device->cdev->id.driver_info == tape_3480) { |
770 | /* Attention intercept. */ | 767 | /* Attention intercept. */ |
771 | PRINT_WARN("An attention intercept occurred, " | ||
772 | "which will be recovered.\n"); | ||
773 | return tape_34xx_erp_retry(request); | 768 | return tape_34xx_erp_retry(request); |
774 | } else { | 769 | } else { |
775 | /* Global status intercept. */ | 770 | /* Global status intercept. */ |
776 | PRINT_WARN("An global status intercept was received, " | ||
777 | "which will be recovered.\n"); | ||
778 | return tape_34xx_erp_retry(request); | 771 | return tape_34xx_erp_retry(request); |
779 | } | 772 | } |
780 | case 0x5a: | 773 | case 0x5a: |
@@ -782,42 +775,31 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request, | |||
782 | * Tape length incompatible. The tape inserted is too long, | 775 | * Tape length incompatible. The tape inserted is too long, |
783 | * which could cause damage to the tape or the drive. | 776 | * which could cause damage to the tape or the drive. |
784 | */ | 777 | */ |
785 | PRINT_WARN("Tape Length Incompatible\n"); | 778 | dev_warn (&device->cdev->dev, "The tape unit does not support " |
786 | PRINT_WARN("Tape length exceeds IBM enhanced capacity " | 779 | "the tape length\n"); |
787 | "cartdridge length or a medium\n"); | ||
788 | PRINT_WARN("with EC-CST identification mark has been mounted " | ||
789 | "in a device that writes\n"); | ||
790 | PRINT_WARN("3480 or 3480 XF format.\n"); | ||
791 | return tape_34xx_erp_failed(request, -EIO); | 780 | return tape_34xx_erp_failed(request, -EIO); |
792 | case 0x5b: | 781 | case 0x5b: |
793 | /* Format 3480 XF incompatible */ | 782 | /* Format 3480 XF incompatible */ |
794 | if (sense[1] & SENSE_BEGINNING_OF_TAPE) | 783 | if (sense[1] & SENSE_BEGINNING_OF_TAPE) |
795 | /* The tape will get overwritten. */ | 784 | /* The tape will get overwritten. */ |
796 | return tape_34xx_erp_retry(request); | 785 | return tape_34xx_erp_retry(request); |
797 | PRINT_WARN("Format 3480 XF Incompatible\n"); | 786 | dev_warn (&device->cdev->dev, "The tape unit does not support" |
798 | PRINT_WARN("Medium has been created in 3480 format. " | 787 | " format 3480 XF\n"); |
799 | "To change the format writes\n"); | ||
800 | PRINT_WARN("must be issued at BOT.\n"); | ||
801 | return tape_34xx_erp_failed(request, -EIO); | 788 | return tape_34xx_erp_failed(request, -EIO); |
802 | case 0x5c: | 789 | case 0x5c: |
803 | /* Format 3480-2 XF incompatible */ | 790 | /* Format 3480-2 XF incompatible */ |
804 | PRINT_WARN("Format 3480-2 XF Incompatible\n"); | 791 | dev_warn (&device->cdev->dev, "The tape unit does not support tape " |
805 | PRINT_WARN("Device can only read 3480 or 3480 XF format.\n"); | 792 | "format 3480-2 XF\n"); |
806 | return tape_34xx_erp_failed(request, -EIO); | 793 | return tape_34xx_erp_failed(request, -EIO); |
807 | case 0x5d: | 794 | case 0x5d: |
808 | /* Tape length violation. */ | 795 | /* Tape length violation. */ |
809 | PRINT_WARN("Tape Length Violation\n"); | 796 | dev_warn (&device->cdev->dev, "The tape unit does not support" |
810 | PRINT_WARN("The mounted tape exceeds IBM Enhanced Capacity " | 797 | " the current tape length\n"); |
811 | "Cartdridge System Tape length.\n"); | ||
812 | PRINT_WARN("This may cause damage to the drive or tape when " | ||
813 | "processing to the EOV\n"); | ||
814 | return tape_34xx_erp_failed(request, -EMEDIUMTYPE); | 798 | return tape_34xx_erp_failed(request, -EMEDIUMTYPE); |
815 | case 0x5e: | 799 | case 0x5e: |
816 | /* Compaction algorithm incompatible. */ | 800 | /* Compaction algorithm incompatible. */ |
817 | PRINT_WARN("Compaction Algorithm Incompatible\n"); | 801 | dev_warn (&device->cdev->dev, "The tape unit does not support" |
818 | PRINT_WARN("The volume is recorded using an incompatible " | 802 | " the compaction algorithm\n"); |
819 | "compaction algorithm,\n"); | ||
820 | PRINT_WARN("which is not supported by the device.\n"); | ||
821 | return tape_34xx_erp_failed(request, -EMEDIUMTYPE); | 803 | return tape_34xx_erp_failed(request, -EMEDIUMTYPE); |
822 | 804 | ||
823 | /* The following erpas should have been covered earlier. */ | 805 | /* The following erpas should have been covered earlier. */ |
@@ -848,7 +830,6 @@ tape_34xx_irq(struct tape_device *device, struct tape_request *request, | |||
848 | (irb->scsw.cmd.dstat & DEV_STAT_DEV_END) && | 830 | (irb->scsw.cmd.dstat & DEV_STAT_DEV_END) && |
849 | (request->op == TO_WRI)) { | 831 | (request->op == TO_WRI)) { |
850 | /* Write at end of volume */ | 832 | /* Write at end of volume */ |
851 | PRINT_INFO("End of volume\n"); /* XXX */ | ||
852 | return tape_34xx_erp_failed(request, -ENOSPC); | 833 | return tape_34xx_erp_failed(request, -ENOSPC); |
853 | } | 834 | } |
854 | 835 | ||
@@ -869,9 +850,7 @@ tape_34xx_irq(struct tape_device *device, struct tape_request *request, | |||
869 | } | 850 | } |
870 | 851 | ||
871 | DBF_EVENT(6, "xunknownirq\n"); | 852 | DBF_EVENT(6, "xunknownirq\n"); |
872 | PRINT_ERR("Unexpected interrupt.\n"); | 853 | tape_dump_sense_dbf(device, request, irb); |
873 | PRINT_ERR("Current op is: %s", tape_op_verbose[request->op]); | ||
874 | tape_dump_sense(device, request, irb); | ||
875 | return TAPE_IO_STOP; | 854 | return TAPE_IO_STOP; |
876 | } | 855 | } |
877 | 856 | ||