Skip to content

Commit 1339106

Browse files
hoeppnerjhcahca
authored andcommitted
s390/tape: Cleanup sense data analysis and error handling
Quite a few Error Recovery Action (ERA) codes and sense data entries are not relevant anymore for the Virtual Tape Server (VTS) and are not being used by VTS. Most of them were relevant for actual physical errors when a tape cartridge got stuck or a tape didn't rewind properly for example. Remove these codes from the sense data analysis as it's dead code anyway. Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com> Reviewed-by: Jens Remus <jremus@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
1 parent 4b6852d commit 1339106

1 file changed

Lines changed: 0 additions & 120 deletions

File tree

drivers/s390/char/tape_34xx.c

Lines changed: 0 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -412,28 +412,6 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
412412
case 0x00:
413413
/* Unit check with erpa code 0. Report and ignore. */
414414
return TAPE_IO_SUCCESS;
415-
case 0x21:
416-
/*
417-
* Data streaming not operational. CU will switch to
418-
* interlock mode. Reissue the command.
419-
*/
420-
return tape_34xx_erp_retry(request);
421-
case 0x22:
422-
/*
423-
* Path equipment check. Might be drive adapter error, buffer
424-
* error on the lower interface, internal path not usable,
425-
* or error during cartridge load.
426-
*/
427-
dev_warn (&device->cdev->dev, "A path equipment check occurred"
428-
" for the tape device\n");
429-
return tape_34xx_erp_failed(request, -EIO);
430-
case 0x24:
431-
/*
432-
* Load display check. Load display was command was issued,
433-
* but the drive is displaying a drive check message. Can
434-
* be threated as "device end".
435-
*/
436-
return tape_34xx_erp_succeeded(request);
437415
case 0x27:
438416
/*
439417
* Command reject. May indicate illegal channel program or
@@ -449,12 +427,6 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
449427
* subsystem func is issued and the CU is not on-line.
450428
*/
451429
return tape_34xx_erp_failed(request, -EIO);
452-
case 0x2a:
453-
/*
454-
* Unsolicited environmental data. An internal counter
455-
* overflows, we can ignore this and reissue the cmd.
456-
*/
457-
return tape_34xx_erp_retry(request);
458430
case 0x2b:
459431
/*
460432
* Environmental data present. Indicates either unload
@@ -493,29 +465,6 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
493465
dev_warn (&device->cdev->dev, "The tape medium is write-"
494466
"protected\n");
495467
return tape_34xx_erp_failed(request, -EACCES);
496-
case 0x32:
497-
// Tension loss. We cannot recover this, it's an I/O error.
498-
dev_warn (&device->cdev->dev, "The tape does not have the "
499-
"required tape tension\n");
500-
return tape_34xx_erp_failed(request, -EIO);
501-
case 0x33:
502-
/*
503-
* Load Failure. The cartridge was not inserted correctly or
504-
* the tape is not threaded correctly.
505-
*/
506-
dev_warn (&device->cdev->dev, "The tape unit failed to load"
507-
" the cartridge\n");
508-
return tape_34xx_erp_failed(request, -EIO);
509-
case 0x34:
510-
/*
511-
* Unload failure. The drive cannot maintain tape tension
512-
* and control tape movement during an unload operation.
513-
*/
514-
dev_warn (&device->cdev->dev, "Automatic unloading of the tape"
515-
" cartridge failed\n");
516-
if (request->op == TO_RUN)
517-
return tape_34xx_erp_failed(request, -EIO);
518-
return tape_34xx_erp_bug(device, request, irb, sense[3]);
519468
case 0x35:
520469
/*
521470
* Drive equipment check. One of the following:
@@ -530,14 +479,6 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
530479
case 0x36:
531480
/* End of data. */
532481
return tape_34xx_erp_failed(request, -EIO);
533-
case 0x37:
534-
/*
535-
* Tape length error. The tape is shorter than reported in
536-
* the beginning-of-tape data.
537-
*/
538-
dev_warn (&device->cdev->dev, "The tape information states an"
539-
" incorrect length\n");
540-
return tape_34xx_erp_failed(request, -EIO);
541482
case 0x38:
542483
/*
543484
* Physical end of tape. A read/write operation reached
@@ -551,15 +492,6 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
551492
case 0x39:
552493
/* Backward at Beginning of tape. */
553494
return tape_34xx_erp_failed(request, -EIO);
554-
case 0x3a:
555-
/* Drive switched to not ready. */
556-
dev_warn (&device->cdev->dev, "The tape unit is not ready\n");
557-
return tape_34xx_erp_failed(request, -EIO);
558-
case 0x3b:
559-
/* Manual rewind or unload. This causes an I/O error. */
560-
dev_warn (&device->cdev->dev, "The tape medium has been "
561-
"rewound or unloaded manually\n");
562-
return tape_34xx_erp_failed(request, -EIO);
563495
case 0x42:
564496
/*
565497
* Degraded mode. A condition that can cause degraded
@@ -597,14 +529,6 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
597529
dev_warn (&device->cdev->dev, "The tape unit is already "
598530
"assigned\n");
599531
return tape_34xx_erp_failed(request, -EIO);
600-
case 0x46:
601-
/*
602-
* Drive not on-line. Drive may be switched offline,
603-
* the power supply may be switched off or
604-
* the drive address may not be set correctly.
605-
*/
606-
dev_warn (&device->cdev->dev, "The tape unit is not online\n");
607-
return tape_34xx_erp_failed(request, -EIO);
608532
case 0x47:
609533
/* Volume fenced. CU reports volume integrity is lost. */
610534
dev_warn (&device->cdev->dev, "The control unit has fenced "
@@ -613,30 +537,6 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
613537
case 0x48:
614538
/* Log sense data and retry request. */
615539
return tape_34xx_erp_retry(request);
616-
case 0x49:
617-
/* Bus out check. A parity check error on the bus was found. */
618-
dev_warn (&device->cdev->dev, "A parity error occurred on the "
619-
"tape bus\n");
620-
return tape_34xx_erp_failed(request, -EIO);
621-
case 0x4a:
622-
/* Control unit erp failed. */
623-
dev_warn (&device->cdev->dev, "I/O error recovery failed on "
624-
"the tape control unit\n");
625-
return tape_34xx_erp_failed(request, -EIO);
626-
case 0x4b:
627-
/*
628-
* CU and drive incompatible. The drive requests micro-program
629-
* patches, which are not available on the CU.
630-
*/
631-
dev_warn (&device->cdev->dev, "The tape unit requires a "
632-
"firmware update\n");
633-
return tape_34xx_erp_failed(request, -EIO);
634-
case 0x4c:
635-
/*
636-
* Recovered Check-One failure. Cu develops a hardware error,
637-
* but is able to recover.
638-
*/
639-
return tape_34xx_erp_retry(request);
640540
case 0x4d:
641541
/*
642542
* Resetting event received. Since the driver does
@@ -695,29 +595,9 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
695595
case 0x57:
696596
/* Global status intercept. */
697597
return tape_34xx_erp_retry(request);
698-
case 0x5a:
699-
/*
700-
* Tape length incompatible. The tape inserted is too long,
701-
* which could cause damage to the tape or the drive.
702-
*/
703-
dev_warn (&device->cdev->dev, "The tape unit does not support "
704-
"the tape length\n");
705-
return tape_34xx_erp_failed(request, -EIO);
706-
case 0x5d:
707-
/* Tape length violation. */
708-
dev_warn (&device->cdev->dev, "The tape unit does not support"
709-
" the current tape length\n");
710-
return tape_34xx_erp_failed(request, -EMEDIUMTYPE);
711-
case 0x5e:
712-
/* Compaction algorithm incompatible. */
713-
dev_warn (&device->cdev->dev, "The tape unit does not support"
714-
" the compaction algorithm\n");
715-
return tape_34xx_erp_failed(request, -EMEDIUMTYPE);
716-
717598
/* The following erpas should have been covered earlier. */
718599
case 0x23: /* Read data check. */
719600
case 0x25: /* Write data check. */
720-
case 0x26: /* Data check (read opposite). */
721601
case 0x28: /* Write id mark check. */
722602
case 0x31: /* Tape void. */
723603
case 0x40: /* Overrun error. */

0 commit comments

Comments
 (0)