diff options
| -rw-r--r-- | drivers/s390/char/tape.h | 2 | ||||
| -rw-r--r-- | drivers/s390/char/tape_34xx.c | 161 | ||||
| -rw-r--r-- | drivers/s390/char/tape_3590.c | 364 | ||||
| -rw-r--r-- | drivers/s390/char/tape_block.c | 18 | ||||
| -rw-r--r-- | drivers/s390/char/tape_char.c | 7 | ||||
| -rw-r--r-- | drivers/s390/char/tape_core.c | 62 | ||||
| -rw-r--r-- | drivers/s390/char/tape_proc.c | 3 | ||||
| -rw-r--r-- | drivers/s390/char/tape_std.c | 21 |
8 files changed, 267 insertions, 371 deletions
diff --git a/drivers/s390/char/tape.h b/drivers/s390/char/tape.h index d0d565a05dfe..c07809c8016a 100644 --- a/drivers/s390/char/tape.h +++ b/drivers/s390/char/tape.h | |||
| @@ -324,8 +324,6 @@ static inline void tape_proc_cleanup (void) {;} | |||
| 324 | #endif | 324 | #endif |
| 325 | 325 | ||
| 326 | /* a function for dumping device sense info */ | 326 | /* a function for dumping device sense info */ |
| 327 | extern void tape_dump_sense(struct tape_device *, struct tape_request *, | ||
| 328 | struct irb *); | ||
| 329 | extern void tape_dump_sense_dbf(struct tape_device *, struct tape_request *, | 327 | extern void tape_dump_sense_dbf(struct tape_device *, struct tape_request *, |
| 330 | struct irb *); | 328 | struct irb *); |
| 331 | 329 | ||
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 | ||
diff --git a/drivers/s390/char/tape_3590.c b/drivers/s390/char/tape_3590.c index 71605a179d65..5a5bb97a081a 100644 --- a/drivers/s390/char/tape_3590.c +++ b/drivers/s390/char/tape_3590.c | |||
| @@ -8,12 +8,15 @@ | |||
| 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> |
| 14 | #include <asm/ebcdic.h> | 16 | #include <asm/ebcdic.h> |
| 15 | 17 | ||
| 16 | #define TAPE_DBF_AREA tape_3590_dbf | 18 | #define TAPE_DBF_AREA tape_3590_dbf |
| 19 | #define BUFSIZE 512 /* size of buffers for dynamic generated messages */ | ||
| 17 | 20 | ||
| 18 | #include "tape.h" | 21 | #include "tape.h" |
| 19 | #include "tape_std.h" | 22 | #include "tape_std.h" |
| @@ -36,7 +39,7 @@ EXPORT_SYMBOL(TAPE_DBF_AREA); | |||
| 36 | * - Read Alternate: implemented | 39 | * - Read Alternate: implemented |
| 37 | *******************************************************************/ | 40 | *******************************************************************/ |
| 38 | 41 | ||
| 39 | #define PRINTK_HEADER "TAPE_3590: " | 42 | #define KMSG_COMPONENT "tape" |
| 40 | 43 | ||
| 41 | static const char *tape_3590_msg[TAPE_3590_MAX_MSG] = { | 44 | static const char *tape_3590_msg[TAPE_3590_MAX_MSG] = { |
| 42 | [0x00] = "", | 45 | [0x00] = "", |
| @@ -726,7 +729,7 @@ static void tape_3590_med_state_set(struct tape_device *device, | |||
| 726 | } | 729 | } |
| 727 | c_info->medium_status |= TAPE390_MEDIUM_LOADED_MASK; | 730 | c_info->medium_status |= TAPE390_MEDIUM_LOADED_MASK; |
| 728 | if (sense->flags & MSENSE_CRYPT_MASK) { | 731 | if (sense->flags & MSENSE_CRYPT_MASK) { |
| 729 | PRINT_INFO("Medium is encrypted (%04x)\n", sense->flags); | 732 | DBF_EVENT(6, "Medium is encrypted (%04x)\n", sense->flags); |
| 730 | c_info->medium_status |= TAPE390_MEDIUM_ENCRYPTED_MASK; | 733 | c_info->medium_status |= TAPE390_MEDIUM_ENCRYPTED_MASK; |
| 731 | } else { | 734 | } else { |
| 732 | DBF_EVENT(6, "Medium is not encrypted %04x\n", sense->flags); | 735 | DBF_EVENT(6, "Medium is not encrypted %04x\n", sense->flags); |
| @@ -847,8 +850,7 @@ tape_3590_unsolicited_irq(struct tape_device *device, struct irb *irb) | |||
| 847 | tape_3590_schedule_work(device, TO_READ_ATTMSG); | 850 | tape_3590_schedule_work(device, TO_READ_ATTMSG); |
| 848 | } else { | 851 | } else { |
| 849 | DBF_EVENT(3, "unsol.irq! dev end: %08x\n", device->cdev_id); | 852 | DBF_EVENT(3, "unsol.irq! dev end: %08x\n", device->cdev_id); |
| 850 | PRINT_WARN("Unsolicited IRQ (Device End) caught.\n"); | 853 | tape_dump_sense_dbf(device, NULL, irb); |
| 851 | tape_dump_sense(device, NULL, irb); | ||
| 852 | } | 854 | } |
| 853 | /* check medium state */ | 855 | /* check medium state */ |
| 854 | tape_3590_schedule_work(device, TO_MSEN); | 856 | tape_3590_schedule_work(device, TO_MSEN); |
| @@ -876,8 +878,6 @@ tape_3590_erp_basic(struct tape_device *device, struct tape_request *request, | |||
| 876 | case SENSE_BRA_DRE: | 878 | case SENSE_BRA_DRE: |
| 877 | return tape_3590_erp_failed(device, request, irb, rc); | 879 | return tape_3590_erp_failed(device, request, irb, rc); |
| 878 | default: | 880 | default: |
| 879 | PRINT_ERR("Unknown BRA %x - This should not happen!\n", | ||
| 880 | sense->bra); | ||
| 881 | BUG(); | 881 | BUG(); |
| 882 | return TAPE_IO_STOP; | 882 | return TAPE_IO_STOP; |
| 883 | } | 883 | } |
| @@ -910,7 +910,8 @@ tape_3590_erp_swap(struct tape_device *device, struct tape_request *request, | |||
| 910 | * should proceed with the new tape... this | 910 | * should proceed with the new tape... this |
| 911 | * should probably be done in user space! | 911 | * should probably be done in user space! |
| 912 | */ | 912 | */ |
| 913 | PRINT_WARN("(%s): Swap Tape Device!\n", dev_name(&device->cdev->dev)); | 913 | dev_warn (&device->cdev->dev, "The tape medium must be loaded into a " |
| 914 | "different tape unit\n"); | ||
| 914 | return tape_3590_erp_basic(device, request, irb, -EIO); | 915 | return tape_3590_erp_basic(device, request, irb, -EIO); |
| 915 | } | 916 | } |
| 916 | 917 | ||
| @@ -985,8 +986,6 @@ tape_3590_erp_read_opposite(struct tape_device *device, | |||
| 985 | return tape_3590_erp_failed(device, request, irb, -EIO); | 986 | return tape_3590_erp_failed(device, request, irb, -EIO); |
| 986 | break; | 987 | break; |
| 987 | default: | 988 | default: |
| 988 | PRINT_WARN("read_opposite_recovery_called_with_op: %s\n", | ||
| 989 | tape_op_verbose[request->op]); | ||
| 990 | return tape_3590_erp_failed(device, request, irb, -EIO); | 989 | return tape_3590_erp_failed(device, request, irb, -EIO); |
| 991 | } | 990 | } |
| 992 | } | 991 | } |
| @@ -998,50 +997,61 @@ static void | |||
| 998 | tape_3590_print_mim_msg_f0(struct tape_device *device, struct irb *irb) | 997 | tape_3590_print_mim_msg_f0(struct tape_device *device, struct irb *irb) |
| 999 | { | 998 | { |
| 1000 | struct tape_3590_sense *sense; | 999 | struct tape_3590_sense *sense; |
| 1000 | char *exception, *service; | ||
| 1001 | |||
| 1002 | exception = kmalloc(BUFSIZE, GFP_ATOMIC); | ||
| 1003 | service = kmalloc(BUFSIZE, GFP_ATOMIC); | ||
| 1004 | |||
| 1005 | if (!exception || !service) | ||
| 1006 | goto out_nomem; | ||
| 1001 | 1007 | ||
| 1002 | sense = (struct tape_3590_sense *) irb->ecw; | 1008 | sense = (struct tape_3590_sense *) irb->ecw; |
| 1003 | /* Exception Message */ | 1009 | /* Exception Message */ |
| 1004 | switch (sense->fmt.f70.emc) { | 1010 | switch (sense->fmt.f70.emc) { |
| 1005 | case 0x02: | 1011 | case 0x02: |
| 1006 | PRINT_WARN("(%s): Data degraded\n", | 1012 | snprintf(exception, BUFSIZE, "Data degraded"); |
| 1007 | dev_name(&device->cdev->dev)); | ||
| 1008 | break; | 1013 | break; |
| 1009 | case 0x03: | 1014 | case 0x03: |
| 1010 | PRINT_WARN("(%s): Data degraded in partion %i\n", | 1015 | snprintf(exception, BUFSIZE, "Data degraded in partion %i", |
| 1011 | dev_name(&device->cdev->dev), sense->fmt.f70.mp); | 1016 | sense->fmt.f70.mp); |
| 1012 | break; | 1017 | break; |
| 1013 | case 0x04: | 1018 | case 0x04: |
| 1014 | PRINT_WARN("(%s): Medium degraded\n", | 1019 | snprintf(exception, BUFSIZE, "Medium degraded"); |
| 1015 | dev_name(&device->cdev->dev)); | ||
| 1016 | break; | 1020 | break; |
| 1017 | case 0x05: | 1021 | case 0x05: |
| 1018 | PRINT_WARN("(%s): Medium degraded in partition %i\n", | 1022 | snprintf(exception, BUFSIZE, "Medium degraded in partition %i", |
| 1019 | dev_name(&device->cdev->dev), sense->fmt.f70.mp); | 1023 | sense->fmt.f70.mp); |
| 1020 | break; | 1024 | break; |
| 1021 | case 0x06: | 1025 | case 0x06: |
| 1022 | PRINT_WARN("(%s): Block 0 Error\n", | 1026 | snprintf(exception, BUFSIZE, "Block 0 Error"); |
| 1023 | dev_name(&device->cdev->dev)); | ||
| 1024 | break; | 1027 | break; |
| 1025 | case 0x07: | 1028 | case 0x07: |
| 1026 | PRINT_WARN("(%s): Medium Exception 0x%02x\n", | 1029 | snprintf(exception, BUFSIZE, "Medium Exception 0x%02x", |
| 1027 | dev_name(&device->cdev->dev), sense->fmt.f70.md); | 1030 | sense->fmt.f70.md); |
| 1028 | break; | 1031 | break; |
| 1029 | default: | 1032 | default: |
| 1030 | PRINT_WARN("(%s): MIM ExMsg: 0x%02x\n", | 1033 | snprintf(exception, BUFSIZE, "0x%02x", |
| 1031 | dev_name(&device->cdev->dev), sense->fmt.f70.emc); | 1034 | sense->fmt.f70.emc); |
| 1032 | break; | 1035 | break; |
| 1033 | } | 1036 | } |
| 1034 | /* Service Message */ | 1037 | /* Service Message */ |
| 1035 | switch (sense->fmt.f70.smc) { | 1038 | switch (sense->fmt.f70.smc) { |
| 1036 | case 0x02: | 1039 | case 0x02: |
| 1037 | PRINT_WARN("(%s): Reference Media maintenance procedure %i\n", | 1040 | snprintf(service, BUFSIZE, "Reference Media maintenance " |
| 1038 | dev_name(&device->cdev->dev), sense->fmt.f70.md); | 1041 | "procedure %i", sense->fmt.f70.md); |
| 1039 | break; | 1042 | break; |
| 1040 | default: | 1043 | default: |
| 1041 | PRINT_WARN("(%s): MIM ServiceMsg: 0x%02x\n", | 1044 | snprintf(service, BUFSIZE, "0x%02x", |
| 1042 | dev_name(&device->cdev->dev), sense->fmt.f70.smc); | 1045 | sense->fmt.f70.smc); |
| 1043 | break; | 1046 | break; |
| 1044 | } | 1047 | } |
| 1048 | |||
| 1049 | dev_warn (&device->cdev->dev, "Tape media information: exception %s, " | ||
| 1050 | "service %s\n", exception, service); | ||
| 1051 | |||
| 1052 | out_nomem: | ||
| 1053 | kfree(exception); | ||
| 1054 | kfree(service); | ||
| 1045 | } | 1055 | } |
| 1046 | 1056 | ||
| 1047 | /* | 1057 | /* |
| @@ -1051,108 +1061,108 @@ static void | |||
| 1051 | tape_3590_print_io_sim_msg_f1(struct tape_device *device, struct irb *irb) | 1061 | tape_3590_print_io_sim_msg_f1(struct tape_device *device, struct irb *irb) |
| 1052 | { | 1062 | { |
| 1053 | struct tape_3590_sense *sense; | 1063 | struct tape_3590_sense *sense; |
| 1064 | char *exception, *service; | ||
| 1065 | |||
| 1066 | exception = kmalloc(BUFSIZE, GFP_ATOMIC); | ||
| 1067 | service = kmalloc(BUFSIZE, GFP_ATOMIC); | ||
| 1068 | |||
| 1069 | if (!exception || !service) | ||
| 1070 | goto out_nomem; | ||
| 1054 | 1071 | ||
| 1055 | sense = (struct tape_3590_sense *) irb->ecw; | 1072 | sense = (struct tape_3590_sense *) irb->ecw; |
| 1056 | /* Exception Message */ | 1073 | /* Exception Message */ |
| 1057 | switch (sense->fmt.f71.emc) { | 1074 | switch (sense->fmt.f71.emc) { |
| 1058 | case 0x01: | 1075 | case 0x01: |
| 1059 | PRINT_WARN("(%s): Effect of failure is unknown\n", | 1076 | snprintf(exception, BUFSIZE, "Effect of failure is unknown"); |
| 1060 | dev_name(&device->cdev->dev)); | ||
| 1061 | break; | 1077 | break; |
| 1062 | case 0x02: | 1078 | case 0x02: |
| 1063 | PRINT_WARN("(%s): CU Exception - no performance impact\n", | 1079 | snprintf(exception, BUFSIZE, "CU Exception - no performance " |
| 1064 | dev_name(&device->cdev->dev)); | 1080 | "impact"); |
| 1065 | break; | 1081 | break; |
| 1066 | case 0x03: | 1082 | case 0x03: |
| 1067 | PRINT_WARN("(%s): CU Exception on channel interface 0x%02x\n", | 1083 | snprintf(exception, BUFSIZE, "CU Exception on channel " |
| 1068 | dev_name(&device->cdev->dev), sense->fmt.f71.md[0]); | 1084 | "interface 0x%02x", sense->fmt.f71.md[0]); |
| 1069 | break; | 1085 | break; |
| 1070 | case 0x04: | 1086 | case 0x04: |
| 1071 | PRINT_WARN("(%s): CU Exception on device path 0x%02x\n", | 1087 | snprintf(exception, BUFSIZE, "CU Exception on device path " |
| 1072 | dev_name(&device->cdev->dev), sense->fmt.f71.md[0]); | 1088 | "0x%02x", sense->fmt.f71.md[0]); |
| 1073 | break; | 1089 | break; |
| 1074 | case 0x05: | 1090 | case 0x05: |
| 1075 | PRINT_WARN("(%s): CU Exception on library path 0x%02x\n", | 1091 | snprintf(exception, BUFSIZE, "CU Exception on library path " |
| 1076 | dev_name(&device->cdev->dev), sense->fmt.f71.md[0]); | 1092 | "0x%02x", sense->fmt.f71.md[0]); |
| 1077 | break; | 1093 | break; |
| 1078 | case 0x06: | 1094 | case 0x06: |
| 1079 | PRINT_WARN("(%s): CU Exception on node 0x%02x\n", | 1095 | snprintf(exception, BUFSIZE, "CU Exception on node 0x%02x", |
| 1080 | dev_name(&device->cdev->dev), sense->fmt.f71.md[0]); | 1096 | sense->fmt.f71.md[0]); |
| 1081 | break; | 1097 | break; |
| 1082 | case 0x07: | 1098 | case 0x07: |
| 1083 | PRINT_WARN("(%s): CU Exception on partition 0x%02x\n", | 1099 | snprintf(exception, BUFSIZE, "CU Exception on partition " |
| 1084 | dev_name(&device->cdev->dev), sense->fmt.f71.md[0]); | 1100 | "0x%02x", sense->fmt.f71.md[0]); |
| 1085 | break; | 1101 | break; |
| 1086 | default: | 1102 | default: |
| 1087 | PRINT_WARN("(%s): SIM ExMsg: 0x%02x\n", | 1103 | snprintf(exception, BUFSIZE, "0x%02x", |
| 1088 | dev_name(&device->cdev->dev), sense->fmt.f71.emc); | 1104 | sense->fmt.f71.emc); |
| 1089 | } | 1105 | } |
| 1090 | /* Service Message */ | 1106 | /* Service Message */ |
| 1091 | switch (sense->fmt.f71.smc) { | 1107 | switch (sense->fmt.f71.smc) { |
| 1092 | case 0x01: | 1108 | case 0x01: |
| 1093 | PRINT_WARN("(%s): Repair impact is unknown\n", | 1109 | snprintf(service, BUFSIZE, "Repair impact is unknown"); |
| 1094 | dev_name(&device->cdev->dev)); | ||
| 1095 | break; | 1110 | break; |
| 1096 | case 0x02: | 1111 | case 0x02: |
| 1097 | PRINT_WARN("(%s): Repair will not impact cu performance\n", | 1112 | snprintf(service, BUFSIZE, "Repair will not impact cu " |
| 1098 | dev_name(&device->cdev->dev)); | 1113 | "performance"); |
| 1099 | break; | 1114 | break; |
| 1100 | case 0x03: | 1115 | case 0x03: |
| 1101 | if (sense->fmt.f71.mdf == 0) | 1116 | if (sense->fmt.f71.mdf == 0) |
| 1102 | PRINT_WARN("(%s): Repair will disable node " | 1117 | snprintf(service, BUFSIZE, "Repair will disable node " |
| 1103 | "0x%x on CU\n", | 1118 | "0x%x on CU", sense->fmt.f71.md[1]); |
| 1104 | dev_name(&device->cdev->dev), | ||
| 1105 | sense->fmt.f71.md[1]); | ||
| 1106 | else | 1119 | else |
| 1107 | PRINT_WARN("(%s): Repair will disable nodes " | 1120 | snprintf(service, BUFSIZE, "Repair will disable " |
| 1108 | "(0x%x-0x%x) on CU\n", | 1121 | "nodes (0x%x-0x%x) on CU", sense->fmt.f71.md[1], |
| 1109 | dev_name(&device->cdev->dev), | 1122 | sense->fmt.f71.md[2]); |
| 1110 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); | ||
| 1111 | break; | 1123 | break; |
| 1112 | case 0x04: | 1124 | case 0x04: |
| 1113 | if (sense->fmt.f71.mdf == 0) | 1125 | if (sense->fmt.f71.mdf == 0) |
| 1114 | PRINT_WARN("(%s): Repair will disable cannel path " | 1126 | snprintf(service, BUFSIZE, "Repair will disable " |
| 1115 | "0x%x on CU\n", | 1127 | "channel path 0x%x on CU", |
| 1116 | dev_name(&device->cdev->dev), | 1128 | sense->fmt.f71.md[1]); |
| 1117 | sense->fmt.f71.md[1]); | ||
| 1118 | else | 1129 | else |
| 1119 | PRINT_WARN("(%s): Repair will disable cannel paths " | 1130 | snprintf(service, BUFSIZE, "Repair will disable cannel" |
| 1120 | "(0x%x-0x%x) on CU\n", | 1131 | " paths (0x%x-0x%x) on CU", |
| 1121 | dev_name(&device->cdev->dev), | 1132 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); |
| 1122 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); | ||
| 1123 | break; | 1133 | break; |
| 1124 | case 0x05: | 1134 | case 0x05: |
| 1125 | if (sense->fmt.f71.mdf == 0) | 1135 | if (sense->fmt.f71.mdf == 0) |
| 1126 | PRINT_WARN("(%s): Repair will disable device path " | 1136 | snprintf(service, BUFSIZE, "Repair will disable device" |
| 1127 | "0x%x on CU\n", | 1137 | " path 0x%x on CU", sense->fmt.f71.md[1]); |
| 1128 | dev_name(&device->cdev->dev), | ||
| 1129 | sense->fmt.f71.md[1]); | ||
| 1130 | else | 1138 | else |
| 1131 | PRINT_WARN("(%s): Repair will disable device paths " | 1139 | snprintf(service, BUFSIZE, "Repair will disable device" |
| 1132 | "(0x%x-0x%x) on CU\n", | 1140 | " paths (0x%x-0x%x) on CU", |
| 1133 | dev_name(&device->cdev->dev), | 1141 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); |
| 1134 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); | ||
| 1135 | break; | 1142 | break; |
| 1136 | case 0x06: | 1143 | case 0x06: |
| 1137 | if (sense->fmt.f71.mdf == 0) | 1144 | if (sense->fmt.f71.mdf == 0) |
| 1138 | PRINT_WARN("(%s): Repair will disable library path " | 1145 | snprintf(service, BUFSIZE, "Repair will disable " |
| 1139 | "0x%x on CU\n", | 1146 | "library path 0x%x on CU", |
| 1140 | dev_name(&device->cdev->dev), | 1147 | sense->fmt.f71.md[1]); |
| 1141 | sense->fmt.f71.md[1]); | ||
| 1142 | else | 1148 | else |
| 1143 | PRINT_WARN("(%s): Repair will disable library paths " | 1149 | snprintf(service, BUFSIZE, "Repair will disable " |
| 1144 | "(0x%x-0x%x) on CU\n", | 1150 | "library paths (0x%x-0x%x) on CU", |
| 1145 | dev_name(&device->cdev->dev), | 1151 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); |
| 1146 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); | ||
| 1147 | break; | 1152 | break; |
| 1148 | case 0x07: | 1153 | case 0x07: |
| 1149 | PRINT_WARN("(%s): Repair will disable access to CU\n", | 1154 | snprintf(service, BUFSIZE, "Repair will disable access to CU"); |
| 1150 | dev_name(&device->cdev->dev)); | ||
| 1151 | break; | 1155 | break; |
| 1152 | default: | 1156 | default: |
| 1153 | PRINT_WARN("(%s): SIM ServiceMsg: 0x%02x\n", | 1157 | snprintf(service, BUFSIZE, "0x%02x", |
| 1154 | dev_name(&device->cdev->dev), sense->fmt.f71.smc); | 1158 | sense->fmt.f71.smc); |
| 1155 | } | 1159 | } |
| 1160 | |||
| 1161 | dev_warn (&device->cdev->dev, "I/O subsystem information: exception" | ||
| 1162 | " %s, service %s\n", exception, service); | ||
| 1163 | out_nomem: | ||
| 1164 | kfree(exception); | ||
| 1165 | kfree(service); | ||
| 1156 | } | 1166 | } |
| 1157 | 1167 | ||
| 1158 | /* | 1168 | /* |
| @@ -1162,111 +1172,109 @@ static void | |||
| 1162 | tape_3590_print_dev_sim_msg_f2(struct tape_device *device, struct irb *irb) | 1172 | tape_3590_print_dev_sim_msg_f2(struct tape_device *device, struct irb *irb) |
| 1163 | { | 1173 | { |
| 1164 | struct tape_3590_sense *sense; | 1174 | struct tape_3590_sense *sense; |
| 1175 | char *exception, *service; | ||
| 1176 | |||
| 1177 | exception = kmalloc(BUFSIZE, GFP_ATOMIC); | ||
| 1178 | service = kmalloc(BUFSIZE, GFP_ATOMIC); | ||
| 1179 | |||
| 1180 | if (!exception || !service) | ||
| 1181 | goto out_nomem; | ||
| 1165 | 1182 | ||
| 1166 | sense = (struct tape_3590_sense *) irb->ecw; | 1183 | sense = (struct tape_3590_sense *) irb->ecw; |
| 1167 | /* Exception Message */ | 1184 | /* Exception Message */ |
| 1168 | switch (sense->fmt.f71.emc) { | 1185 | switch (sense->fmt.f71.emc) { |
| 1169 | case 0x01: | 1186 | case 0x01: |
| 1170 | PRINT_WARN("(%s): Effect of failure is unknown\n", | 1187 | snprintf(exception, BUFSIZE, "Effect of failure is unknown"); |
| 1171 | dev_name(&device->cdev->dev)); | ||
| 1172 | break; | 1188 | break; |
| 1173 | case 0x02: | 1189 | case 0x02: |
| 1174 | PRINT_WARN("(%s): DV Exception - no performance impact\n", | 1190 | snprintf(exception, BUFSIZE, "DV Exception - no performance" |
| 1175 | dev_name(&device->cdev->dev)); | 1191 | " impact"); |
| 1176 | break; | 1192 | break; |
| 1177 | case 0x03: | 1193 | case 0x03: |
| 1178 | PRINT_WARN("(%s): DV Exception on channel interface 0x%02x\n", | 1194 | snprintf(exception, BUFSIZE, "DV Exception on channel " |
| 1179 | dev_name(&device->cdev->dev), sense->fmt.f71.md[0]); | 1195 | "interface 0x%02x", sense->fmt.f71.md[0]); |
| 1180 | break; | 1196 | break; |
| 1181 | case 0x04: | 1197 | case 0x04: |
| 1182 | PRINT_WARN("(%s): DV Exception on loader 0x%02x\n", | 1198 | snprintf(exception, BUFSIZE, "DV Exception on loader 0x%02x", |
| 1183 | dev_name(&device->cdev->dev), sense->fmt.f71.md[0]); | 1199 | sense->fmt.f71.md[0]); |
| 1184 | break; | 1200 | break; |
| 1185 | case 0x05: | 1201 | case 0x05: |
| 1186 | PRINT_WARN("(%s): DV Exception on message display 0x%02x\n", | 1202 | snprintf(exception, BUFSIZE, "DV Exception on message display" |
| 1187 | dev_name(&device->cdev->dev), sense->fmt.f71.md[0]); | 1203 | " 0x%02x", sense->fmt.f71.md[0]); |
| 1188 | break; | 1204 | break; |
| 1189 | case 0x06: | 1205 | case 0x06: |
| 1190 | PRINT_WARN("(%s): DV Exception in tape path\n", | 1206 | snprintf(exception, BUFSIZE, "DV Exception in tape path"); |
| 1191 | dev_name(&device->cdev->dev)); | ||
| 1192 | break; | 1207 | break; |
| 1193 | case 0x07: | 1208 | case 0x07: |
| 1194 | PRINT_WARN("(%s): DV Exception in drive\n", | 1209 | snprintf(exception, BUFSIZE, "DV Exception in drive"); |
| 1195 | dev_name(&device->cdev->dev)); | ||
| 1196 | break; | 1210 | break; |
| 1197 | default: | 1211 | default: |
| 1198 | PRINT_WARN("(%s): DSIM ExMsg: 0x%02x\n", | 1212 | snprintf(exception, BUFSIZE, "0x%02x", |
| 1199 | dev_name(&device->cdev->dev), sense->fmt.f71.emc); | 1213 | sense->fmt.f71.emc); |
| 1200 | } | 1214 | } |
| 1201 | /* Service Message */ | 1215 | /* Service Message */ |
| 1202 | switch (sense->fmt.f71.smc) { | 1216 | switch (sense->fmt.f71.smc) { |
| 1203 | case 0x01: | 1217 | case 0x01: |
| 1204 | PRINT_WARN("(%s): Repair impact is unknown\n", | 1218 | snprintf(service, BUFSIZE, "Repair impact is unknown"); |
| 1205 | dev_name(&device->cdev->dev)); | ||
| 1206 | break; | 1219 | break; |
| 1207 | case 0x02: | 1220 | case 0x02: |
| 1208 | PRINT_WARN("(%s): Repair will not impact device performance\n", | 1221 | snprintf(service, BUFSIZE, "Repair will not impact device " |
| 1209 | dev_name(&device->cdev->dev)); | 1222 | "performance"); |
| 1210 | break; | 1223 | break; |
| 1211 | case 0x03: | 1224 | case 0x03: |
| 1212 | if (sense->fmt.f71.mdf == 0) | 1225 | if (sense->fmt.f71.mdf == 0) |
| 1213 | PRINT_WARN("(%s): Repair will disable channel path " | 1226 | snprintf(service, BUFSIZE, "Repair will disable " |
| 1214 | "0x%x on DV\n", | 1227 | "channel path 0x%x on DV", |
| 1215 | dev_name(&device->cdev->dev), | 1228 | sense->fmt.f71.md[1]); |
| 1216 | sense->fmt.f71.md[1]); | ||
| 1217 | else | 1229 | else |
| 1218 | PRINT_WARN("(%s): Repair will disable channel path " | 1230 | snprintf(service, BUFSIZE, "Repair will disable " |
| 1219 | "(0x%x-0x%x) on DV\n", | 1231 | "channel path (0x%x-0x%x) on DV", |
| 1220 | dev_name(&device->cdev->dev), | 1232 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); |
| 1221 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); | ||
| 1222 | break; | 1233 | break; |
| 1223 | case 0x04: | 1234 | case 0x04: |
| 1224 | if (sense->fmt.f71.mdf == 0) | 1235 | if (sense->fmt.f71.mdf == 0) |
| 1225 | PRINT_WARN("(%s): Repair will disable interface 0x%x " | 1236 | snprintf(service, BUFSIZE, "Repair will disable " |
| 1226 | "on DV\n", | 1237 | "interface 0x%x on DV", sense->fmt.f71.md[1]); |
| 1227 | dev_name(&device->cdev->dev), | ||
| 1228 | sense->fmt.f71.md[1]); | ||
| 1229 | else | 1238 | else |
| 1230 | PRINT_WARN("(%s): Repair will disable interfaces " | 1239 | snprintf(service, BUFSIZE, "Repair will disable " |
| 1231 | "(0x%x-0x%x) on DV\n", | 1240 | "interfaces (0x%x-0x%x) on DV", |
| 1232 | dev_name(&device->cdev->dev), | 1241 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); |
| 1233 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); | ||
| 1234 | break; | 1242 | break; |
| 1235 | case 0x05: | 1243 | case 0x05: |
| 1236 | if (sense->fmt.f71.mdf == 0) | 1244 | if (sense->fmt.f71.mdf == 0) |
| 1237 | PRINT_WARN("(%s): Repair will disable loader 0x%x " | 1245 | snprintf(service, BUFSIZE, "Repair will disable loader" |
| 1238 | "on DV\n", | 1246 | " 0x%x on DV", sense->fmt.f71.md[1]); |
| 1239 | dev_name(&device->cdev->dev), | ||
| 1240 | sense->fmt.f71.md[1]); | ||
| 1241 | else | 1247 | else |
| 1242 | PRINT_WARN("(%s): Repair will disable loader " | 1248 | snprintf(service, BUFSIZE, "Repair will disable loader" |
| 1243 | "(0x%x-0x%x) on DV\n", | 1249 | " (0x%x-0x%x) on DV", |
| 1244 | dev_name(&device->cdev->dev), | 1250 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); |
| 1245 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); | ||
| 1246 | break; | 1251 | break; |
| 1247 | case 0x07: | 1252 | case 0x07: |
| 1248 | PRINT_WARN("(%s): Repair will disable access to DV\n", | 1253 | snprintf(service, BUFSIZE, "Repair will disable access to DV"); |
| 1249 | dev_name(&device->cdev->dev)); | ||
| 1250 | break; | 1254 | break; |
| 1251 | case 0x08: | 1255 | case 0x08: |
| 1252 | if (sense->fmt.f71.mdf == 0) | 1256 | if (sense->fmt.f71.mdf == 0) |
| 1253 | PRINT_WARN("(%s): Repair will disable message " | 1257 | snprintf(service, BUFSIZE, "Repair will disable " |
| 1254 | "display 0x%x on DV\n", | 1258 | "message display 0x%x on DV", |
| 1255 | dev_name(&device->cdev->dev), | 1259 | sense->fmt.f71.md[1]); |
| 1256 | sense->fmt.f71.md[1]); | ||
| 1257 | else | 1260 | else |
| 1258 | PRINT_WARN("(%s): Repair will disable message " | 1261 | snprintf(service, BUFSIZE, "Repair will disable " |
| 1259 | "displays (0x%x-0x%x) on DV\n", | 1262 | "message displays (0x%x-0x%x) on DV", |
| 1260 | dev_name(&device->cdev->dev), | 1263 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); |
| 1261 | sense->fmt.f71.md[1], sense->fmt.f71.md[2]); | ||
| 1262 | break; | 1264 | break; |
| 1263 | case 0x09: | 1265 | case 0x09: |
| 1264 | PRINT_WARN("(%s): Clean DV\n", dev_name(&device->cdev->dev)); | 1266 | snprintf(service, BUFSIZE, "Clean DV"); |
| 1265 | break; | 1267 | break; |
| 1266 | default: | 1268 | default: |
| 1267 | PRINT_WARN("(%s): DSIM ServiceMsg: 0x%02x\n", | 1269 | snprintf(service, BUFSIZE, "0x%02x", |
| 1268 | dev_name(&device->cdev->dev), sense->fmt.f71.smc); | 1270 | sense->fmt.f71.smc); |
| 1269 | } | 1271 | } |
| 1272 | |||
| 1273 | dev_warn (&device->cdev->dev, "Device subsystem information: exception" | ||
| 1274 | " %s, service %s\n", exception, service); | ||
| 1275 | out_nomem: | ||
| 1276 | kfree(exception); | ||
| 1277 | kfree(service); | ||
| 1270 | } | 1278 | } |
| 1271 | 1279 | ||
| 1272 | /* | 1280 | /* |
| @@ -1282,46 +1290,44 @@ tape_3590_print_era_msg(struct tape_device *device, struct irb *irb) | |||
| 1282 | return; | 1290 | return; |
| 1283 | if ((sense->mc > 0) && (sense->mc < TAPE_3590_MAX_MSG)) { | 1291 | if ((sense->mc > 0) && (sense->mc < TAPE_3590_MAX_MSG)) { |
| 1284 | if (tape_3590_msg[sense->mc] != NULL) | 1292 | if (tape_3590_msg[sense->mc] != NULL) |
| 1285 | PRINT_WARN("(%s): %s\n", dev_name(&device->cdev->dev), | 1293 | dev_warn (&device->cdev->dev, "The tape unit has " |
| 1286 | tape_3590_msg[sense->mc]); | 1294 | "issued sense message %s\n", |
| 1287 | else { | 1295 | tape_3590_msg[sense->mc]); |
| 1288 | PRINT_WARN("(%s): Message Code 0x%x\n", | 1296 | else |
| 1289 | dev_name(&device->cdev->dev), sense->mc); | 1297 | dev_warn (&device->cdev->dev, "The tape unit has " |
| 1290 | } | 1298 | "issued an unknown sense message code 0x%x\n", |
| 1299 | sense->mc); | ||
| 1291 | return; | 1300 | return; |
| 1292 | } | 1301 | } |
| 1293 | if (sense->mc == 0xf0) { | 1302 | if (sense->mc == 0xf0) { |
| 1294 | /* Standard Media Information Message */ | 1303 | /* Standard Media Information Message */ |
| 1295 | PRINT_WARN("(%s): MIM SEV=%i, MC=%02x, ES=%x/%x, " | 1304 | dev_warn (&device->cdev->dev, "MIM SEV=%i, MC=%02x, ES=%x/%x, " |
| 1296 | "RC=%02x-%04x-%02x\n", dev_name(&device->cdev->dev), | 1305 | "RC=%02x-%04x-%02x\n", sense->fmt.f70.sev, sense->mc, |
| 1297 | sense->fmt.f70.sev, sense->mc, | 1306 | sense->fmt.f70.emc, sense->fmt.f70.smc, |
| 1298 | sense->fmt.f70.emc, sense->fmt.f70.smc, | 1307 | sense->fmt.f70.refcode, sense->fmt.f70.mid, |
| 1299 | sense->fmt.f70.refcode, sense->fmt.f70.mid, | 1308 | sense->fmt.f70.fid); |
| 1300 | sense->fmt.f70.fid); | ||
| 1301 | tape_3590_print_mim_msg_f0(device, irb); | 1309 | tape_3590_print_mim_msg_f0(device, irb); |
| 1302 | return; | 1310 | return; |
| 1303 | } | 1311 | } |
| 1304 | if (sense->mc == 0xf1) { | 1312 | if (sense->mc == 0xf1) { |
| 1305 | /* Standard I/O Subsystem Service Information Message */ | 1313 | /* Standard I/O Subsystem Service Information Message */ |
| 1306 | PRINT_WARN("(%s): IOSIM SEV=%i, DEVTYPE=3590/%02x, " | 1314 | dev_warn (&device->cdev->dev, "IOSIM SEV=%i, DEVTYPE=3590/%02x," |
| 1307 | "MC=%02x, ES=%x/%x, REF=0x%04x-0x%04x-0x%04x\n", | 1315 | " MC=%02x, ES=%x/%x, REF=0x%04x-0x%04x-0x%04x\n", |
| 1308 | dev_name(&device->cdev->dev), sense->fmt.f71.sev, | 1316 | sense->fmt.f71.sev, device->cdev->id.dev_model, |
| 1309 | device->cdev->id.dev_model, | 1317 | sense->mc, sense->fmt.f71.emc, sense->fmt.f71.smc, |
| 1310 | sense->mc, sense->fmt.f71.emc, | 1318 | sense->fmt.f71.refcode1, sense->fmt.f71.refcode2, |
| 1311 | sense->fmt.f71.smc, sense->fmt.f71.refcode1, | 1319 | sense->fmt.f71.refcode3); |
| 1312 | sense->fmt.f71.refcode2, sense->fmt.f71.refcode3); | ||
| 1313 | tape_3590_print_io_sim_msg_f1(device, irb); | 1320 | tape_3590_print_io_sim_msg_f1(device, irb); |
| 1314 | return; | 1321 | return; |
| 1315 | } | 1322 | } |
| 1316 | if (sense->mc == 0xf2) { | 1323 | if (sense->mc == 0xf2) { |
| 1317 | /* Standard Device Service Information Message */ | 1324 | /* Standard Device Service Information Message */ |
| 1318 | PRINT_WARN("(%s): DEVSIM SEV=%i, DEVTYPE=3590/%02x, " | 1325 | dev_warn (&device->cdev->dev, "DEVSIM SEV=%i, DEVTYPE=3590/%02x" |
| 1319 | "MC=%02x, ES=%x/%x, REF=0x%04x-0x%04x-0x%04x\n", | 1326 | ", MC=%02x, ES=%x/%x, REF=0x%04x-0x%04x-0x%04x\n", |
| 1320 | dev_name(&device->cdev->dev), sense->fmt.f71.sev, | 1327 | sense->fmt.f71.sev, device->cdev->id.dev_model, |
| 1321 | device->cdev->id.dev_model, | 1328 | sense->mc, sense->fmt.f71.emc, sense->fmt.f71.smc, |
| 1322 | sense->mc, sense->fmt.f71.emc, | 1329 | sense->fmt.f71.refcode1, sense->fmt.f71.refcode2, |
| 1323 | sense->fmt.f71.smc, sense->fmt.f71.refcode1, | 1330 | sense->fmt.f71.refcode3); |
| 1324 | sense->fmt.f71.refcode2, sense->fmt.f71.refcode3); | ||
| 1325 | tape_3590_print_dev_sim_msg_f2(device, irb); | 1331 | tape_3590_print_dev_sim_msg_f2(device, irb); |
| 1326 | return; | 1332 | return; |
| 1327 | } | 1333 | } |
| @@ -1329,8 +1335,8 @@ tape_3590_print_era_msg(struct tape_device *device, struct irb *irb) | |||
| 1329 | /* Standard Library Service Information Message */ | 1335 | /* Standard Library Service Information Message */ |
| 1330 | return; | 1336 | return; |
| 1331 | } | 1337 | } |
| 1332 | PRINT_WARN("(%s): Device Message(%x)\n", | 1338 | dev_warn (&device->cdev->dev, "The tape unit has issued an unknown " |
| 1333 | dev_name(&device->cdev->dev), sense->mc); | 1339 | "sense message code %x\n", sense->mc); |
| 1334 | } | 1340 | } |
| 1335 | 1341 | ||
| 1336 | static int tape_3590_crypt_error(struct tape_device *device, | 1342 | static int tape_3590_crypt_error(struct tape_device *device, |
| @@ -1355,9 +1361,8 @@ static int tape_3590_crypt_error(struct tape_device *device, | |||
| 1355 | /* No connection to EKM */ | 1361 | /* No connection to EKM */ |
| 1356 | return tape_3590_erp_basic(device, request, irb, -ENOTCONN); | 1362 | return tape_3590_erp_basic(device, request, irb, -ENOTCONN); |
| 1357 | 1363 | ||
| 1358 | PRINT_ERR("(%s): Unable to get encryption key from EKM\n", bus_id); | 1364 | dev_err (&device->cdev->dev, "The tape unit failed to obtain the " |
| 1359 | PRINT_ERR("(%s): CU=%02X DRIVE=%06X EKM=%02X:%04X\n", bus_id, cu_rc, | 1365 | "encryption key from EKM\n"); |
| 1360 | drv_rc, ekm_rc1, ekm_rc2); | ||
| 1361 | 1366 | ||
| 1362 | return tape_3590_erp_basic(device, request, irb, -ENOKEY); | 1367 | return tape_3590_erp_basic(device, request, irb, -ENOKEY); |
| 1363 | } | 1368 | } |
| @@ -1443,8 +1448,6 @@ tape_3590_unit_check(struct tape_device *device, struct tape_request *request, | |||
| 1443 | * print additional msg since default msg | 1448 | * print additional msg since default msg |
| 1444 | * "device intervention" is not very meaningfull | 1449 | * "device intervention" is not very meaningfull |
| 1445 | */ | 1450 | */ |
| 1446 | PRINT_WARN("(%s): Tape operation when medium not loaded\n", | ||
| 1447 | dev_name(&device->cdev->dev)); | ||
| 1448 | tape_med_state_set(device, MS_UNLOADED); | 1451 | tape_med_state_set(device, MS_UNLOADED); |
| 1449 | tape_3590_schedule_work(device, TO_CRYPT_OFF); | 1452 | tape_3590_schedule_work(device, TO_CRYPT_OFF); |
| 1450 | return tape_3590_erp_basic(device, request, irb, -ENOMEDIUM); | 1453 | return tape_3590_erp_basic(device, request, irb, -ENOMEDIUM); |
| @@ -1490,19 +1493,13 @@ tape_3590_unit_check(struct tape_device *device, struct tape_request *request, | |||
| 1490 | return tape_3590_erp_basic(device, request, irb, -ENOMEDIUM); | 1493 | return tape_3590_erp_basic(device, request, irb, -ENOMEDIUM); |
| 1491 | 1494 | ||
| 1492 | case 0x6020: | 1495 | case 0x6020: |
| 1493 | PRINT_WARN("(%s): Cartridge of wrong type ?\n", | ||
| 1494 | dev_name(&device->cdev->dev)); | ||
| 1495 | return tape_3590_erp_basic(device, request, irb, -EMEDIUMTYPE); | 1496 | return tape_3590_erp_basic(device, request, irb, -EMEDIUMTYPE); |
| 1496 | 1497 | ||
| 1497 | case 0x8011: | 1498 | case 0x8011: |
| 1498 | PRINT_WARN("(%s): Another host has reserved the tape device\n", | ||
| 1499 | dev_name(&device->cdev->dev)); | ||
| 1500 | return tape_3590_erp_basic(device, request, irb, -EPERM); | 1499 | return tape_3590_erp_basic(device, request, irb, -EPERM); |
| 1501 | case 0x8013: | 1500 | case 0x8013: |
| 1502 | PRINT_WARN("(%s): Another host has privileged access to the " | 1501 | dev_warn (&device->cdev->dev, "A different host has privileged" |
| 1503 | "tape device\n", dev_name(&device->cdev->dev)); | 1502 | " access to the tape unit\n"); |
| 1504 | PRINT_WARN("(%s): To solve the problem unload the current " | ||
| 1505 | "cartridge!\n", dev_name(&device->cdev->dev)); | ||
| 1506 | return tape_3590_erp_basic(device, request, irb, -EPERM); | 1503 | return tape_3590_erp_basic(device, request, irb, -EPERM); |
| 1507 | default: | 1504 | default: |
| 1508 | return tape_3590_erp_basic(device, request, irb, -EIO); | 1505 | return tape_3590_erp_basic(device, request, irb, -EIO); |
| @@ -1552,9 +1549,7 @@ tape_3590_irq(struct tape_device *device, struct tape_request *request, | |||
| 1552 | } | 1549 | } |
| 1553 | 1550 | ||
| 1554 | DBF_EVENT(6, "xunknownirq\n"); | 1551 | DBF_EVENT(6, "xunknownirq\n"); |
| 1555 | PRINT_ERR("Unexpected interrupt.\n"); | 1552 | tape_dump_sense_dbf(device, request, irb); |
| 1556 | PRINT_ERR("Current op is: %s", tape_op_verbose[request->op]); | ||
| 1557 | tape_dump_sense(device, request, irb); | ||
| 1558 | return TAPE_IO_STOP; | 1553 | return TAPE_IO_STOP; |
| 1559 | } | 1554 | } |
| 1560 | 1555 | ||
| @@ -1609,7 +1604,6 @@ tape_3590_setup_device(struct tape_device *device) | |||
| 1609 | if (rc) | 1604 | if (rc) |
| 1610 | goto fail_rdc_data; | 1605 | goto fail_rdc_data; |
| 1611 | if (rdc_data->data[31] == 0x13) { | 1606 | if (rdc_data->data[31] == 0x13) { |
| 1612 | PRINT_INFO("Device has crypto support\n"); | ||
| 1613 | data->crypt_info.capability |= TAPE390_CRYPT_SUPPORTED_MASK; | 1607 | data->crypt_info.capability |= TAPE390_CRYPT_SUPPORTED_MASK; |
| 1614 | tape_3592_disable_crypt(device); | 1608 | tape_3592_disable_crypt(device); |
| 1615 | } else { | 1609 | } else { |
diff --git a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c index ae18baf59f06..f32e89e7c4f2 100644 --- a/drivers/s390/char/tape_block.c +++ b/drivers/s390/char/tape_block.c | |||
| @@ -10,6 +10,8 @@ | |||
| 10 | * Stefan Bader <shbader@de.ibm.com> | 10 | * Stefan Bader <shbader@de.ibm.com> |
| 11 | */ | 11 | */ |
| 12 | 12 | ||
| 13 | #define KMSG_COMPONENT "tape" | ||
| 14 | |||
| 13 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
| 14 | #include <linux/module.h> | 16 | #include <linux/module.h> |
| 15 | #include <linux/blkdev.h> | 17 | #include <linux/blkdev.h> |
| @@ -23,8 +25,6 @@ | |||
| 23 | 25 | ||
| 24 | #include "tape.h" | 26 | #include "tape.h" |
| 25 | 27 | ||
| 26 | #define PRINTK_HEADER "TAPE_BLOCK: " | ||
| 27 | |||
| 28 | #define TAPEBLOCK_MAX_SEC 100 | 28 | #define TAPEBLOCK_MAX_SEC 100 |
| 29 | #define TAPEBLOCK_MIN_REQUEUE 3 | 29 | #define TAPEBLOCK_MIN_REQUEUE 3 |
| 30 | 30 | ||
| @@ -279,8 +279,6 @@ tapeblock_cleanup_device(struct tape_device *device) | |||
| 279 | tape_put_device(device); | 279 | tape_put_device(device); |
| 280 | 280 | ||
| 281 | if (!device->blk_data.disk) { | 281 | if (!device->blk_data.disk) { |
| 282 | PRINT_ERR("(%s): No gendisk to clean up!\n", | ||
| 283 | dev_name(&device->cdev->dev)); | ||
| 284 | goto cleanup_queue; | 282 | goto cleanup_queue; |
| 285 | } | 283 | } |
| 286 | 284 | ||
| @@ -314,7 +312,8 @@ tapeblock_revalidate_disk(struct gendisk *disk) | |||
| 314 | if (!device->blk_data.medium_changed) | 312 | if (!device->blk_data.medium_changed) |
| 315 | return 0; | 313 | return 0; |
| 316 | 314 | ||
| 317 | PRINT_INFO("Detecting media size...\n"); | 315 | dev_info(&device->cdev->dev, "Determining the size of the recorded " |
| 316 | "area...\n"); | ||
| 318 | rc = tape_mtop(device, MTFSFM, 1); | 317 | rc = tape_mtop(device, MTFSFM, 1); |
| 319 | if (rc) | 318 | if (rc) |
| 320 | return rc; | 319 | return rc; |
| @@ -341,7 +340,8 @@ tapeblock_revalidate_disk(struct gendisk *disk) | |||
| 341 | device->bof = rc; | 340 | device->bof = rc; |
| 342 | nr_of_blks -= rc; | 341 | nr_of_blks -= rc; |
| 343 | 342 | ||
| 344 | PRINT_INFO("Found %i blocks on media\n", nr_of_blks); | 343 | dev_info(&device->cdev->dev, "The size of the recorded area is %i " |
| 344 | "blocks\n", nr_of_blks); | ||
| 345 | set_capacity(device->blk_data.disk, | 345 | set_capacity(device->blk_data.disk, |
| 346 | nr_of_blks*(TAPEBLOCK_HSEC_SIZE/512)); | 346 | nr_of_blks*(TAPEBLOCK_HSEC_SIZE/512)); |
| 347 | 347 | ||
| @@ -376,8 +376,8 @@ tapeblock_open(struct block_device *bdev, fmode_t mode) | |||
| 376 | 376 | ||
| 377 | if (device->required_tapemarks) { | 377 | if (device->required_tapemarks) { |
| 378 | DBF_EVENT(2, "TBLOCK: missing tapemarks\n"); | 378 | DBF_EVENT(2, "TBLOCK: missing tapemarks\n"); |
| 379 | PRINT_ERR("TBLOCK: Refusing to open tape with missing" | 379 | dev_warn(&device->cdev->dev, "Opening the tape failed because" |
| 380 | " end of file marks.\n"); | 380 | " of missing end-of-file marks\n"); |
| 381 | rc = -EPERM; | 381 | rc = -EPERM; |
| 382 | goto put_device; | 382 | goto put_device; |
| 383 | } | 383 | } |
| @@ -452,7 +452,6 @@ tapeblock_ioctl( | |||
| 452 | rc = -EINVAL; | 452 | rc = -EINVAL; |
| 453 | break; | 453 | break; |
| 454 | default: | 454 | default: |
| 455 | PRINT_WARN("invalid ioctl 0x%x\n", command); | ||
| 456 | rc = -EINVAL; | 455 | rc = -EINVAL; |
| 457 | } | 456 | } |
| 458 | 457 | ||
| @@ -474,7 +473,6 @@ tapeblock_init(void) | |||
| 474 | 473 | ||
| 475 | if (tapeblock_major == 0) | 474 | if (tapeblock_major == 0) |
| 476 | tapeblock_major = rc; | 475 | tapeblock_major = rc; |
| 477 | PRINT_INFO("tape gets major %d for block device\n", tapeblock_major); | ||
| 478 | return 0; | 476 | return 0; |
| 479 | } | 477 | } |
| 480 | 478 | ||
diff --git a/drivers/s390/char/tape_char.c b/drivers/s390/char/tape_char.c index be0ce2215c8d..31566c55adfe 100644 --- a/drivers/s390/char/tape_char.c +++ b/drivers/s390/char/tape_char.c | |||
| @@ -24,8 +24,6 @@ | |||
| 24 | #include "tape_std.h" | 24 | #include "tape_std.h" |
| 25 | #include "tape_class.h" | 25 | #include "tape_class.h" |
| 26 | 26 | ||
| 27 | #define PRINTK_HEADER "TAPE_CHAR: " | ||
| 28 | |||
| 29 | #define TAPECHAR_MAJOR 0 /* get dynamic major */ | 27 | #define TAPECHAR_MAJOR 0 /* get dynamic major */ |
| 30 | 28 | ||
| 31 | /* | 29 | /* |
| @@ -102,8 +100,6 @@ tapechar_check_idalbuffer(struct tape_device *device, size_t block_size) | |||
| 102 | if (block_size > MAX_BLOCKSIZE) { | 100 | if (block_size > MAX_BLOCKSIZE) { |
| 103 | DBF_EVENT(3, "Invalid blocksize (%zd > %d)\n", | 101 | DBF_EVENT(3, "Invalid blocksize (%zd > %d)\n", |
| 104 | block_size, MAX_BLOCKSIZE); | 102 | block_size, MAX_BLOCKSIZE); |
| 105 | PRINT_ERR("Invalid blocksize (%zd> %d)\n", | ||
| 106 | block_size, MAX_BLOCKSIZE); | ||
| 107 | return -EINVAL; | 103 | return -EINVAL; |
| 108 | } | 104 | } |
| 109 | 105 | ||
| @@ -485,7 +481,6 @@ tapechar_init (void) | |||
| 485 | return -1; | 481 | return -1; |
| 486 | 482 | ||
| 487 | tapechar_major = MAJOR(dev); | 483 | tapechar_major = MAJOR(dev); |
| 488 | PRINT_INFO("tape gets major %d for character devices\n", MAJOR(dev)); | ||
| 489 | 484 | ||
| 490 | return 0; | 485 | return 0; |
| 491 | } | 486 | } |
| @@ -496,7 +491,5 @@ tapechar_init (void) | |||
| 496 | void | 491 | void |
| 497 | tapechar_exit(void) | 492 | tapechar_exit(void) |
| 498 | { | 493 | { |
| 499 | PRINT_INFO("tape releases major %d for character devices\n", | ||
| 500 | tapechar_major); | ||
| 501 | unregister_chrdev_region(MKDEV(tapechar_major, 0), 256); | 494 | unregister_chrdev_region(MKDEV(tapechar_major, 0), 256); |
| 502 | } | 495 | } |
diff --git a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c index f9bb51fa7f5b..1b6a24412465 100644 --- a/drivers/s390/char/tape_core.c +++ b/drivers/s390/char/tape_core.c | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | * Stefan Bader <shbader@de.ibm.com> | 11 | * Stefan Bader <shbader@de.ibm.com> |
| 12 | */ | 12 | */ |
| 13 | 13 | ||
| 14 | #define KMSG_COMPONENT "tape" | ||
| 14 | #include <linux/module.h> | 15 | #include <linux/module.h> |
| 15 | #include <linux/init.h> // for kernel parameters | 16 | #include <linux/init.h> // for kernel parameters |
| 16 | #include <linux/kmod.h> // for requesting modules | 17 | #include <linux/kmod.h> // for requesting modules |
| @@ -25,7 +26,6 @@ | |||
| 25 | #include "tape.h" | 26 | #include "tape.h" |
| 26 | #include "tape_std.h" | 27 | #include "tape_std.h" |
| 27 | 28 | ||
| 28 | #define PRINTK_HEADER "TAPE_CORE: " | ||
| 29 | #define LONG_BUSY_TIMEOUT 180 /* seconds */ | 29 | #define LONG_BUSY_TIMEOUT 180 /* seconds */ |
| 30 | 30 | ||
| 31 | static void __tape_do_irq (struct ccw_device *, unsigned long, struct irb *); | 31 | static void __tape_do_irq (struct ccw_device *, unsigned long, struct irb *); |
| @@ -214,13 +214,13 @@ tape_med_state_set(struct tape_device *device, enum tape_medium_state newstate) | |||
| 214 | switch(newstate){ | 214 | switch(newstate){ |
| 215 | case MS_UNLOADED: | 215 | case MS_UNLOADED: |
| 216 | device->tape_generic_status |= GMT_DR_OPEN(~0); | 216 | device->tape_generic_status |= GMT_DR_OPEN(~0); |
| 217 | PRINT_INFO("(%s): Tape is unloaded\n", | 217 | dev_info(&device->cdev->dev, "The tape cartridge has been " |
| 218 | dev_name(&device->cdev->dev)); | 218 | "successfully unloaded\n"); |
| 219 | break; | 219 | break; |
| 220 | case MS_LOADED: | 220 | case MS_LOADED: |
| 221 | device->tape_generic_status &= ~GMT_DR_OPEN(~0); | 221 | device->tape_generic_status &= ~GMT_DR_OPEN(~0); |
| 222 | PRINT_INFO("(%s): Tape has been mounted\n", | 222 | dev_info(&device->cdev->dev, "A tape cartridge has been " |
| 223 | dev_name(&device->cdev->dev)); | 223 | "mounted\n"); |
| 224 | break; | 224 | break; |
| 225 | default: | 225 | default: |
| 226 | // print nothing | 226 | // print nothing |
| @@ -333,7 +333,6 @@ tape_generic_online(struct tape_device *device, | |||
| 333 | /* Let the discipline have a go at the device. */ | 333 | /* Let the discipline have a go at the device. */ |
| 334 | device->discipline = discipline; | 334 | device->discipline = discipline; |
| 335 | if (!try_module_get(discipline->owner)) { | 335 | if (!try_module_get(discipline->owner)) { |
| 336 | PRINT_ERR("Cannot get module. Module gone.\n"); | ||
| 337 | return -EINVAL; | 336 | return -EINVAL; |
| 338 | } | 337 | } |
| 339 | 338 | ||
| @@ -391,7 +390,6 @@ int | |||
| 391 | tape_generic_offline(struct tape_device *device) | 390 | tape_generic_offline(struct tape_device *device) |
| 392 | { | 391 | { |
| 393 | if (!device) { | 392 | if (!device) { |
| 394 | PRINT_ERR("tape_generic_offline: no such device\n"); | ||
| 395 | return -ENODEV; | 393 | return -ENODEV; |
| 396 | } | 394 | } |
| 397 | 395 | ||
| @@ -413,9 +411,6 @@ tape_generic_offline(struct tape_device *device) | |||
| 413 | DBF_EVENT(3, "(%08x): Set offline failed " | 411 | DBF_EVENT(3, "(%08x): Set offline failed " |
| 414 | "- drive in use.\n", | 412 | "- drive in use.\n", |
| 415 | device->cdev_id); | 413 | device->cdev_id); |
| 416 | PRINT_WARN("(%s): Set offline failed " | ||
| 417 | "- drive in use.\n", | ||
| 418 | dev_name(&device->cdev->dev)); | ||
| 419 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); | 414 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); |
| 420 | return -EBUSY; | 415 | return -EBUSY; |
| 421 | } | 416 | } |
| @@ -435,14 +430,11 @@ tape_alloc_device(void) | |||
| 435 | device = kzalloc(sizeof(struct tape_device), GFP_KERNEL); | 430 | device = kzalloc(sizeof(struct tape_device), GFP_KERNEL); |
| 436 | if (device == NULL) { | 431 | if (device == NULL) { |
| 437 | DBF_EXCEPTION(2, "ti:no mem\n"); | 432 | DBF_EXCEPTION(2, "ti:no mem\n"); |
| 438 | PRINT_INFO ("can't allocate memory for " | ||
| 439 | "tape info structure\n"); | ||
| 440 | return ERR_PTR(-ENOMEM); | 433 | return ERR_PTR(-ENOMEM); |
| 441 | } | 434 | } |
| 442 | device->modeset_byte = kmalloc(1, GFP_KERNEL | GFP_DMA); | 435 | device->modeset_byte = kmalloc(1, GFP_KERNEL | GFP_DMA); |
| 443 | if (device->modeset_byte == NULL) { | 436 | if (device->modeset_byte == NULL) { |
| 444 | DBF_EXCEPTION(2, "ti:no mem\n"); | 437 | DBF_EXCEPTION(2, "ti:no mem\n"); |
| 445 | PRINT_INFO("can't allocate memory for modeset byte\n"); | ||
| 446 | kfree(device); | 438 | kfree(device); |
| 447 | return ERR_PTR(-ENOMEM); | 439 | return ERR_PTR(-ENOMEM); |
| 448 | } | 440 | } |
| @@ -490,7 +482,6 @@ tape_put_device(struct tape_device *device) | |||
| 490 | } else { | 482 | } else { |
| 491 | if (remain < 0) { | 483 | if (remain < 0) { |
| 492 | DBF_EVENT(4, "put device without reference\n"); | 484 | DBF_EVENT(4, "put device without reference\n"); |
| 493 | PRINT_ERR("put device without reference\n"); | ||
| 494 | } else { | 485 | } else { |
| 495 | DBF_EVENT(4, "tape_free_device(%p)\n", device); | 486 | DBF_EVENT(4, "tape_free_device(%p)\n", device); |
| 496 | kfree(device->modeset_byte); | 487 | kfree(device->modeset_byte); |
| @@ -538,8 +529,6 @@ tape_generic_probe(struct ccw_device *cdev) | |||
| 538 | ret = sysfs_create_group(&cdev->dev.kobj, &tape_attr_group); | 529 | ret = sysfs_create_group(&cdev->dev.kobj, &tape_attr_group); |
| 539 | if (ret) { | 530 | if (ret) { |
| 540 | tape_put_device(device); | 531 | tape_put_device(device); |
| 541 | PRINT_ERR("probe failed for tape device %s\n", | ||
| 542 | dev_name(&cdev->dev)); | ||
| 543 | return ret; | 532 | return ret; |
| 544 | } | 533 | } |
| 545 | cdev->dev.driver_data = device; | 534 | cdev->dev.driver_data = device; |
| @@ -547,7 +536,6 @@ tape_generic_probe(struct ccw_device *cdev) | |||
| 547 | device->cdev = cdev; | 536 | device->cdev = cdev; |
| 548 | ccw_device_get_id(cdev, &dev_id); | 537 | ccw_device_get_id(cdev, &dev_id); |
| 549 | device->cdev_id = devid_to_int(&dev_id); | 538 | device->cdev_id = devid_to_int(&dev_id); |
| 550 | PRINT_INFO("tape device %s found\n", dev_name(&cdev->dev)); | ||
| 551 | return ret; | 539 | return ret; |
| 552 | } | 540 | } |
| 553 | 541 | ||
| @@ -584,7 +572,6 @@ tape_generic_remove(struct ccw_device *cdev) | |||
| 584 | 572 | ||
| 585 | device = cdev->dev.driver_data; | 573 | device = cdev->dev.driver_data; |
| 586 | if (!device) { | 574 | if (!device) { |
| 587 | PRINT_ERR("No device pointer in tape_generic_remove!\n"); | ||
| 588 | return; | 575 | return; |
| 589 | } | 576 | } |
| 590 | DBF_LH(3, "(%08x): tape_generic_remove(%p)\n", device->cdev_id, cdev); | 577 | DBF_LH(3, "(%08x): tape_generic_remove(%p)\n", device->cdev_id, cdev); |
| @@ -615,10 +602,8 @@ tape_generic_remove(struct ccw_device *cdev) | |||
| 615 | */ | 602 | */ |
| 616 | DBF_EVENT(3, "(%08x): Drive in use vanished!\n", | 603 | DBF_EVENT(3, "(%08x): Drive in use vanished!\n", |
| 617 | device->cdev_id); | 604 | device->cdev_id); |
| 618 | PRINT_WARN("(%s): Drive in use vanished - " | 605 | dev_warn(&device->cdev->dev, "A tape unit was detached" |
| 619 | "expect trouble!\n", | 606 | " while in use\n"); |
| 620 | dev_name(&device->cdev->dev)); | ||
| 621 | PRINT_WARN("State was %i\n", device->tape_state); | ||
| 622 | tape_state_set(device, TS_NOT_OPER); | 607 | tape_state_set(device, TS_NOT_OPER); |
| 623 | __tape_discard_requests(device); | 608 | __tape_discard_requests(device); |
| 624 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); | 609 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); |
| @@ -830,30 +815,6 @@ __tape_end_request( | |||
| 830 | } | 815 | } |
| 831 | 816 | ||
| 832 | /* | 817 | /* |
| 833 | * Write sense data to console/dbf | ||
| 834 | */ | ||
| 835 | void | ||
| 836 | tape_dump_sense(struct tape_device* device, struct tape_request *request, | ||
| 837 | struct irb *irb) | ||
| 838 | { | ||
| 839 | unsigned int *sptr; | ||
| 840 | |||
| 841 | PRINT_INFO("-------------------------------------------------\n"); | ||
| 842 | PRINT_INFO("DSTAT : %02x CSTAT: %02x CPA: %04x\n", | ||
| 843 | irb->scsw.cmd.dstat, irb->scsw.cmd.cstat, irb->scsw.cmd.cpa); | ||
| 844 | PRINT_INFO("DEVICE: %s\n", dev_name(&device->cdev->dev)); | ||
| 845 | if (request != NULL) | ||
| 846 | PRINT_INFO("OP : %s\n", tape_op_verbose[request->op]); | ||
| 847 | |||
| 848 | sptr = (unsigned int *) irb->ecw; | ||
| 849 | PRINT_INFO("Sense data: %08X %08X %08X %08X \n", | ||
| 850 | sptr[0], sptr[1], sptr[2], sptr[3]); | ||
| 851 | PRINT_INFO("Sense data: %08X %08X %08X %08X \n", | ||
| 852 | sptr[4], sptr[5], sptr[6], sptr[7]); | ||
| 853 | PRINT_INFO("--------------------------------------------------\n"); | ||
| 854 | } | ||
| 855 | |||
| 856 | /* | ||
| 857 | * Write sense data to dbf | 818 | * Write sense data to dbf |
| 858 | */ | 819 | */ |
| 859 | void | 820 | void |
| @@ -1051,8 +1012,6 @@ __tape_do_irq (struct ccw_device *cdev, unsigned long intparm, struct irb *irb) | |||
| 1051 | 1012 | ||
| 1052 | device = (struct tape_device *) cdev->dev.driver_data; | 1013 | device = (struct tape_device *) cdev->dev.driver_data; |
| 1053 | if (device == NULL) { | 1014 | if (device == NULL) { |
| 1054 | PRINT_ERR("could not get device structure for %s " | ||
| 1055 | "in interrupt\n", dev_name(&cdev->dev)); | ||
| 1056 | return; | 1015 | return; |
| 1057 | } | 1016 | } |
| 1058 | request = (struct tape_request *) intparm; | 1017 | request = (struct tape_request *) intparm; |
| @@ -1064,13 +1023,13 @@ __tape_do_irq (struct ccw_device *cdev, unsigned long intparm, struct irb *irb) | |||
| 1064 | /* FIXME: What to do with the request? */ | 1023 | /* FIXME: What to do with the request? */ |
| 1065 | switch (PTR_ERR(irb)) { | 1024 | switch (PTR_ERR(irb)) { |
| 1066 | case -ETIMEDOUT: | 1025 | case -ETIMEDOUT: |
| 1067 | PRINT_WARN("(%s): Request timed out\n", | 1026 | DBF_LH(1, "(%s): Request timed out\n", |
| 1068 | dev_name(&cdev->dev)); | 1027 | dev_name(&cdev->dev)); |
| 1069 | case -EIO: | 1028 | case -EIO: |
| 1070 | __tape_end_request(device, request, -EIO); | 1029 | __tape_end_request(device, request, -EIO); |
| 1071 | break; | 1030 | break; |
| 1072 | default: | 1031 | default: |
| 1073 | PRINT_ERR("(%s): Unexpected i/o error %li\n", | 1032 | DBF_LH(1, "(%s): Unexpected i/o error %li\n", |
| 1074 | dev_name(&cdev->dev), | 1033 | dev_name(&cdev->dev), |
| 1075 | PTR_ERR(irb)); | 1034 | PTR_ERR(irb)); |
| 1076 | } | 1035 | } |
| @@ -1182,8 +1141,6 @@ __tape_do_irq (struct ccw_device *cdev, unsigned long intparm, struct irb *irb) | |||
| 1182 | default: | 1141 | default: |
| 1183 | if (rc > 0) { | 1142 | if (rc > 0) { |
| 1184 | DBF_EVENT(6, "xunknownrc\n"); | 1143 | DBF_EVENT(6, "xunknownrc\n"); |
| 1185 | PRINT_ERR("Invalid return code from discipline " | ||
| 1186 | "interrupt function.\n"); | ||
| 1187 | __tape_end_request(device, request, -EIO); | 1144 | __tape_end_request(device, request, -EIO); |
| 1188 | } else { | 1145 | } else { |
| 1189 | __tape_end_request(device, request, rc); | 1146 | __tape_end_request(device, request, rc); |
| @@ -1323,7 +1280,6 @@ EXPORT_SYMBOL(tape_state_set); | |||
| 1323 | EXPORT_SYMBOL(tape_med_state_set); | 1280 | EXPORT_SYMBOL(tape_med_state_set); |
| 1324 | EXPORT_SYMBOL(tape_alloc_request); | 1281 | EXPORT_SYMBOL(tape_alloc_request); |
| 1325 | EXPORT_SYMBOL(tape_free_request); | 1282 | EXPORT_SYMBOL(tape_free_request); |
| 1326 | EXPORT_SYMBOL(tape_dump_sense); | ||
| 1327 | EXPORT_SYMBOL(tape_dump_sense_dbf); | 1283 | EXPORT_SYMBOL(tape_dump_sense_dbf); |
| 1328 | EXPORT_SYMBOL(tape_do_io); | 1284 | EXPORT_SYMBOL(tape_do_io); |
| 1329 | EXPORT_SYMBOL(tape_do_io_async); | 1285 | EXPORT_SYMBOL(tape_do_io_async); |
diff --git a/drivers/s390/char/tape_proc.c b/drivers/s390/char/tape_proc.c index 8a376af926a7..202f42132939 100644 --- a/drivers/s390/char/tape_proc.c +++ b/drivers/s390/char/tape_proc.c | |||
| @@ -20,8 +20,6 @@ | |||
| 20 | 20 | ||
| 21 | #include "tape.h" | 21 | #include "tape.h" |
| 22 | 22 | ||
| 23 | #define PRINTK_HEADER "TAPE_PROC: " | ||
| 24 | |||
| 25 | static const char *tape_med_st_verbose[MS_SIZE] = | 23 | static const char *tape_med_st_verbose[MS_SIZE] = |
| 26 | { | 24 | { |
| 27 | [MS_UNKNOWN] = "UNKNOWN ", | 25 | [MS_UNKNOWN] = "UNKNOWN ", |
| @@ -128,7 +126,6 @@ tape_proc_init(void) | |||
| 128 | proc_create("tapedevices", S_IFREG | S_IRUGO | S_IWUSR, NULL, | 126 | proc_create("tapedevices", S_IFREG | S_IRUGO | S_IWUSR, NULL, |
| 129 | &tape_proc_ops); | 127 | &tape_proc_ops); |
| 130 | if (tape_proc_devices == NULL) { | 128 | if (tape_proc_devices == NULL) { |
| 131 | PRINT_WARN("tape: Cannot register procfs entry tapedevices\n"); | ||
| 132 | return; | 129 | return; |
| 133 | } | 130 | } |
| 134 | } | 131 | } |
diff --git a/drivers/s390/char/tape_std.c b/drivers/s390/char/tape_std.c index 5bd573d144d6..44dd0f80c847 100644 --- a/drivers/s390/char/tape_std.c +++ b/drivers/s390/char/tape_std.c | |||
| @@ -26,8 +26,6 @@ | |||
| 26 | #include "tape.h" | 26 | #include "tape.h" |
| 27 | #include "tape_std.h" | 27 | #include "tape_std.h" |
| 28 | 28 | ||
| 29 | #define PRINTK_HEADER "TAPE_STD: " | ||
| 30 | |||
| 31 | /* | 29 | /* |
| 32 | * tape_std_assign | 30 | * tape_std_assign |
| 33 | */ | 31 | */ |
| @@ -46,9 +44,8 @@ tape_std_assign_timeout(unsigned long data) | |||
| 46 | device->cdev_id); | 44 | device->cdev_id); |
| 47 | rc = tape_cancel_io(device, request); | 45 | rc = tape_cancel_io(device, request); |
| 48 | if(rc) | 46 | if(rc) |
| 49 | PRINT_ERR("(%s): Assign timeout: Cancel failed with rc = %i\n", | 47 | DBF_EVENT(3, "(%s): Assign timeout: Cancel failed with rc = %i\n", |
| 50 | dev_name(&device->cdev->dev), rc); | 48 | dev_name(&device->cdev->dev), rc); |
| 51 | |||
| 52 | } | 49 | } |
| 53 | 50 | ||
| 54 | int | 51 | int |
| @@ -82,8 +79,6 @@ tape_std_assign(struct tape_device *device) | |||
| 82 | del_timer(&timeout); | 79 | del_timer(&timeout); |
| 83 | 80 | ||
| 84 | if (rc != 0) { | 81 | if (rc != 0) { |
| 85 | PRINT_WARN("%s: assign failed - device might be busy\n", | ||
| 86 | dev_name(&device->cdev->dev)); | ||
| 87 | DBF_EVENT(3, "%08x: assign failed - device might be busy\n", | 82 | DBF_EVENT(3, "%08x: assign failed - device might be busy\n", |
| 88 | device->cdev_id); | 83 | device->cdev_id); |
| 89 | } else { | 84 | } else { |
| @@ -105,8 +100,6 @@ tape_std_unassign (struct tape_device *device) | |||
| 105 | if (device->tape_state == TS_NOT_OPER) { | 100 | if (device->tape_state == TS_NOT_OPER) { |
| 106 | DBF_EVENT(3, "(%08x): Can't unassign device\n", | 101 | DBF_EVENT(3, "(%08x): Can't unassign device\n", |
| 107 | device->cdev_id); | 102 | device->cdev_id); |
| 108 | PRINT_WARN("(%s): Can't unassign device - device gone\n", | ||
| 109 | dev_name(&device->cdev->dev)); | ||
| 110 | return -EIO; | 103 | return -EIO; |
| 111 | } | 104 | } |
| 112 | 105 | ||
| @@ -120,8 +113,6 @@ tape_std_unassign (struct tape_device *device) | |||
| 120 | 113 | ||
| 121 | if ((rc = tape_do_io(device, request)) != 0) { | 114 | if ((rc = tape_do_io(device, request)) != 0) { |
| 122 | DBF_EVENT(3, "%08x: Unassign failed\n", device->cdev_id); | 115 | DBF_EVENT(3, "%08x: Unassign failed\n", device->cdev_id); |
| 123 | PRINT_WARN("%s: Unassign failed\n", | ||
| 124 | dev_name(&device->cdev->dev)); | ||
| 125 | } else { | 116 | } else { |
| 126 | DBF_EVENT(3, "%08x: Tape unassigned\n", device->cdev_id); | 117 | DBF_EVENT(3, "%08x: Tape unassigned\n", device->cdev_id); |
| 127 | } | 118 | } |
| @@ -242,8 +233,6 @@ tape_std_mtsetblk(struct tape_device *device, int count) | |||
| 242 | if (count > MAX_BLOCKSIZE) { | 233 | if (count > MAX_BLOCKSIZE) { |
| 243 | DBF_EVENT(3, "Invalid block size (%d > %d) given.\n", | 234 | DBF_EVENT(3, "Invalid block size (%d > %d) given.\n", |
| 244 | count, MAX_BLOCKSIZE); | 235 | count, MAX_BLOCKSIZE); |
| 245 | PRINT_ERR("Invalid block size (%d > %d) given.\n", | ||
| 246 | count, MAX_BLOCKSIZE); | ||
| 247 | return -EINVAL; | 236 | return -EINVAL; |
| 248 | } | 237 | } |
| 249 | 238 | ||
| @@ -633,14 +622,6 @@ tape_std_mtcompression(struct tape_device *device, int mt_count) | |||
| 633 | 622 | ||
| 634 | if (mt_count < 0 || mt_count > 1) { | 623 | if (mt_count < 0 || mt_count > 1) { |
| 635 | DBF_EXCEPTION(6, "xcom parm\n"); | 624 | DBF_EXCEPTION(6, "xcom parm\n"); |
| 636 | if (*device->modeset_byte & 0x08) | ||
| 637 | PRINT_INFO("(%s) Compression is currently on\n", | ||
| 638 | dev_name(&device->cdev->dev)); | ||
| 639 | else | ||
| 640 | PRINT_INFO("(%s) Compression is currently off\n", | ||
| 641 | dev_name(&device->cdev->dev)); | ||
| 642 | PRINT_INFO("Use 1 to switch compression on, 0 to " | ||
| 643 | "switch it off\n"); | ||
| 644 | return -EINVAL; | 625 | return -EINVAL; |
| 645 | } | 626 | } |
| 646 | request = tape_alloc_request(2, 0); | 627 | request = tape_alloc_request(2, 0); |
