Skip to content

Commit

Permalink
scst: Port to Linux kernel v6.12
Browse files Browse the repository at this point in the history
Support for the following changes in the Linux kernel v6.12:

- 5f60d5f6bbc1 ("move asm/unaligned.h to linux/unaligned.h")
- cb787f4ac0c2 ("[tree-wide] finally take no_llseek out")
  • Loading branch information
lnocturno committed Nov 7, 2024
1 parent 1925094 commit 256d695
Show file tree
Hide file tree
Showing 22 changed files with 26 additions and 21 deletions.
1 change: 0 additions & 1 deletion fcst/ft_sess.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/hash.h>
#include <asm/unaligned.h>
#include <scsi/libfc.h>
#include <scsi/fc/fc_els.h>
#include "fcst.h"
Expand Down
1 change: 0 additions & 1 deletion iscsi-scst/include/iscsit_transport.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,3 @@ extern void iscsit_unreg_transport(struct iscsit_transport *t);
extern struct iscsit_transport *iscsit_get_transport(enum iscsit_transport_type type);

#endif /* __ISCSI_TRANSPORT_H__ */

1 change: 0 additions & 1 deletion iscsi-scst/kernel/iscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <net/tcp.h>
#include <scsi/scsi.h>
#include <asm/byteorder.h>
#include <asm/unaligned.h>
#ifdef INSIDE_KERNEL_TREE
#include <scst/iscsit_transport.h>
#else
Expand Down
4 changes: 4 additions & 0 deletions iscsi-scst/kernel/isert-scst/isert_login.c
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,9 @@ static dev_t devno;

static const struct file_operations listener_fops = {
.owner = THIS_MODULE,
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0)
.llseek = no_llseek,
#endif
.read = isert_listen_read,
.unlocked_ioctl = isert_listen_ioctl,
.compat_ioctl = isert_listen_ioctl,
Expand All @@ -900,7 +902,9 @@ static const struct file_operations listener_fops = {

static const struct file_operations conn_fops = {
.owner = THIS_MODULE,
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0)
.llseek = no_llseek,
#endif
.read = isert_read,
.write = isert_write,
.unlocked_ioctl = isert_ioctl,
Expand Down
1 change: 0 additions & 1 deletion qla2x00t-32gbit/qla2x00-target/qla_tgt.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include <linux/delay.h>
#include <linux/list.h>
#include <linux/workqueue.h>
#include <asm/unaligned.h>
#include <scsi/scsi.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_tcq.h>
Expand Down
1 change: 0 additions & 1 deletion qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#include <linux/types.h>
#include <linux/delay.h>
#include <linux/list.h>
#include <asm/unaligned.h>
#include <linux/vmalloc.h>
#ifdef INSIDE_KERNEL_TREE
#include <scst/scst.h>
Expand Down
5 changes: 5 additions & 0 deletions qla2x00t-32gbit/qla_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0)
#include <linux/aer.h>
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0)
#include <asm/unaligned.h>
#else
#include <linux/unaligned.h>
#endif
#include <linux/mutex.h>
#include <linux/btree.h>
#include <linux/version.h>
Expand Down
7 changes: 7 additions & 0 deletions qla2x00t-32gbit/qla_dsd.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#ifndef _QLA_DSD_H_
#define _QLA_DSD_H_

#ifndef INSIDE_KERNEL_TREE
#include <linux/version.h>
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0)
#include <asm/unaligned.h>
#else
#include <linux/unaligned.h>
#endif

/* 32-bit data segment descriptor (8 bytes) */
struct dsd32 {
Expand Down
1 change: 0 additions & 1 deletion qla2x00t-32gbit/qla_target.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <linux/delay.h>
#include <linux/list.h>
#include <linux/workqueue.h>
#include <asm/unaligned.h>
#include <scsi/scsi.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_tcq.h>
Expand Down
2 changes: 0 additions & 2 deletions qla2x00t-32gbit/qla_target.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
#ifndef __QLA_TARGET_H
#define __QLA_TARGET_H

#include <linux/version.h>
#include <asm/unaligned.h>
#include "qla_def.h"
#include "qla_dsd.h"

Expand Down
1 change: 0 additions & 1 deletion qla2x00t/qla2x00-target/qla2x00t.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include <linux/delay.h>
#include <linux/list.h>
#include <linux/workqueue.h>
#include <asm/unaligned.h>

#ifdef INSIDE_KERNEL_TREE
#include <scst/scst.h>
Expand Down
6 changes: 5 additions & 1 deletion scst/include/backport.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@
#include <scsi/scsi_eh.h> /* scsi_build_sense_buffer() */
struct scsi_target;
#include <scsi/scsi_transport_fc.h> /* struct bsg_job */
#include <asm/unaligned.h> /* get_unaligned_be64() */
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0)
#include <asm/unaligned.h>
#else
#include <linux/unaligned.h>
#endif

/* <asm-generic/barrier.h> */

Expand Down
6 changes: 5 additions & 1 deletion scst/include/scst.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,14 @@
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
#include <linux/sched/signal.h>
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0)
#include <asm/unaligned.h>
#else
#include <linux/unaligned.h>
#endif
#include <linux/wait.h>
#include <linux/cpumask.h>
#include <linux/dlm.h>
#include <asm/unaligned.h>

#if 0 /* Let's disable it for now to see if users will complain about it */
#define CONFIG_SCST_PER_DEVICE_CMD_COUNT_LIMIT
Expand Down
1 change: 0 additions & 1 deletion scst/src/dev_handlers/scst_cdrom.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <linux/cdrom.h>
#include <scsi/scsi_host.h>
#include <linux/slab.h>
#include <asm/unaligned.h>

#define LOG_PREFIX "dev_cdrom"

Expand Down
1 change: 0 additions & 1 deletion scst/src/dev_handlers/scst_disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <linux/blkdev.h>
#include <scsi/scsi_host.h>
#include <linux/slab.h>
#include <asm/unaligned.h>

#define LOG_PREFIX "dev_disk"

Expand Down
1 change: 0 additions & 1 deletion scst/src/dev_handlers/scst_modisk.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <linux/init.h>
#include <scsi/scsi_host.h>
#include <linux/slab.h>
#include <asm/unaligned.h>

#define LOG_PREFIX "dev_modisk"

Expand Down
1 change: 0 additions & 1 deletion scst/src/dev_handlers/scst_tape.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <linux/init.h>
#include <scsi/scsi_host.h>
#include <linux/slab.h>
#include <asm/unaligned.h>

#define LOG_PREFIX "dev_tape"

Expand Down
1 change: 0 additions & 1 deletion scst/src/dev_handlers/scst_vdisk.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
#include <linux/delay.h>
#include <linux/namei.h>
#include <asm/div64.h>
#include <asm/unaligned.h>
#include <linux/slab.h>
#include <linux/bio.h>
#include <linux/crc32c.h>
Expand Down
2 changes: 0 additions & 2 deletions scst/src/scst_copy_mgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <linux/types.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <asm/unaligned.h>
#include <linux/delay.h>

#ifdef INSIDE_KERNEL_TREE
Expand Down Expand Up @@ -3898,4 +3897,3 @@ void __exit scst_cm_exit(void)
TRACE_EXIT();
return;
}

1 change: 0 additions & 1 deletion scst/src/scst_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include <linux/ctype.h>
#include <linux/delay.h>
#include <linux/vmalloc.h>
#include <asm/unaligned.h>
#include <asm/checksum.h>
#ifndef INSIDE_KERNEL_TREE
#include <linux/version.h>
Expand Down
1 change: 0 additions & 1 deletion scst/src/scst_pres.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
#include <linux/version.h>
#endif
#include <linux/vmalloc.h>
#include <asm/unaligned.h>

#ifdef INSIDE_KERNEL_TREE
#include <scst/scst.h>
Expand Down
1 change: 0 additions & 1 deletion scst/src/scst_tg.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <linux/moduleparam.h>
#include <linux/delay.h>
#include <linux/kmod.h>
#include <asm/unaligned.h>
#ifdef INSIDE_KERNEL_TREE
#include <scst/scst.h>
#include <scst/scst_event.h>
Expand Down

0 comments on commit 256d695

Please sign in to comment.