Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/libltfs/tape_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
** OO_Copyright_BEGIN
**
**
** Copyright 2010, 2023 IBM Corp. All rights reserved.
** Copyright 2010, 2025 IBM Corp. All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -155,6 +155,8 @@ enum {
TC_DC_LTOM8 = 0x5D,
TC_DC_LTO8 = 0x5E,
TC_DC_LTO9 = 0x60,
TC_DC_LTOA = 0x62,
TC_DC_LTOPA = 0x63,
};

/* Density codes of TS11x0 */
Expand Down
17 changes: 15 additions & 2 deletions src/tape_drivers/generic/file/filedebug_tc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
** OO_Copyright_BEGIN
**
**
** Copyright 2010, 2020 IBM Corp. All rights reserved.
** Copyright 2010, 2025 IBM Corp. All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -1340,7 +1340,20 @@ static inline int _sanitize_tape(struct filedebug_data *state)
ret = -EDEV_MEDIUM_FORMAT_ERROR;
break;
}
} else if (gen == DRIVE_GEN_JAG4) {
} else if (gen == DRIVE_GEN_LTOA) {
switch (state->conf.cart_type) {
case TC_MP_LTOPAD_CART:
case TC_MP_LTOAD_CART:
/* Do nothing */
break;
default:
ltfsmsg(LTFS_INFO, 30086I, "LTOA", state->conf.cart_type);
state->unsupported_tape = true;
ret = -EDEV_MEDIUM_FORMAT_ERROR;
break;
}
}
else if (gen == DRIVE_GEN_JAG4) {
switch (state->conf.cart_type) {
case TC_MP_JB:
case TC_MP_JC:
Expand Down
80 changes: 63 additions & 17 deletions src/tape_drivers/hp_tape.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
** OO_Copyright_BEGIN
**
**
** Copyright 2010, 2020 IBM Corp. All rights reserved.
** Copyright 2010, 2025 IBM Corp. All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -226,6 +226,26 @@ static struct _timeout_tape timeout_lto9[] = {
{-1, -1}
};

static struct _timeout_tape timeout_ltoA[] = {
{ ERASE, 16320 },
Comment thread
amissael95 marked this conversation as resolved.
Outdated
{ FORMAT_MEDIUM, 3180 },
{ LOAD_UNLOAD, 780 },
{ LOCATE10, 2940 },
{ LOCATE16, 2940 },
{ READ, 2340 },
{ READ_BUFFER, 480 },
{ REWIND, 600 },
{ SEND_DIAGNOSTIC, 1980 },
{ SET_CAPACITY, 780 },
{ SPACE6, 2940 },
{ SPACE16, 2940 },
{ VERIFY, 104880 },
{ WRITE, 1500 },
{ WRITE_BUFFER, 540 },
{ WRITE_FILEMARKS6, 1620 },
{-1, -1}
};

static struct _timeout_tape timeout_lto5_hh[] = {
{ ERASE, 18000 },
{ FORMAT_MEDIUM, 1560 },
Expand Down Expand Up @@ -307,22 +327,42 @@ static struct _timeout_tape timeout_lto8_hh[] = {
};

static struct _timeout_tape timeout_lto9_hh[] = {
{ ERASE, 53040 },
{ FORMAT_MEDIUM, 3000 },
{ LOAD_UNLOAD, 840 },
{ LOCATE10, 2940 },
{ LOCATE16, 2940 },
{ READ, 2340 },
{ READ_BUFFER, 480 },
{ REWIND, 660 },
{ SEND_DIAGNOSTIC, 1980 },
{ SET_CAPACITY, 780 },
{ SPACE6, 2940 },
{ SPACE16, 2940 },
{ VERIFY, 53040 },
{ WRITE, 1680 },
{ WRITE_BUFFER, 540 },
{ WRITE_FILEMARKS6, 1680 },
{ ERASE, 166370 },
{ FORMAT_MEDIUM, 3240 },
{ LOAD_UNLOAD, 960 },
{ LOCATE10, 2940 },
{ LOCATE16, 2940 },
{ READ, 2340 },
{ READ_BUFFER, 480 },
{ REWIND, 600 },
{ SEND_DIAGNOSTIC, 2040 },
{ SET_CAPACITY, 960 },
{ SPACE6, 2940 },
{ SPACE16, 2940 },
{ VERIFY, 63300 },
{ WRITE, 1560 },
{ WRITE_BUFFER, 540 },
{ WRITE_FILEMARKS6, 1680 },
{-1, -1}
};

static struct _timeout_tape timeout_ltoA_hh[] = {
{ ERASE, 166370 },
{ FORMAT_MEDIUM, 3240 },
{ LOAD_UNLOAD, 960 },
{ LOCATE10, 3940 },
{ LOCATE16, 3940 },
{ READ, 2340 },
{ READ_BUFFER, 480 },
{ REWIND, 600 },
{ SEND_DIAGNOSTIC, 2040 },
{ SET_CAPACITY, 960 },
{ SPACE6, 3940 },
{ SPACE16, 3940 },
{ VERIFY, 63300 },
{ WRITE, 1560 },
{ WRITE_BUFFER, 540 },
{ WRITE_FILEMARKS6, 1680 },
{-1, -1}
};

Expand Down Expand Up @@ -402,6 +442,12 @@ int hp_tape_init_timeout(struct timeout_tape** table, int type)
case DRIVE_LTO9_HH:
ret = _create_table_tape(table, timeout_lto, timeout_lto9_hh);
break;
case DRIVE_LTOA:
ret = _create_table_tape(table, timeout_lto, timeout_ltoA);
break;
case DRIVE_LTOA_HH:
ret = _create_table_tape(table, timeout_lto, timeout_ltoA_hh);
break;
default:
ret = _create_table_tape(table, timeout_lto, timeout_lto7_hh);
break;
Expand Down
96 changes: 91 additions & 5 deletions src/tape_drivers/ibm_tape.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
** OO_Copyright_BEGIN
**
**
** Copyright 2010, 2023 IBM Corp. All rights reserved.
** Copyright 2010, 2025 IBM Corp. All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -193,6 +193,11 @@ DRIVE_DENSITY_SUPPORT_MAP jaguar_drive_density_strict[] = {
};

DRIVE_DENSITY_SUPPORT_MAP lto_drive_density[] = {
/* LTOA */
{ DRIVE_GEN_LTOA, TC_MP_LTOPAD_CART, TC_DC_LTOPA, MEDIUM_PERFECT_MATCH},
Comment thread
Magic-Kowel marked this conversation as resolved.
{ DRIVE_GEN_LTOA, TC_MP_LTOAD_CART, TC_DC_LTOA, MEDIUM_PERFECT_MATCH},
{ DRIVE_GEN_LTOA, TC_MP_LTOAD_CART, TC_DC_UNKNOWN, MEDIUM_PERFECT_MATCH},
{ DRIVE_GEN_LTOA, TC_MP_LTOPAD_CART, TC_DC_UNKNOWN, MEDIUM_PERFECT_MATCH},
/* LTO9 */
{ DRIVE_GEN_LTO9, TC_MP_LTO9D_CART, TC_DC_LTO9, MEDIUM_PERFECT_MATCH},
{ DRIVE_GEN_LTO9, TC_MP_LTO9D_CART, TC_DC_UNKNOWN, MEDIUM_PERFECT_MATCH},
Expand Down Expand Up @@ -226,6 +231,12 @@ DRIVE_DENSITY_SUPPORT_MAP lto_drive_density[] = {
};

DRIVE_DENSITY_SUPPORT_MAP lto_drive_density_strict[] = {
/* LTOA */
{ DRIVE_GEN_LTOA, TC_MP_LTOPAD_CART, TC_DC_LTOPA, MEDIUM_PERFECT_MATCH},
{ DRIVE_GEN_LTOA, TC_MP_LTOAD_CART, TC_DC_LTOA, MEDIUM_PERFECT_MATCH},
{ DRIVE_GEN_LTOA, TC_MP_LTOAD_CART, TC_DC_UNKNOWN, MEDIUM_PERFECT_MATCH},
{ DRIVE_GEN_LTOA, TC_MP_LTOPAD_CART, TC_DC_UNKNOWN, MEDIUM_PERFECT_MATCH},

/* LTO9 */
{ DRIVE_GEN_LTO9, TC_MP_LTO9D_CART, TC_DC_LTO9, MEDIUM_PERFECT_MATCH},
{ DRIVE_GEN_LTO9, TC_MP_LTO9D_CART, TC_DC_UNKNOWN, MEDIUM_PERFECT_MATCH},
Expand All @@ -249,6 +260,8 @@ DRIVE_DENSITY_SUPPORT_MAP lto_drive_density_strict[] = {
};

const unsigned char supported_cart[] = {
TC_MP_LTOPAD_CART,
TC_MP_LTOAD_CART,
TC_MP_LTO9D_CART,
TC_MP_LTO8D_CART,
TC_MP_LTO7D_CART,
Expand Down Expand Up @@ -278,6 +291,8 @@ const unsigned char supported_density[] = {
TC_DC_JAG5A,
TC_DC_JAG5,
TC_DC_JAG4,
TC_DC_LTOPA,
TC_DC_LTOA,
TC_DC_LTO9,
TC_DC_LTO8,
TC_DC_LTOM8,
Expand Down Expand Up @@ -319,6 +334,10 @@ struct supported_device *ibm_supported_drives[] = {
TAPEDRIVE( IBM_VENDOR_ID, "ULTRIUM-HH9", DRIVE_LTO9_HH, "[ULTRIUM-HH9]" ), /* IBM Ultrium Gen 9 Half-High */
TAPEDRIVE( IBM_VENDOR_ID, "ULT3580-HH9", DRIVE_LTO9_HH, "[ULT3580-HH9]" ), /* IBM Ultrium Gen 9 Half-High */
TAPEDRIVE( IBM_VENDOR_ID, "HH LTO Gen 9", DRIVE_LTO9_HH, "[HH LTO Gen 9]" ), /* IBM Ultrium Gen 9 Half-High */
TAPEDRIVE( IBM_VENDOR_ID, "ULTRIUM-TDA", DRIVE_LTOA, "[ULTRIUM-TDA]" ), /* IBM Ultrium Gen A */
TAPEDRIVE( IBM_VENDOR_ID, "ULT3580-TDA", DRIVE_LTOA, "[ULT3580-TDA]"), /* IBM Ultrium Gen A */
TAPEDRIVE( IBM_VENDOR_ID, "ULTRIUM-HHA", DRIVE_LTOA_HH, "[ULTRIUM-HHA]"), /* IBM Ultrium Gen A Half-High */
TAPEDRIVE( IBM_VENDOR_ID, "ULT3580-HHA", DRIVE_LTOA_HH, "[ULT3580-HHA]"), /* IBM Ultrium Gen A Half-High */
TAPEDRIVE( IBM_VENDOR_ID, "03592E07", DRIVE_TS1140, "[03592E07]" ), /* IBM TS1140 */
TAPEDRIVE( IBM_VENDOR_ID, "03592E08", DRIVE_TS1150, "[03592E08]" ), /* IBM TS1150 */
TAPEDRIVE( IBM_VENDOR_ID, "0359255F", DRIVE_TS1155, "[0359255F]" ), /* IBM TS1155 */
Expand Down Expand Up @@ -348,6 +367,9 @@ struct supported_device *usb_supported_drives[] = {
TAPEDRIVE( IBM_VENDOR_ID, "ULT3580-TD9", DRIVE_LTO9, "[ULT3580-TD9]" ), /* IBM Ultrium Gen 9 */
TAPEDRIVE( IBM_VENDOR_ID, "ULTRIUM-HH9", DRIVE_LTO9_HH, "[ULTRIUM-HH9]" ), /* IBM Ultrium Gen 9 Half-High */
TAPEDRIVE( IBM_VENDOR_ID, "ULT3580-HH9", DRIVE_LTO9_HH, "[ULT3580-HH9]" ), /* IBM Ultrium Gen 9 Half-High */
TAPEDRIVE( IBM_VENDOR_ID, "ULT3580-TDA", DRIVE_LTOA, "[ULT3580-TDA]"), /* IBM Ultrium Gen A */
TAPEDRIVE( IBM_VENDOR_ID, "ULTRIUM-HHA", DRIVE_LTOA_HH, "[ULTRIUM-HHA]" ), /* IBM Ultrium Gen A */
TAPEDRIVE( IBM_VENDOR_ID, "ULT3580-HHA", DRIVE_LTOA_HH, "[ULT3580-HHA]" ), /* IBM Ultrium Gen A Half-High */
/* End of supported_devices */
NULL
};
Expand Down Expand Up @@ -589,6 +611,26 @@ static struct _timeout_tape timeout_lto9[] = {
{-1, -1}
};

static struct _timeout_tape timeout_ltoA[] = {
{ ERASE, 16320 },
Comment thread
Magic-Kowel marked this conversation as resolved.
Outdated
{ FORMAT_MEDIUM, 3180 },
{ LOAD_UNLOAD, 780 },
{ LOCATE10, 2940 },
{ LOCATE16, 2940 },
{ READ, 2340 },
{ READ_BUFFER, 480 },
{ REWIND, 600 },
{ SEND_DIAGNOSTIC, 1980 },
{ SET_CAPACITY, 780 },
{ SPACE6, 2940 },
{ SPACE16, 2940 },
{ VERIFY, 104880 },
{ WRITE, 1500 },
{ WRITE_BUFFER, 540 },
{ WRITE_FILEMARKS6, 1620 },
{-1, -1}
};

static struct _timeout_tape timeout_lto5_hh[] = {
{ ERASE, 19200 },
{ FORMAT_MEDIUM, 1980 },
Expand Down Expand Up @@ -673,15 +715,35 @@ static struct _timeout_tape timeout_lto9_hh[] = {
{ ERASE, 166370 },
{ FORMAT_MEDIUM, 3240 },
{ LOAD_UNLOAD, 960 },
{ LOCATE10, 2940 },
{ LOCATE16, 2940 },
{ LOCATE10, 3940 },
{ LOCATE16, 3940 },
{ READ, 2340 },
{ READ_BUFFER, 480 },
{ REWIND, 600 },
{ SEND_DIAGNOSTIC, 2040 },
{ SET_CAPACITY, 960 },
{ SPACE6, 2940 },
{ SPACE16, 2940 },
{ SPACE6, 3940 },
{ SPACE16, 3940 },
{ VERIFY, 63300 },
{ WRITE, 1560 },
{ WRITE_BUFFER, 540 },
{ WRITE_FILEMARKS6, 1680 },
{-1, -1}
};

static struct _timeout_tape timeout_ltoA_hh[] = {
Comment thread
vandelvan marked this conversation as resolved.
{ ERASE, 166370 },
{ FORMAT_MEDIUM, 3240 },
{ LOAD_UNLOAD, 960 },
{ LOCATE10, 3940 },
{ LOCATE16, 3940 },
{ READ, 2340 },
{ READ_BUFFER, 480 },
{ REWIND, 600 },
{ SEND_DIAGNOSTIC, 2040 },
{ SET_CAPACITY, 960 },
{ SPACE6, 3940 },
{ SPACE16, 3940 },
{ VERIFY, 63300 },
{ WRITE, 1560 },
{ WRITE_BUFFER, 540 },
Expand Down Expand Up @@ -903,6 +965,12 @@ int ibm_tape_init_timeout(struct timeout_tape** table, int type)
case DRIVE_LTO9_HH:
ret = _create_table_tape(table, timeout_lto, timeout_lto9_hh);
break;
case DRIVE_LTOA:
ret = _create_table_tape(table, timeout_lto, timeout_ltoA);
break;
case DRIVE_LTOA_HH:
ret = _create_table_tape(table, timeout_lto, timeout_ltoA_hh);
break;
case DRIVE_TS1140:
ret = _create_table_tape(table, timeout_11x0, timeout_1140);
break;
Expand Down Expand Up @@ -989,6 +1057,9 @@ static inline unsigned char _assume_cartridge_type(char product, char btype)
case '9':
ctype = TC_MP_LTO9D_CART;
break;
case 'A':
ctype = TC_MP_LTOAD_CART;
break;
default:
break;
}
Expand All @@ -1001,6 +1072,15 @@ static inline unsigned char _assume_cartridge_type(char product, char btype)
break;
}
}
else if (product == 'P') {
switch (btype) {
case 'A':
ctype = TC_MP_LTOPAD_CART;
break;
default:
break;
}
}

return ctype;
}
Expand Down Expand Up @@ -1039,6 +1119,12 @@ char* ibm_tape_assume_cart_name(unsigned char type)
case TC_MP_LTO9D_CART:
name = "L9";
break;
case TC_MP_LTOAD_CART:
name = "LA";
break;
case TC_MP_LTOPAD_CART:
name = "PA";
break;
case TC_MP_JB:
name = "JB";
break;
Expand Down
25 changes: 24 additions & 1 deletion src/tape_drivers/quantum_tape.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
** OO_Copyright_BEGIN
**
**
** Copyright 2010, 2020 IBM Corp. All rights reserved.
** Copyright 2010, 2025 IBM Corp. All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -246,6 +246,26 @@ static struct _timeout_tape timeout_lto9_hh[] = {
{-1, -1}
};

static struct _timeout_tape timeout_ltoA_hh[] = {
Comment thread
vandelvan marked this conversation as resolved.
{ ERASE, 166370 },
{ FORMAT_MEDIUM, 3240 },
{ LOAD_UNLOAD, 960 },
{ LOCATE10, 3940 },
{ LOCATE16, 3940 },
{ READ, 2340 },
{ READ_BUFFER, 480 },
{ REWIND, 600 },
{ SEND_DIAGNOSTIC, 2040 },
{ SET_CAPACITY, 960 },
{ SPACE6, 3940 },
{ SPACE16, 3940 },
{ VERIFY, 63300 },
{ WRITE, 1560 },
{ WRITE_BUFFER, 540 },
{ WRITE_FILEMARKS6, 1680 },
{-1, -1}
};

static int _create_table_tape(struct timeout_tape **result,
struct _timeout_tape* base,
struct _timeout_tape* override)
Expand Down Expand Up @@ -307,6 +327,9 @@ int quantum_tape_init_timeout(struct timeout_tape** table, int type)
case DRIVE_LTO9_HH:
ret = _create_table_tape(table, timeout_lto, timeout_lto9_hh);
break;
case DRIVE_LTOA_HH:
ret = _create_table_tape(table, timeout_lto, timeout_ltoA_hh);
break;
default:
ret = _create_table_tape(table, timeout_lto, timeout_lto7_hh);
break;
Expand Down
Loading