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")
This commit is contained in:
Gleb Chesnokov
2023-07-10 10:34:57 +03:00
parent 76750f3352
commit 7a1ea234e7
+9 -6
View File
@@ -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) {