|
From: Gleb C. <lna...@ya...> - 2023-07-10 07:36:04
|
Commit: 7a1ea23 GitHub URL: https://github.com/SCST-project/scst/commit/7a1ea234e7e9428c85e0c8a5d66158e369b8e81a Author: Gleb Chesnokov Date: 2023-07-10T10:34:57+03:00 Log Message: ----------- scst_tape: Port to Linux kernel v6.5 Support for the following scsi core changes in the Linux kernel v6.5: - a6cdc35fab0d ("scsi: core: Support retrieving sub-pages of mode pages") Modified Paths: -------------- scst/src/dev_handlers/scst_tape.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) =================================================================== diff --git a/scst/src/dev_handlers/scst_tape.c b/scst/src/dev_handlers/scst_tape.c index 1bb0301..845b98e 100644 --- a/scst/src/dev_handlers/scst_tape.c +++ b/scst/src/dev_handlers/scst_tape.c @@ -171,12 +171,15 @@ static int tape_attach(struct scst_device *dev) TRACE_DBG("%s", "Doing MODE_SENSE"); rc = scsi_mode_sense(dev->scsi_dev, - ((dev->scsi_dev->scsi_level <= SCSI_2) ? - ((dev->scsi_dev->lun << 5) & 0xe0) : 0), - 0 /* Mode Page 0 */, - buffer, buffer_size, - SCST_GENERIC_TAPE_SMALL_TIMEOUT, TAPE_RETRIES, - &data, NULL); + ((dev->scsi_dev->scsi_level <= SCSI_2) ? + ((dev->scsi_dev->lun << 5) & 0xe0) : 0), + 0 /* Mode Page 0 */, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 5, 0) + 0 /* Sub Page */, +#endif + buffer, buffer_size, + SCST_GENERIC_TAPE_SMALL_TIMEOUT, TAPE_RETRIES, + &data, NULL); TRACE_DBG("MODE_SENSE done: %x", rc); if (rc == 0) { |