From 5af1e8cc693ef9be4a8e7efb23b9fa9a4b2e0d6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B6ppner?= Date: Sat, 24 Jan 2026 10:52:14 +0100 Subject: [PATCH] zipl/tape2dump: Remove check for data compaction support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Data compaction is only supported by 3490 tape devices. For Virtual Tape Server (VTS) this is the only supported device. Reading device characteristics and checking the type is unnecessary. Remove the corresponding code and simply enable data compaction. Reviewed-by: Jens Remus Signed-off-by: Jan Höppner --- zipl/boot/tape2dump.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/zipl/boot/tape2dump.c b/zipl/boot/tape2dump.c index 41136160..3cb69f45 100644 --- a/zipl/boot/tape2dump.c +++ b/zipl/boot/tape2dump.c @@ -25,7 +25,6 @@ #define WRITE_CMD 0x01 /* Write block */ #define SENSE_OVERRUN 0x04 /* Sense */ #define WRITETAPEMARK 0x1f /* Write Tape Mark */ -#define READ_DEV_CHAR 0x64 /* Read device characteristics */ #define MODE_SET_DB 0xdb /* Mode set */ /* @@ -105,27 +104,12 @@ static void start_ccw(uint8_t code, uint8_t flags, uint16_t count, void *cda) } /* - * Read tape device characteristics to find out if IDRC compression can be used + * Enable data compaction */ static void setup_idrc_compression(void) { - uint16_t type; - - start_ccw(READ_DEV_CHAR, 0x0, 0x40, ccw_data); - - memcpy(&type, &ccw_data[3], sizeof(type)); - switch (type) { - case 0x3490: - case 0x3590: // XXX 3592 - ccw_init(&ccw_program.compress, MODE_SET_DB, CCW_FLAG_CC, 0x1, - &mode_set_byte); - orb.cpa = __pa32(&ccw_program.compress); - break; - default: - case 0x3480: - orb.cpa = __pa32(&ccw_program.write); - break; - } + ccw_init(&ccw_program.compress, MODE_SET_DB, CCW_FLAG_CC, 0x1, &mode_set_byte); + orb.cpa = __pa32(&ccw_program.compress); } /*