]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
s390/tape: Remove 34xx Read Opposite error recovery
authorJan Höppner <hoeppner@linux.ibm.com>
Thu, 16 Oct 2025 07:47:12 +0000 (09:47 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Tue, 21 Oct 2025 08:25:54 +0000 (10:25 +0200)
On old native type 3490 tape devices a Read Opposite error recovery
procedure on Error Recovery Action Code (ERA) 26 was issued if a Read
Forward command failed. This recovery procedure was implemented with the
Read Backward command.

As a preparation for a subsequent commit, that adds support for bigger
block sizes, remove the 34xx ERA 26 related recovery code. The recovery
code would need to be adapted to the bigger block sizes, without any
possibility to be tested, as modern Virtual Tape Servers (VTS) do
neither report ERA 26 on a Read Forward command failure nor support the
error recovery procedure anymore.

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>
drivers/s390/char/tape_34xx.c
drivers/s390/char/tape_std.c

index 1e4984acb64845bf38f06685f82be44e135a87f4..9d0fb4b867c437381f871a93f3a996c5203c023e 100644 (file)
@@ -234,31 +234,6 @@ tape_34xx_unsolicited_irq(struct tape_device *device, struct irb *irb)
        return TAPE_IO_SUCCESS;
 }
 
-/*
- * Read Opposite Error Recovery Function:
- * Used, when Read Forward does not work
- */
-static int
-tape_34xx_erp_read_opposite(struct tape_device *device,
-                           struct tape_request *request)
-{
-       if (request->op == TO_RFO) {
-               /*
-                * We did read forward, but the data could not be read
-                * *correctly*. We transform the request to a read backward
-                * and try again.
-                */
-               tape_std_read_backward(device, request);
-               return tape_34xx_erp_retry(request);
-       }
-
-       /*
-        * We tried to read forward and backward, but hat no
-        * success -> failed.
-        */
-       return tape_34xx_erp_failed(request, -EIO);
-}
-
 static int
 tape_34xx_erp_bug(struct tape_device *device, struct tape_request *request,
                  struct irb *irb, int no)
@@ -440,9 +415,6 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
                        dev_warn (&device->cdev->dev, "A write error on the "
                                "tape cannot be recovered\n");
                        return tape_34xx_erp_failed(request, -EIO);
-               case 0x26:
-                       /* Data Check (read opposite) occurred. */
-                       return tape_34xx_erp_read_opposite(device, request);
                case 0x28:
                        /* ID-Mark at tape start couldn't be written */
                        dev_warn (&device->cdev->dev, "Writing the ID-mark "
index 66d4a9b7e7102b6c3ca0a20c261261ac8ad15ebe..29e40ad6fd19ea9a1731f4236eb3e37239627248 100644 (file)
@@ -662,25 +662,6 @@ tape_std_read_block(struct tape_device *device)
        return request;
 }
 
-/*
- * Read Block backward transformation function.
- */
-void
-tape_std_read_backward(struct tape_device *device, struct tape_request *request)
-{
-       /*
-        * We have allocated 4 ccws in tape_std_read, so we can now
-        * transform the request to a read backward, followed by a
-        * forward space block.
-        */
-       request->op = TO_RBA;
-       tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte);
-       tape_ccw_cc_idal(request->cpaddr + 1, READ_BACKWARD,
-                        device->char_data.idal_buf);
-       tape_ccw_cc(request->cpaddr + 2, FORSPACEBLOCK, 0, NULL);
-       tape_ccw_end(request->cpaddr + 3, NOP, 0, NULL);
-       DBF_EVENT(6, "xrop ccwg");}
-
 /*
  * Write Block
  */
@@ -741,6 +722,5 @@ EXPORT_SYMBOL(tape_std_mterase);
 EXPORT_SYMBOL(tape_std_mtunload);
 EXPORT_SYMBOL(tape_std_mtcompression);
 EXPORT_SYMBOL(tape_std_read_block);
-EXPORT_SYMBOL(tape_std_read_backward);
 EXPORT_SYMBOL(tape_std_write_block);
 EXPORT_SYMBOL(tape_std_process_eov);