zipl/tape2dump: Remove check for data compaction support

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 <jremus@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Jan Höppner
2026-01-24 10:52:14 +01:00
parent 145c21a9ca
commit 5af1e8cc69

View File

@@ -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);
}
/*