scst_local: Ported to kernel 2.6.37.

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3194 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2011-01-05 13:58:18 +00:00
parent 49d6385405
commit 2dce167153

View File

@@ -920,8 +920,8 @@ static int scst_local_send_resp(struct scsi_cmnd *cmnd,
* This does the heavy lifting ... we pass all the commands on to the
* target driver and have it do its magic ...
*/
static int scst_local_queuecommand(struct scsi_cmnd *SCpnt,
void (*done)(struct scsi_cmnd *))
static int scst_local_queuecommand_lck(struct scsi_cmnd *SCpnt,
void (*done)(struct scsi_cmnd *))
__acquires(&h->host_lock)
__releases(&h->host_lock)
{
@@ -956,7 +956,7 @@ static int scst_local_queuecommand(struct scsi_cmnd *SCpnt,
}
tgt_specific->cmnd = SCpnt;
tgt_specific->done = done;
#else
#elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37)
/*
* We save a pointer to the done routine in SCpnt->scsi_done and
* we save that as tgt specific stuff below.
@@ -1084,6 +1084,10 @@ static int scst_local_queuecommand(struct scsi_cmnd *SCpnt,
return 0;
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
static DEF_SCSI_QCMD(scst_local_queuecommand)
#endif
static int scst_local_targ_pre_exec(struct scst_cmd *scst_cmd)
{
int res = SCST_PREPROCESS_STATUS_SUCCESS;
@@ -1385,7 +1389,11 @@ static struct scsi_host_template scst_lcl_ini_driver_template = {
.info = scst_local_info,
#endif
.name = SCST_LOCAL_NAME,
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37)
.queuecommand = scst_local_queuecommand_lck,
#else
.queuecommand = scst_local_queuecommand,
#endif
.eh_abort_handler = scst_local_abort,
.eh_device_reset_handler = scst_local_device_reset,
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 25))