scst: Kernel 3.19 build fix

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6154 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2015-03-26 00:04:24 +00:00
parent ea60935622
commit 65f1c58e28

View File

@@ -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 @@ static int scst_target_reset(struct scst_mgmt_cmd *mcmd)
/* 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 @@ static int scst_lun_reset(struct scst_mgmt_cmd *mcmd)
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