diff --git a/scst/include/backport.h b/scst/include/backport.h index d58fe830c..93c049f3b 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -134,6 +134,15 @@ static inline void bio_set_dev(struct bio *bio, struct block_device *bdev) #define BIO_MAX_VECS BIO_MAX_PAGES #endif +/* */ + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0) +enum { + REQ_OP_SCSI_IN = REQ_OP_DRV_IN, + REQ_OP_SCSI_OUT = REQ_OP_DRV_OUT, +}; +#endif + /* */ static inline unsigned int scst_blk_rq_cpu(struct request *rq) diff --git a/scst/kernel/in-tree/Kconfig.drivers.Linux.patch b/scst/kernel/in-tree/Kconfig.drivers.Linux.patch index 0d5a19f0f..347bf5d99 100644 --- a/scst/kernel/in-tree/Kconfig.drivers.Linux.patch +++ b/scst/kernel/in-tree/Kconfig.drivers.Linux.patch @@ -1,13 +1,13 @@ diff --git a/drivers/Kconfig b/drivers/Kconfig -index aa43b91..c96860e 100644 +index 8bad63417a50..a61b1804fcf3 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig -@@ -24,6 +24,8 @@ source "drivers/ide/Kconfig" +@@ -39,6 +39,8 @@ source "drivers/ata/Kconfig" - source "drivers/scsi/Kconfig" + source "drivers/md/Kconfig" +source "drivers/scst/Kconfig" + - source "drivers/ata/Kconfig" + source "drivers/target/Kconfig" - source "drivers/md/Kconfig" + source "drivers/message/fusion/Kconfig" diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux.patch b/scst/kernel/in-tree/Makefile.drivers.Linux.patch index e02741144..4dbb006ce 100644 --- a/scst/kernel/in-tree/Makefile.drivers.Linux.patch +++ b/scst/kernel/in-tree/Makefile.drivers.Linux.patch @@ -1,12 +1,12 @@ diff --git a/drivers/Makefile b/drivers/Makefile -index 31cf17dee252..b45c17aee468 100644 +index 27c018bdf4de..6fc8c24fd0d6 100644 --- a/drivers/Makefile +++ b/drivers/Makefile -@@ -75,6 +75,7 @@ obj-$(CONFIG_DAX) += dax/ - obj-$(CONFIG_DMA_SHARED_BUFFER) += dma-buf/ - obj-$(CONFIG_NUBUS) += nubus/ - obj-y += macintosh/ -+obj-$(CONFIG_SCST) += scst/ - obj-$(CONFIG_IDE) += ide/ +@@ -81,6 +81,7 @@ obj-y += macintosh/ obj-y += scsi/ obj-y += nvme/ + obj-$(CONFIG_ATA) += ata/ ++obj-$(CONFIG_SCST) += scst/ + obj-$(CONFIG_TARGET_CORE) += target/ + obj-$(CONFIG_MTD) += mtd/ + obj-$(CONFIG_SPI) += spi/ diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 91a6f8f0e..302f97e0a 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -13849,9 +13849,11 @@ int scst_obtain_device_parameters(struct scst_device *dev, goto brk; } switch (driver_byte(rc)) { +#if defined(DRIVER_BUSY) && defined(DRIVER_SOFT) case DRIVER_BUSY: case DRIVER_SOFT: break; +#endif default: goto brk; }