Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 2 additions & 1 deletion src/tape_drivers/freebsd/cam/cam_tc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1781,7 +1781,8 @@ int camtape_remaining_capacity(void *device, struct tc_remaining_cap *cap)
int rc;

ltfs_profiler_add_entry(softc->profiler, NULL, TAPEBEND_REQ_ENTER(REQ_TC_REMAINCAP));
if (IS_LTO(softc->drive_type) && (DRIVE_GEN(softc->drive_type) == 0x05)) {
if ((IS_LTO(softc->drive_type) && (DRIVE_GEN(softc->drive_type) == 0x05)) ||
(softc->vendor == VENDOR_HP && IS_LTO(softc->drive_type) && (DRIVE_GEN(softc->drive_type) == 0x06))) {
/* Issue LogPage 0x31 */
rc = camtape_logsense(device, LOG_TAPECAPACITY, (uint8_t)0, logdata, LOGSENSEPAGE);
if (rc < 0) {
Expand Down
3 changes: 2 additions & 1 deletion src/tape_drivers/linux/lin_tape/lin_tape_ibmtape.c
Original file line number Diff line number Diff line change
Expand Up @@ -2266,7 +2266,8 @@ int lin_tape_ibmtape_remaining_capacity(void *device, struct tc_remaining_cap *c
struct lin_tape_ibmtape *priv = (struct lin_tape_ibmtape *) device;

ltfs_profiler_add_entry(priv->profiler, NULL, TAPEBEND_REQ_ENTER(REQ_TC_REMAINCAP));
if (IS_LTO(priv->drive_type) && (DRIVE_GEN(priv->drive_type) == 0x05)) {
if ((IS_LTO(priv->drive_type) && (DRIVE_GEN(priv->drive_type) == 0x05)) ||
(priv->vendor == VENDOR_HP && IS_LTO(priv->drive_type) && (DRIVE_GEN(priv->drive_type) == 0x06))) {
/* Issue LogPage 0x31 */
rc = lin_tape_ibmtape_logsense(device, LOG_TAPECAPACITY, (uint8_t)0, logdata, LOGSENSEPAGE);
if (rc) {
Expand Down
3 changes: 2 additions & 1 deletion src/tape_drivers/linux/sg/sg_tape.c
Original file line number Diff line number Diff line change
Expand Up @@ -3031,7 +3031,8 @@ int sg_remaining_capacity(void *device, struct tc_remaining_cap *cap)

memset(buffer, 0, LOGSENSEPAGE);

if (IS_LTO(priv->drive_type) && (DRIVE_GEN(priv->drive_type) == 0x05)) {
if ((IS_LTO(priv->drive_type) && (DRIVE_GEN(priv->drive_type) == 0x05)) ||
(priv->vendor == VENDOR_HP && IS_LTO(priv->drive_type) && (DRIVE_GEN(priv->drive_type) == 0x06))) {
/* Use LogPage 0x31 */
ret = sg_logsense(device, (uint8_t)LOG_TAPECAPACITY, (uint8_t)0, (void *)buffer, LOGSENSEPAGE);
if(ret < 0)
Expand Down
3 changes: 2 additions & 1 deletion src/tape_drivers/netbsd/scsipi-ibmtape/scsipi_ibmtape.c
Original file line number Diff line number Diff line change
Expand Up @@ -2575,7 +2575,8 @@ int scsipi_ibmtape_remaining_capacity(void *device, struct tc_remaining_cap *cap

memset(buffer, 0, LOGSENSEPAGE);

if (IS_LTO(priv->drive_type) && (DRIVE_GEN(priv->drive_type) == 0x05)) {
if ((IS_LTO(priv->drive_type) && (DRIVE_GEN(priv->drive_type) == 0x05)) ||
(priv->vendor == VENDOR_HP && IS_LTO(priv->drive_type) && (DRIVE_GEN(priv->drive_type) == 0x06))) {
/* Use LogPage 0x31 */
ret = scsipi_ibmtape_logsense(device, (uint8_t)LOG_TAPECAPACITY, (uint8_t)0, (void *)buffer, LOGSENSEPAGE);
if(ret < 0)
Expand Down
3 changes: 2 additions & 1 deletion src/tape_drivers/osx/iokit/iokit_tape.c
Original file line number Diff line number Diff line change
Expand Up @@ -2302,7 +2302,8 @@ int iokit_remaining_capacity(void *device, struct tc_remaining_cap *cap)

memset(&buffer, 0, LOGSENSEPAGE);

if (IS_LTO(priv->drive_type) && (DRIVE_GEN(priv->drive_type) == 0x05)) {
if ((IS_LTO(priv->drive_type) && (DRIVE_GEN(priv->drive_type) == 0x05)) ||
(priv->vendor == VENDOR_HP && IS_LTO(priv->drive_type) && (DRIVE_GEN(priv->drive_type) == 0x06))) {
/* Use LogPage 0x31 */
ret = iokit_logsense(device, (uint8_t)LOG_TAPECAPACITY, (uint8_t)0, (void *)buffer, LOGSENSEPAGE);
if(ret < 0)
Expand Down
Loading