|
From: <vl...@us...> - 2015-03-26 00:04:31
|
Revision: 6154
http://sourceforge.net/p/scst/svn/6154
Author: vlnb
Date: 2015-03-26 00:04:24 +0000 (Thu, 26 Mar 2015)
Log Message:
-----------
scst: Kernel 3.19 build fix
Signed-off-by: Bart Van Assche <bar...@sa...>
Modified Paths:
--------------
trunk/scst/src/scst_targ.c
Modified: trunk/scst/src/scst_targ.c
===================================================================
--- trunk/scst/src/scst_targ.c 2015-03-26 00:02:19 UTC (rev 6153)
+++ trunk/scst/src/scst_targ.c 2015-03-26 00:04:24 UTC (rev 6154)
@@ -29,6 +29,7 @@
#include <linux/kthread.h>
#include <linux/delay.h>
#include <linux/ktime.h>
+#include <scsi/sg.h>
#ifdef INSIDE_KERNEL_TREE
#include <scst/scst.h>
@@ -5960,7 +5961,14 @@
/* dev->scsi_dev must be non-NULL here */
TRACE(TRACE_MGMT, "Resetting host %d bus ",
dev->scsi_dev->host->host_no);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
+ {
+ int arg = SG_SCSI_RESET_TARGET;
+
+ rc = scsi_ioctl_reset(dev->scsi_dev,
+ (__force __user int *)&arg);
+ }
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
rc = scsi_reset_provider(dev->scsi_dev, SCSI_TRY_RESET_TARGET);
#else
rc = scsi_reset_provider(dev->scsi_dev, SCSI_TRY_RESET_BUS);
@@ -6023,7 +6031,16 @@
if (dev->scsi_dev != NULL) {
TRACE(TRACE_MGMT, "Resetting host %d bus ",
dev->scsi_dev->host->host_no);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
+ {
+ int arg = SG_SCSI_RESET_DEVICE;
+
+ rc = scsi_ioctl_reset(dev->scsi_dev,
+ (__force __user int *)&arg);
+ }
+#else
rc = scsi_reset_provider(dev->scsi_dev, SCSI_TRY_RESET_DEVICE);
+#endif
TRACE(TRACE_MGMT, "scsi_reset_provider(%s) returned %d",
dev->virt_name, rc);
#if 0
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|