From 86fad676e9b54a2c04a64185e42adbbc97b68a4a Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 16 Jun 2019 21:07:17 +0000 Subject: [PATCH] scst: Fix build against Linux kernel v5.2 Reported-by: Sebastian Herbszt git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8426 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_targ.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index 0a6f91b95..7f1d830c8 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -6773,7 +6773,11 @@ out: static int scst_reset_scsi_target(struct scsi_device *sdev) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 2, 0) + /* To do: implement this functionality. */ + WARN_ON_ONCE(true); + return FAILED; +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) int arg = SG_SCSI_RESET_TARGET; return scsi_ioctl_reset(sdev, (__force __user int *)&arg); @@ -6786,7 +6790,11 @@ static int scst_reset_scsi_target(struct scsi_device *sdev) static int scst_reset_scsi_device(struct scsi_device *sdev) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 2, 0) + /* To do: implement this functionality. */ + WARN_ON_ONCE(true); + return FAILED; +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) int arg = SG_SCSI_RESET_DEVICE; return scsi_ioctl_reset(sdev, (__force __user int *)&arg);