summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2011-01-19 23:25:15 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2011-01-19 23:25:15 +0000
commitcceedc4060ff2a4de85be80c2798b86cb0fd65d0 (patch)
treee4967dc482a5d397a73fdf2a0edf3363fe9d7379
parent5d92460f48e46cc02089369918bba3a9c74b2e57 (diff)
downloadaports-cceedc4060ff2a4de85be80c2798b86cb0fd65d0.tar.bz2
aports-cceedc4060ff2a4de85be80c2798b86cb0fd65d0.tar.xz
testing/linux-scst: update to latest 2.0.0 branch
SCST is updated to v2.0.1
-rw-r--r--testing/linux-scst/APKBUILD4
-rw-r--r--testing/linux-scst/scst-2.6.36-2.0.0.patch1440
2 files changed, 814 insertions, 630 deletions
diff --git a/testing/linux-scst/APKBUILD b/testing/linux-scst/APKBUILD
index ece8b8295..2fc57de4a 100644
--- a/testing/linux-scst/APKBUILD
+++ b/testing/linux-scst/APKBUILD
@@ -4,7 +4,7 @@ _flavor=scst
pkgname=linux-${_flavor}
pkgver=2.6.36.2
_kernver=2.6.36
-pkgrel=0
+pkgrel=1
pkgdesc="Linux kernel optimised for scst"
url="http://scst.sourceforge.net"
depends="mkinitfs linux-firmware"
@@ -143,6 +143,6 @@ firmware() {
md5sums="61f3739a73afb6914cb007f37fb09b62 linux-2.6.36.tar.bz2
4b01c5f9657a9587b262df5f8d784116 patch-2.6.36.2.bz2
3d93fd576b38ac5f68ceac44c65df380 kernelconfig.x86_64
-28c61abeb4932f32c9c5d2f069312148 scst-2.6.36-2.0.0.patch
+e1609bfe50cfa7a0e4be2bfda972e404 scst-2.6.36-2.0.0.patch
fec281a4e03fed560ce309ad8fc5a592 unionfs-2.5.7_for_2.6.36.diff
776adeeb5272093574f8836c5037dd7d 0004-arp-flush-arp-cache-on-device-change.patch"
diff --git a/testing/linux-scst/scst-2.6.36-2.0.0.patch b/testing/linux-scst/scst-2.6.36-2.0.0.patch
index f482ae59e..89c6127ab 100644
--- a/testing/linux-scst/scst-2.6.36-2.0.0.patch
+++ b/testing/linux-scst/scst-2.6.36-2.0.0.patch
@@ -912,432 +912,17 @@ diff -upkr linux-2.6.36/net/Kconfig linux-2.6.36/net/Kconfig
if INET
source "net/ipv4/Kconfig"
source "net/ipv6/Kconfig"
-diff -uprN orig/linux-2.6.36/include/scst/scst_const.h linux-2.6.36/include/scst/scst_const.h
---- orig/linux-2.6.36/include/scst/scst_const.h
-+++ linux-2.6.36/include/scst/scst_const.h
-@@ -0,0 +1,412 @@
-+/*
-+ * include/scst_const.h
-+ *
-+ * Copyright (C) 2004 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
-+ * Copyright (C) 2007 - 2010 ID7 Ltd.
-+ *
-+ * Contains common SCST constants.
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * as published by the Free Software Foundation, version 2
-+ * of the License.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ */
-+
-+#ifndef __SCST_CONST_H
-+#define __SCST_CONST_H
-+
-+#ifndef GENERATING_UPSTREAM_PATCH
-+/*
-+ * Include <linux/version.h> only when not converting this header file into
-+ * a patch for upstream review because only then the symbol LINUX_VERSION_CODE
-+ * is needed.
-+ */
-+#include <linux/version.h>
-+#endif
-+#include <scsi/scsi.h>
-+
-+#define SCST_CONST_VERSION "$Revision: 2605 $"
-+
-+/*** Shared constants between user and kernel spaces ***/
-+
-+/* Max size of CDB */
-+#define SCST_MAX_CDB_SIZE 16
-+
-+/* Max size of various names */
-+#define SCST_MAX_NAME 50
-+
-+/* Max size of external names, like initiator name */
-+#define SCST_MAX_EXTERNAL_NAME 256
-+
-+/*
-+ * Size of sense sufficient to carry standard sense data.
-+ * Warning! It's allocated on stack!
-+ */
-+#define SCST_STANDARD_SENSE_LEN 18
-+
-+/* Max size of sense */
-+#define SCST_SENSE_BUFFERSIZE 96
-+
-+/*************************************************************
-+ ** Allowed delivery statuses for cmd's delivery_status
-+ *************************************************************/
-+
-+#define SCST_CMD_DELIVERY_SUCCESS 0
-+#define SCST_CMD_DELIVERY_FAILED -1
-+#define SCST_CMD_DELIVERY_ABORTED -2
-+
-+/*************************************************************
-+ ** Values for task management functions
-+ *************************************************************/
-+#define SCST_ABORT_TASK 0
-+#define SCST_ABORT_TASK_SET 1
-+#define SCST_CLEAR_ACA 2
-+#define SCST_CLEAR_TASK_SET 3
-+#define SCST_LUN_RESET 4
-+#define SCST_TARGET_RESET 5
-+
-+/** SCST extensions **/
-+
-+/*
-+ * Notifies about I_T nexus loss event in the corresponding session.
-+ * Aborts all tasks there, resets the reservation, if any, and sets
-+ * up the I_T Nexus loss UA.
-+ */
-+#define SCST_NEXUS_LOSS_SESS 6
-+
-+/* Aborts all tasks in the corresponding session */
-+#define SCST_ABORT_ALL_TASKS_SESS 7
-+
-+/*
-+ * Notifies about I_T nexus loss event. Aborts all tasks in all sessions
-+ * of the tgt, resets the reservations, if any, and sets up the I_T Nexus
-+ * loss UA.
-+ */
-+#define SCST_NEXUS_LOSS 8
-+
-+/* Aborts all tasks in all sessions of the tgt */
-+#define SCST_ABORT_ALL_TASKS 9
-+
-+/*
-+ * Internal TM command issued by SCST in scst_unregister_session(). It is the
-+ * same as SCST_NEXUS_LOSS_SESS, except:
-+ * - it doesn't call task_mgmt_affected_cmds_done()
-+ * - it doesn't call task_mgmt_fn_done()
-+ * - it doesn't queue NEXUS LOSS UA.
-+ *
-+ * Target drivers must NEVER use it!!
-+ */
-+#define SCST_UNREG_SESS_TM 10
-+
-+/*
-+ * Internal TM command issued by SCST in scst_pr_abort_reg(). It aborts all
-+ * tasks from mcmd->origin_pr_cmd->tgt_dev, except mcmd->origin_pr_cmd.
-+ * Additionally:
-+ * - it signals pr_aborting_cmpl completion when all affected
-+ * commands marked as aborted.
-+ * - it doesn't call task_mgmt_affected_cmds_done()
-+ * - it doesn't call task_mgmt_fn_done()
-+ * - it calls mcmd->origin_pr_cmd->scst_cmd_done() when all affected
-+ * commands aborted.
-+ *
-+ * Target drivers must NEVER use it!!
-+ */
-+#define SCST_PR_ABORT_ALL 11
-+
-+/*************************************************************
-+ ** Values for mgmt cmd's status field. Codes taken from iSCSI
-+ *************************************************************/
-+#define SCST_MGMT_STATUS_SUCCESS 0
-+#define SCST_MGMT_STATUS_TASK_NOT_EXIST -1
-+#define SCST_MGMT_STATUS_LUN_NOT_EXIST -2
-+#define SCST_MGMT_STATUS_FN_NOT_SUPPORTED -5
-+#define SCST_MGMT_STATUS_REJECTED -255
-+#define SCST_MGMT_STATUS_FAILED -129
-+
-+/*************************************************************
-+ ** SCSI task attribute queue types
-+ *************************************************************/
-+enum scst_cmd_queue_type {
-+ SCST_CMD_QUEUE_UNTAGGED = 0,
-+ SCST_CMD_QUEUE_SIMPLE,
-+ SCST_CMD_QUEUE_ORDERED,
-+ SCST_CMD_QUEUE_HEAD_OF_QUEUE,
-+ SCST_CMD_QUEUE_ACA
-+};
-+
-+/*************************************************************
-+ ** CDB flags
-+ **
-+ ** Implicit ordered used for commands which need calm environment
-+ ** without any simultaneous activities. For instance, for MODE
-+ ** SELECT it is needed to correctly generate its UA.
-+ *************************************************************/
-+enum scst_cdb_flags {
-+ SCST_TRANSFER_LEN_TYPE_FIXED = 0x0001,
-+ SCST_SMALL_TIMEOUT = 0x0002,
-+ SCST_LONG_TIMEOUT = 0x0004,
-+ SCST_UNKNOWN_LENGTH = 0x0008,
-+ SCST_INFO_VALID = 0x0010, /* must be single bit */
-+ SCST_VERIFY_BYTCHK_MISMATCH_ALLOWED = 0x0020,
-+ SCST_IMPLICIT_HQ = 0x0040,
-+ SCST_IMPLICIT_ORDERED = 0x0080, /* ToDo: remove it's nonsense */
-+ SCST_SKIP_UA = 0x0100,
-+ SCST_WRITE_MEDIUM = 0x0200,
-+ SCST_LOCAL_CMD = 0x0400,
-+ SCST_FULLY_LOCAL_CMD = 0x0800,
-+ SCST_REG_RESERVE_ALLOWED = 0x1000,
-+ SCST_WRITE_EXCL_ALLOWED = 0x2000,
-+ SCST_EXCL_ACCESS_ALLOWED = 0x4000,
-+#ifdef CONFIG_SCST_TEST_IO_IN_SIRQ
-+ SCST_TEST_IO_IN_SIRQ_ALLOWED = 0x8000,
-+#endif
-+};
-+
-+/*************************************************************
-+ ** Data direction aliases. Changing it don't forget to change
-+ ** scst_to_tgt_dma_dir as well!!
-+ *************************************************************/
-+#define SCST_DATA_UNKNOWN 0
-+#define SCST_DATA_WRITE 1
-+#define SCST_DATA_READ 2
-+#define SCST_DATA_BIDI (SCST_DATA_WRITE | SCST_DATA_READ)
-+#define SCST_DATA_NONE 4
-+
-+/*************************************************************
-+ ** Default suffix for targets with NULL names
-+ *************************************************************/
-+#define SCST_DEFAULT_TGT_NAME_SUFFIX "_target_"
-+
-+/*************************************************************
-+ ** Sense manipulation and examination
-+ *************************************************************/
-+#define SCST_LOAD_SENSE(key_asc_ascq) key_asc_ascq
-+
-+#define SCST_SENSE_VALID(sense) ((sense != NULL) && \
-+ ((((const uint8_t *)(sense))[0] & 0x70) == 0x70))
-+
-+#define SCST_NO_SENSE(sense) ((sense != NULL) && \
-+ (((const uint8_t *)(sense))[2] == 0))
-+
-+/*************************************************************
-+ ** Sense data for the appropriate errors. Can be used with
-+ ** scst_set_cmd_error()
-+ *************************************************************/
-+#define scst_sense_no_sense NO_SENSE, 0x00, 0
-+#define scst_sense_hardw_error HARDWARE_ERROR, 0x44, 0
-+#define scst_sense_aborted_command ABORTED_COMMAND, 0x00, 0
-+#define scst_sense_invalid_opcode ILLEGAL_REQUEST, 0x20, 0
-+#define scst_sense_invalid_field_in_cdb ILLEGAL_REQUEST, 0x24, 0
-+#define scst_sense_invalid_field_in_parm_list ILLEGAL_REQUEST, 0x26, 0
-+#define scst_sense_parameter_value_invalid ILLEGAL_REQUEST, 0x26, 2
-+#define scst_sense_invalid_release ILLEGAL_REQUEST, 0x26, 4
-+#define scst_sense_parameter_list_length_invalid \
-+ ILLEGAL_REQUEST, 0x1A, 0
-+#define scst_sense_reset_UA UNIT_ATTENTION, 0x29, 0
-+#define scst_sense_nexus_loss_UA UNIT_ATTENTION, 0x29, 0x7
-+#define scst_sense_saving_params_unsup ILLEGAL_REQUEST, 0x39, 0
-+#define scst_sense_lun_not_supported ILLEGAL_REQUEST, 0x25, 0
-+#define scst_sense_data_protect DATA_PROTECT, 0x00, 0
-+#define scst_sense_miscompare_error MISCOMPARE, 0x1D, 0
-+#define scst_sense_block_out_range_error ILLEGAL_REQUEST, 0x21, 0
-+#define scst_sense_medium_changed_UA UNIT_ATTENTION, 0x28, 0
-+#define scst_sense_read_error MEDIUM_ERROR, 0x11, 0
-+#define scst_sense_write_error MEDIUM_ERROR, 0x03, 0
-+#define scst_sense_not_ready NOT_READY, 0x04, 0x10
-+#define scst_sense_invalid_message ILLEGAL_REQUEST, 0x49, 0
-+#define scst_sense_cleared_by_another_ini_UA UNIT_ATTENTION, 0x2F, 0
-+#define scst_sense_capacity_data_changed UNIT_ATTENTION, 0x2A, 0x9
-+#define scst_sense_reservation_preempted UNIT_ATTENTION, 0x2A, 0x03
-+#define scst_sense_reservation_released UNIT_ATTENTION, 0x2A, 0x04
-+#define scst_sense_registrations_preempted UNIT_ATTENTION, 0x2A, 0x05
-+#define scst_sense_reported_luns_data_changed UNIT_ATTENTION, 0x3F, 0xE
-+#define scst_sense_inquery_data_changed UNIT_ATTENTION, 0x3F, 0x3
-+
-+/*************************************************************
-+ * SCSI opcodes not listed anywhere else
-+ *************************************************************/
-+#define REPORT_DEVICE_IDENTIFIER 0xA3
-+#define INIT_ELEMENT_STATUS 0x07
-+#define INIT_ELEMENT_STATUS_RANGE 0x37
-+#define PREVENT_ALLOW_MEDIUM 0x1E
-+#define READ_ATTRIBUTE 0x8C
-+#define REQUEST_VOLUME_ADDRESS 0xB5
-+#define WRITE_ATTRIBUTE 0x8D
-+#define WRITE_VERIFY_16 0x8E
-+#define VERIFY_6 0x13
-+#ifndef VERIFY_12
-+#define VERIFY_12 0xAF
-+#endif
-+#ifndef GENERATING_UPSTREAM_PATCH
-+/*
-+ * The constants below have been defined in the kernel header <scsi/scsi.h>
-+ * and hence are not needed when this header file is included in kernel code.
-+ * The definitions below are only used when this header file is included during
-+ * compilation of SCST's user space components.
-+ */
-+#ifndef READ_16
-+#define READ_16 0x88
-+#endif
-+#ifndef WRITE_16
-+#define WRITE_16 0x8a
-+#endif
-+#ifndef VERIFY_16
-+#define VERIFY_16 0x8f
-+#endif
-+#ifndef SERVICE_ACTION_IN
-+#define SERVICE_ACTION_IN 0x9e
-+#endif
-+#ifndef SAI_READ_CAPACITY_16
-+/* values for service action in */
-+#define SAI_READ_CAPACITY_16 0x10
-+#endif
-+#endif
-+#ifndef GENERATING_UPSTREAM_PATCH
-+#ifndef REPORT_LUNS
-+#define REPORT_LUNS 0xa0
-+#endif
-+#endif
-+
-+/*************************************************************
-+ ** SCSI Architecture Model (SAM) Status codes. Taken from SAM-3 draft
-+ ** T10/1561-D Revision 4 Draft dated 7th November 2002.
-+ *************************************************************/
-+#define SAM_STAT_GOOD 0x00
-+#define SAM_STAT_CHECK_CONDITION 0x02
-+#define SAM_STAT_CONDITION_MET 0x04
-+#define SAM_STAT_BUSY 0x08
-+#define SAM_STAT_INTERMEDIATE 0x10
-+#define SAM_STAT_INTERMEDIATE_CONDITION_MET 0x14
-+#define SAM_STAT_RESERVATION_CONFLICT 0x18
-+#define SAM_STAT_COMMAND_TERMINATED 0x22 /* obsolete in SAM-3 */
-+#define SAM_STAT_TASK_SET_FULL 0x28
-+#define SAM_STAT_ACA_ACTIVE 0x30
-+#define SAM_STAT_TASK_ABORTED 0x40
-+
-+/*************************************************************
-+ ** Control byte field in CDB
-+ *************************************************************/
-+#define CONTROL_BYTE_LINK_BIT 0x01
-+#define CONTROL_BYTE_NACA_BIT 0x04
-+
-+/*************************************************************
-+ ** Byte 1 in INQUIRY CDB
-+ *************************************************************/
-+#define SCST_INQ_EVPD 0x01
-+
-+/*************************************************************
-+ ** Byte 3 in Standard INQUIRY data
-+ *************************************************************/
-+#define SCST_INQ_BYTE3 3
-+
-+#define SCST_INQ_NORMACA_BIT 0x20
-+
-+/*************************************************************
-+ ** Byte 2 in RESERVE_10 CDB
-+ *************************************************************/
-+#define SCST_RES_3RDPTY 0x10
-+#define SCST_RES_LONGID 0x02
-+
-+/*************************************************************
-+ ** Values for the control mode page TST field
-+ *************************************************************/
-+#define SCST_CONTR_MODE_ONE_TASK_SET 0
-+#define SCST_CONTR_MODE_SEP_TASK_SETS 1
-+
-+/*******************************************************************
-+ ** Values for the control mode page QUEUE ALGORITHM MODIFIER field
-+ *******************************************************************/
-+#define SCST_CONTR_MODE_QUEUE_ALG_RESTRICTED_REORDER 0
-+#define SCST_CONTR_MODE_QUEUE_ALG_UNRESTRICTED_REORDER 1
-+
-+/*************************************************************
-+ ** Values for the control mode page D_SENSE field
-+ *************************************************************/
-+#define SCST_CONTR_MODE_FIXED_SENSE 0
-+#define SCST_CONTR_MODE_DESCR_SENSE 1
-+
-+/*************************************************************
-+ ** TransportID protocol identifiers
-+ *************************************************************/
-+
-+#define SCSI_TRANSPORTID_PROTOCOLID_FCP2 0
-+#define SCSI_TRANSPORTID_PROTOCOLID_SPI5 1
-+#define SCSI_TRANSPORTID_PROTOCOLID_SRP 4
-+#define SCSI_TRANSPORTID_PROTOCOLID_ISCSI 5
-+#define SCSI_TRANSPORTID_PROTOCOLID_SAS 6
-+
-+/*************************************************************
-+ ** Misc SCSI constants
-+ *************************************************************/
-+#define SCST_SENSE_ASC_UA_RESET 0x29
-+#define BYTCHK 0x02
-+#define POSITION_LEN_SHORT 20
-+#define POSITION_LEN_LONG 32
-+
-+/*************************************************************
-+ ** Various timeouts
-+ *************************************************************/
-+#define SCST_DEFAULT_TIMEOUT (60 * HZ)
-+
-+#define SCST_GENERIC_CHANGER_TIMEOUT (3 * HZ)
-+#define SCST_GENERIC_CHANGER_LONG_TIMEOUT (14000 * HZ)
-+
-+#define SCST_GENERIC_PROCESSOR_TIMEOUT (3 * HZ)
-+#define SCST_GENERIC_PROCESSOR_LONG_TIMEOUT (14000 * HZ)
-+
-+#define SCST_GENERIC_TAPE_SMALL_TIMEOUT (3 * HZ)
-+#define SCST_GENERIC_TAPE_REG_TIMEOUT (900 * HZ)
-+#define SCST_GENERIC_TAPE_LONG_TIMEOUT (14000 * HZ)
-+
-+#define SCST_GENERIC_MODISK_SMALL_TIMEOUT (3 * HZ)
-+#define SCST_GENERIC_MODISK_REG_TIMEOUT (900 * HZ)
-+#define SCST_GENERIC_MODISK_LONG_TIMEOUT (14000 * HZ)
-+
-+#define SCST_GENERIC_DISK_SMALL_TIMEOUT (3 * HZ)
-+#define SCST_GENERIC_DISK_REG_TIMEOUT (60 * HZ)
-+#define SCST_GENERIC_DISK_LONG_TIMEOUT (3600 * HZ)
-+
-+#define SCST_GENERIC_RAID_TIMEOUT (3 * HZ)
-+#define SCST_GENERIC_RAID_LONG_TIMEOUT (14000 * HZ)
-+
-+#define SCST_GENERIC_CDROM_SMALL_TIMEOUT (3 * HZ)
-+#define SCST_GENERIC_CDROM_REG_TIMEOUT (900 * HZ)
-+#define SCST_GENERIC_CDROM_LONG_TIMEOUT (14000 * HZ)
-+
-+#define SCST_MAX_OTHER_TIMEOUT (14000 * HZ)
-+
-+/*************************************************************
-+ ** I/O grouping attribute string values. Must match constants
-+ ** w/o '_STR' suffix!
-+ *************************************************************/
-+#define SCST_IO_GROUPING_AUTO_STR "auto"
-+#define SCST_IO_GROUPING_THIS_GROUP_ONLY_STR "this_group_only"
-+#define SCST_IO_GROUPING_NEVER_STR "never"
-+
-+/*************************************************************
-+ ** Threads pool type attribute string values.
-+ ** Must match scst_dev_type_threads_pool_type!
-+ *************************************************************/
-+#define SCST_THREADS_POOL_PER_INITIATOR_STR "per_initiator"
-+#define SCST_THREADS_POOL_SHARED_STR "shared"
-+
-+/*************************************************************
-+ ** Misc constants
-+ *************************************************************/
-+#define SCST_SYSFS_BLOCK_SIZE PAGE_SIZE
-+
-+#define SCST_PR_DIR "/var/lib/scst/pr"
-+
-+#define TID_COMMON_SIZE 24
-+
-+#define SCST_SYSFS_KEY_MARK "[key]"
-+
-+#define SCST_MIN_REL_TGT_ID 1
-+#define SCST_MAX_REL_TGT_ID 65535
-+
-+#endif /* __SCST_CONST_H */
diff -uprN orig/linux-2.6.36/include/scst/scst.h linux-2.6.36/include/scst/scst.h
--- orig/linux-2.6.36/include/scst/scst.h
+++ linux-2.6.36/include/scst/scst.h
-@@ -0,0 +1,3511 @@
+@@ -0,0 +1,3524 @@
+/*
+ * include/scst.h
+ *
-+ * Copyright (C) 2004 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2004 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ * Copyright (C) 2004 - 2005 Leonid Stoljar
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * Main SCSI target mid-level include file.
+ *
@@ -1379,11 +964,11 @@ diff -uprN orig/linux-2.6.36/include/scst/scst.h linux-2.6.36/include/scst/scst.
+ * and FIO_REV in usr/fileio/common.h as well.
+ */
+#define SCST_VERSION(a, b, c, d) (((a) << 24) + ((b) << 16) + ((c) << 8) + d)
-+#define SCST_VERSION_CODE SCST_VERSION(2, 0, 0, 0)
++#define SCST_VERSION_CODE SCST_VERSION(2, 0, 0, 1)
+#define SCST_VERSION_STRING_SUFFIX
-+#define SCST_VERSION_STRING "2.0.0" SCST_VERSION_STRING_SUFFIX
++#define SCST_VERSION_STRING "2.0.0.2-rc1" SCST_VERSION_STRING_SUFFIX
+#define SCST_INTERFACE_VERSION \
-+ SCST_VERSION_STRING "$Revision: 3165 $" SCST_CONST_VERSION
++ SCST_VERSION_STRING "$Revision: 3221 $" SCST_CONST_VERSION
+
+#define SCST_LOCAL_NAME "scst_local"
+
@@ -3891,25 +3476,37 @@ diff -uprN orig/linux-2.6.36/include/scst/scst.h linux-2.6.36/include/scst/scst.
+ return cmd->completed || test_bit(SCST_CMD_ABORTED, &cmd->cmd_flags);
+}
+
-+static inline enum scst_exec_context __scst_estimate_context(bool direct)
++static inline enum scst_exec_context __scst_estimate_context(bool atomic)
+{
+ if (in_irq())
+ return SCST_CONTEXT_TASKLET;
++/*
++ * We come here from many non reliable places, like the block layer, and don't
++ * have any reliable way to detect if we called under atomic context or not
++ * (in_atomic() isn't reliable), so let's be safe and disable this section
++ * for now to unconditionally return thread context.
++ */
++#if 0
+ else if (irqs_disabled())
+ return SCST_CONTEXT_THREAD;
++ else if (in_atomic())
++ return SCST_CONTEXT_DIRECT_ATOMIC;
+ else
-+ return direct ? SCST_CONTEXT_DIRECT :
++ return atomic ? SCST_CONTEXT_DIRECT :
+ SCST_CONTEXT_DIRECT_ATOMIC;
++#else
++ return SCST_CONTEXT_THREAD;
++#endif
+}
+
+static inline enum scst_exec_context scst_estimate_context(void)
+{
-+ return __scst_estimate_context(0);
++ return __scst_estimate_context(false);
+}
+
-+static inline enum scst_exec_context scst_estimate_context_direct(void)
++static inline enum scst_exec_context scst_estimate_context_atomic(void)
+{
-+ return __scst_estimate_context(1);
++ return __scst_estimate_context(true);
+}
+
+/* Returns cmd's CDB */
@@ -4843,6 +4440,423 @@ diff -uprN orig/linux-2.6.36/include/scst/scst.h linux-2.6.36/include/scst/scst.
+void scst_deinit_threads(struct scst_cmd_threads *cmd_threads);
+
+#endif /* __SCST_H */
+diff -uprN orig/linux-2.6.36/include/scst/scst_const.h linux-2.6.36/include/scst/scst_const.h
+--- orig/linux-2.6.36/include/scst/scst_const.h
++++ linux-2.6.36/include/scst/scst_const.h
+@@ -0,0 +1,413 @@
++/*
++ * include/scst_const.h
++ *
++ * Copyright (C) 2004 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
++ *
++ * Contains common SCST constants.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation, version 2
++ * of the License.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ */
++
++#ifndef __SCST_CONST_H
++#define __SCST_CONST_H
++
++#ifndef GENERATING_UPSTREAM_PATCH
++/*
++ * Include <linux/version.h> only when not converting this header file into
++ * a patch for upstream review because only then the symbol LINUX_VERSION_CODE
++ * is needed.
++ */
++#include <linux/version.h>
++#endif
++#include <scsi/scsi.h>
++
++#define SCST_CONST_VERSION "$Revision: 3201 $"
++
++/*** Shared constants between user and kernel spaces ***/
++
++/* Max size of CDB */
++#define SCST_MAX_CDB_SIZE 16
++
++/* Max size of various names */
++#define SCST_MAX_NAME 50
++
++/* Max size of external names, like initiator name */
++#define SCST_MAX_EXTERNAL_NAME 256
++
++/*
++ * Size of sense sufficient to carry standard sense data.
++ * Warning! It's allocated on stack!
++ */
++#define SCST_STANDARD_SENSE_LEN 18
++
++/* Max size of sense */
++#define SCST_SENSE_BUFFERSIZE 96
++
++/*************************************************************
++ ** Allowed delivery statuses for cmd's delivery_status
++ *************************************************************/
++
++#define SCST_CMD_DELIVERY_SUCCESS 0
++#define SCST_CMD_DELIVERY_FAILED -1
++#define SCST_CMD_DELIVERY_ABORTED -2
++
++/*************************************************************
++ ** Values for task management functions
++ *************************************************************/
++#define SCST_ABORT_TASK 0
++#define SCST_ABORT_TASK_SET 1
++#define SCST_CLEAR_ACA 2
++#define SCST_CLEAR_TASK_SET 3
++#define SCST_LUN_RESET 4
++#define SCST_TARGET_RESET 5
++
++/** SCST extensions **/
++
++/*
++ * Notifies about I_T nexus loss event in the corresponding session.
++ * Aborts all tasks there, resets the reservation, if any, and sets
++ * up the I_T Nexus loss UA.
++ */
++#define SCST_NEXUS_LOSS_SESS 6
++
++/* Aborts all tasks in the corresponding session */
++#define SCST_ABORT_ALL_TASKS_SESS 7
++
++/*
++ * Notifies about I_T nexus loss event. Aborts all tasks in all sessions
++ * of the tgt, resets the reservations, if any, and sets up the I_T Nexus
++ * loss UA.
++ */
++#define SCST_NEXUS_LOSS 8
++
++/* Aborts all tasks in all sessions of the tgt */
++#define SCST_ABORT_ALL_TASKS 9
++
++/*
++ * Internal TM command issued by SCST in scst_unregister_session(). It is the
++ * same as SCST_NEXUS_LOSS_SESS, except:
++ * - it doesn't call task_mgmt_affected_cmds_done()
++ * - it doesn't call task_mgmt_fn_done()
++ * - it doesn't queue NEXUS LOSS UA.
++ *
++ * Target drivers must NEVER use it!!
++ */
++#define SCST_UNREG_SESS_TM 10
++
++/*
++ * Internal TM command issued by SCST in scst_pr_abort_reg(). It aborts all
++ * tasks from mcmd->origin_pr_cmd->tgt_dev, except mcmd->origin_pr_cmd.
++ * Additionally:
++ * - it signals pr_aborting_cmpl completion when all affected
++ * commands marked as aborted.
++ * - it doesn't call task_mgmt_affected_cmds_done()
++ * - it doesn't call task_mgmt_fn_done()
++ * - it calls mcmd->origin_pr_cmd->scst_cmd_done() when all affected
++ * commands aborted.
++ *
++ * Target drivers must NEVER use it!!
++ */
++#define SCST_PR_ABORT_ALL 11
++
++/*************************************************************
++ ** Values for mgmt cmd's status field. Codes taken from iSCSI
++ *************************************************************/
++#define SCST_MGMT_STATUS_SUCCESS 0
++#define SCST_MGMT_STATUS_TASK_NOT_EXIST -1
++#define SCST_MGMT_STATUS_LUN_NOT_EXIST -2
++#define SCST_MGMT_STATUS_FN_NOT_SUPPORTED -5
++#define SCST_MGMT_STATUS_REJECTED -255
++#define SCST_MGMT_STATUS_FAILED -129
++
++/*************************************************************
++ ** SCSI task attribute queue types
++ *************************************************************/
++enum scst_cmd_queue_type {
++ SCST_CMD_QUEUE_UNTAGGED = 0,
++ SCST_CMD_QUEUE_SIMPLE,
++ SCST_CMD_QUEUE_ORDERED,
++ SCST_CMD_QUEUE_HEAD_OF_QUEUE,
++ SCST_CMD_QUEUE_ACA
++};
++
++/*************************************************************
++ ** CDB flags
++ **
++ ** Implicit ordered used for commands which need calm environment
++ ** without any simultaneous activities. For instance, for MODE
++ ** SELECT it is needed to correctly generate its UA.
++ *************************************************************/
++enum scst_cdb_flags {
++ SCST_TRANSFER_LEN_TYPE_FIXED = 0x0001,
++ SCST_SMALL_TIMEOUT = 0x0002,
++ SCST_LONG_TIMEOUT = 0x0004,
++ SCST_UNKNOWN_LENGTH = 0x0008,
++ SCST_INFO_VALID = 0x0010, /* must be single bit */
++ SCST_VERIFY_BYTCHK_MISMATCH_ALLOWED = 0x0020,
++ SCST_IMPLICIT_HQ = 0x0040,
++ SCST_IMPLICIT_ORDERED = 0x0080, /* ToDo: remove it's nonsense */
++ SCST_SKIP_UA = 0x0100,
++ SCST_WRITE_MEDIUM = 0x0200,
++ SCST_LOCAL_CMD = 0x0400,
++ SCST_FULLY_LOCAL_CMD = 0x0800,
++ SCST_REG_RESERVE_ALLOWED = 0x1000,
++ SCST_WRITE_EXCL_ALLOWED = 0x2000,
++ SCST_EXCL_ACCESS_ALLOWED = 0x4000,
++#ifdef CONFIG_SCST_TEST_IO_IN_SIRQ
++ SCST_TEST_IO_IN_SIRQ_ALLOWED = 0x8000,
++#endif
++};
++
++/*************************************************************
++ ** Data direction aliases. Changing it don't forget to change
++ ** scst_to_tgt_dma_dir as well!!
++ *************************************************************/
++#define SCST_DATA_UNKNOWN 0
++#define SCST_DATA_WRITE 1
++#define SCST_DATA_READ 2
++#define SCST_DATA_BIDI (SCST_DATA_WRITE | SCST_DATA_READ)
++#define SCST_DATA_NONE 4
++
++/*************************************************************
++ ** Default suffix for targets with NULL names
++ *************************************************************/
++#define SCST_DEFAULT_TGT_NAME_SUFFIX "_target_"
++
++/*************************************************************
++ ** Sense manipulation and examination
++ *************************************************************/
++#define SCST_LOAD_SENSE(key_asc_ascq) key_asc_ascq
++
++#define SCST_SENSE_VALID(sense) ((sense != NULL) && \
++ ((((const uint8_t *)(sense))[0] & 0x70) == 0x70))
++
++#define SCST_NO_SENSE(sense) ((sense != NULL) && \
++ (((const uint8_t *)(sense))[2] == 0))
++
++/*************************************************************
++ ** Sense data for the appropriate errors. Can be used with
++ ** scst_set_cmd_error()
++ *************************************************************/
++#define scst_sense_no_sense NO_SENSE, 0x00, 0
++#define scst_sense_hardw_error HARDWARE_ERROR, 0x44, 0
++#define scst_sense_aborted_command ABORTED_COMMAND, 0x00, 0
++#define scst_sense_invalid_opcode ILLEGAL_REQUEST, 0x20, 0
++#define scst_sense_invalid_field_in_cdb ILLEGAL_REQUEST, 0x24, 0
++#define scst_sense_invalid_field_in_parm_list ILLEGAL_REQUEST, 0x26, 0
++#define scst_sense_parameter_value_invalid ILLEGAL_REQUEST, 0x26, 2
++#define scst_sense_invalid_release ILLEGAL_REQUEST, 0x26, 4
++#define scst_sense_parameter_list_length_invalid \
++ ILLEGAL_REQUEST, 0x1A, 0
++#define scst_sense_reset_UA UNIT_ATTENTION, 0x29, 0
++#define scst_sense_nexus_loss_UA UNIT_ATTENTION, 0x29, 0x7
++#define scst_sense_saving_params_unsup ILLEGAL_REQUEST, 0x39, 0
++#define scst_sense_lun_not_supported ILLEGAL_REQUEST, 0x25, 0
++#define scst_sense_data_protect DATA_PROTECT, 0x00, 0
++#define scst_sense_miscompare_error MISCOMPARE, 0x1D, 0
++#define scst_sense_block_out_range_error ILLEGAL_REQUEST, 0x21, 0
++#define scst_sense_medium_changed_UA UNIT_ATTENTION, 0x28, 0
++#define scst_sense_read_error MEDIUM_ERROR, 0x11, 0
++#define scst_sense_write_error MEDIUM_ERROR, 0x03, 0
++#define scst_sense_not_ready NOT_READY, 0x04, 0x10
++#define scst_sense_invalid_message ILLEGAL_REQUEST, 0x49, 0
++#define scst_sense_cleared_by_another_ini_UA UNIT_ATTENTION, 0x2F, 0
++#define scst_sense_capacity_data_changed UNIT_ATTENTION, 0x2A, 0x9
++#define scst_sense_reservation_preempted UNIT_ATTENTION, 0x2A, 0x03
++#define scst_sense_reservation_released UNIT_ATTENTION, 0x2A, 0x04
++#define scst_sense_registrations_preempted UNIT_ATTENTION, 0x2A, 0x05
++#define scst_sense_reported_luns_data_changed UNIT_ATTENTION, 0x3F, 0xE
++#define scst_sense_inquery_data_changed UNIT_ATTENTION, 0x3F, 0x3
++
++/*************************************************************
++ * SCSI opcodes not listed anywhere else
++ *************************************************************/
++#define REPORT_DEVICE_IDENTIFIER 0xA3
++#define INIT_ELEMENT_STATUS 0x07
++#define INIT_ELEMENT_STATUS_RANGE 0x37
++#define PREVENT_ALLOW_MEDIUM 0x1E
++#define READ_ATTRIBUTE 0x8C
++#define REQUEST_VOLUME_ADDRESS 0xB5
++#define WRITE_ATTRIBUTE 0x8D
++#define WRITE_VERIFY_16 0x8E
++#define VERIFY_6 0x13
++#ifndef VERIFY_12
++#define VERIFY_12 0xAF
++#endif
++#ifndef GENERATING_UPSTREAM_PATCH
++/*
++ * The constants below have been defined in the kernel header <scsi/scsi.h>
++ * and hence are not needed when this header file is included in kernel code.
++ * The definitions below are only used when this header file is included during
++ * compilation of SCST's user space components.
++ */
++#ifndef READ_16
++#define READ_16 0x88
++#endif
++#ifndef WRITE_16
++#define WRITE_16 0x8a
++#endif
++#ifndef VERIFY_16
++#define VERIFY_16 0x8f
++#endif
++#ifndef SERVICE_ACTION_IN
++#define SERVICE_ACTION_IN 0x9e
++#endif
++#ifndef SAI_READ_CAPACITY_16
++/* values for service action in */
++#define SAI_READ_CAPACITY_16 0x10
++#endif
++#endif
++#ifndef GENERATING_UPSTREAM_PATCH
++#ifndef REPORT_LUNS
++#define REPORT_LUNS 0xa0
++#endif
++#endif
++
++/*************************************************************
++ ** SCSI Architecture Model (SAM) Status codes. Taken from SAM-3 draft
++ ** T10/1561-D Revision 4 Draft dated 7th November 2002.
++ *************************************************************/
++#define SAM_STAT_GOOD 0x00
++#define SAM_STAT_CHECK_CONDITION 0x02
++#define SAM_STAT_CONDITION_MET 0x04
++#define SAM_STAT_BUSY 0x08
++#define SAM_STAT_INTERMEDIATE 0x10
++#define SAM_STAT_INTERMEDIATE_CONDITION_MET 0x14
++#define SAM_STAT_RESERVATION_CONFLICT 0x18
++#define SAM_STAT_COMMAND_TERMINATED 0x22 /* obsolete in SAM-3 */
++#define SAM_STAT_TASK_SET_FULL 0x28
++#define SAM_STAT_ACA_ACTIVE 0x30
++#define SAM_STAT_TASK_ABORTED 0x40
++
++/*************************************************************
++ ** Control byte field in CDB
++ *************************************************************/
++#define CONTROL_BYTE_LINK_BIT 0x01
++#define CONTROL_BYTE_NACA_BIT 0x04
++
++/*************************************************************
++ ** Byte 1 in INQUIRY CDB
++ *************************************************************/
++#define SCST_INQ_EVPD 0x01
++
++/*************************************************************
++ ** Byte 3 in Standard INQUIRY data
++ *************************************************************/
++#define SCST_INQ_BYTE3 3
++
++#define SCST_INQ_NORMACA_BIT 0x20
++
++/*************************************************************
++ ** Byte 2 in RESERVE_10 CDB
++ *************************************************************/
++#define SCST_RES_3RDPTY 0x10
++#define SCST_RES_LONGID 0x02
++
++/*************************************************************
++ ** Values for the control mode page TST field
++ *************************************************************/
++#define SCST_CONTR_MODE_ONE_TASK_SET 0
++#define SCST_CONTR_MODE_SEP_TASK_SETS 1
++
++/*******************************************************************
++ ** Values for the control mode page QUEUE ALGORITHM MODIFIER field
++ *******************************************************************/
++#define SCST_CONTR_MODE_QUEUE_ALG_RESTRICTED_REORDER 0
++#define SCST_CONTR_MODE_QUEUE_ALG_UNRESTRICTED_REORDER 1
++
++/*************************************************************
++ ** Values for the control mode page D_SENSE field
++ *************************************************************/
++#define SCST_CONTR_MODE_FIXED_SENSE 0
++#define SCST_CONTR_MODE_DESCR_SENSE 1
++
++/*************************************************************
++ ** TransportID protocol identifiers
++ *************************************************************/
++
++#define SCSI_TRANSPORTID_PROTOCOLID_FCP2 0
++#define SCSI_TRANSPORTID_PROTOCOLID_SPI5 1
++#define SCSI_TRANSPORTID_PROTOCOLID_SRP 4
++#define SCSI_TRANSPORTID_PROTOCOLID_ISCSI 5
++#define SCSI_TRANSPORTID_PROTOCOLID_SAS 6
++
++/*************************************************************
++ ** Misc SCSI constants
++ *************************************************************/
++#define SCST_SENSE_ASC_UA_RESET 0x29
++#define BYTCHK 0x02
++#define POSITION_LEN_SHORT 20
++#define POSITION_LEN_LONG 32
++
++/*************************************************************
++ ** Various timeouts
++ *************************************************************/
++#define SCST_DEFAULT_TIMEOUT (60 * HZ)
++
++#define SCST_GENERIC_CHANGER_TIMEOUT (3 * HZ)
++#define SCST_GENERIC_CHANGER_LONG_TIMEOUT (14000 * HZ)
++
++#define SCST_GENERIC_PROCESSOR_TIMEOUT (3 * HZ)
++#define SCST_GENERIC_PROCESSOR_LONG_TIMEOUT (14000 * HZ)
++
++#define SCST_GENERIC_TAPE_SMALL_TIMEOUT (3 * HZ)
++#define SCST_GENERIC_TAPE_REG_TIMEOUT (900 * HZ)
++#define SCST_GENERIC_TAPE_LONG_TIMEOUT (14000 * HZ)
++
++#define SCST_GENERIC_MODISK_SMALL_TIMEOUT (3 * HZ)
++#define SCST_GENERIC_MODISK_REG_TIMEOUT (900 * HZ)
++#define SCST_GENERIC_MODISK_LONG_TIMEOUT (14000 * HZ)
++
++#define SCST_GENERIC_DISK_SMALL_TIMEOUT (3 * HZ)
++#define SCST_GENERIC_DISK_REG_TIMEOUT (60 * HZ)
++#define SCST_GENERIC_DISK_LONG_TIMEOUT (3600 * HZ)
++
++#define SCST_GENERIC_RAID_TIMEOUT (3 * HZ)
++#define SCST_GENERIC_RAID_LONG_TIMEOUT (14000 * HZ)
++
++#define SCST_GENERIC_CDROM_SMALL_TIMEOUT (3 * HZ)
++#define SCST_GENERIC_CDROM_REG_TIMEOUT (900 * HZ)
++#define SCST_GENERIC_CDROM_LONG_TIMEOUT (14000 * HZ)
++
++#define SCST_MAX_OTHER_TIMEOUT (14000 * HZ)
++
++/*************************************************************
++ ** I/O grouping attribute string values. Must match constants
++ ** w/o '_STR' suffix!
++ *************************************************************/
++#define SCST_IO_GROUPING_AUTO_STR "auto"
++#define SCST_IO_GROUPING_THIS_GROUP_ONLY_STR "this_group_only"
++#define SCST_IO_GROUPING_NEVER_STR "never"
++
++/*************************************************************
++ ** Threads pool type attribute string values.
++ ** Must match scst_dev_type_threads_pool_type!
++ *************************************************************/
++#define SCST_THREADS_POOL_PER_INITIATOR_STR "per_initiator"
++#define SCST_THREADS_POOL_SHARED_STR "shared"
++
++/*************************************************************
++ ** Misc constants
++ *************************************************************/
++#define SCST_SYSFS_BLOCK_SIZE PAGE_SIZE
++
++#define SCST_PR_DIR "/var/lib/scst/pr"
++
++#define TID_COMMON_SIZE 24
++
++#define SCST_SYSFS_KEY_MARK "[key]"
++
++#define SCST_MIN_REL_TGT_ID 1
++#define SCST_MAX_REL_TGT_ID 65535
++
++#endif /* __SCST_CONST_H */
diff -upkr -X linux-2.6.36/Documentation/dontdiff linux-2.6.36/drivers/Kconfig linux-2.6.36/drivers/Kconfig
--- orig/linux-2.6.36/drivers/Kconfig 01:51:29.000000000 +0400
+++ linux-2.6.36/drivers/Kconfig 14:14:46.000000000 +0400
@@ -5140,13 +5154,14 @@ diff -uprN orig/linux-2.6.36/drivers/scst/Makefile linux-2.6.36/drivers/scst/Mak
diff -uprN orig/linux-2.6.36/drivers/scst/scst_lib.c linux-2.6.36/drivers/scst/scst_lib.c
--- orig/linux-2.6.36/drivers/scst/scst_lib.c
+++ linux-2.6.36/drivers/scst/scst_lib.c
-@@ -0,0 +1,7361 @@
+@@ -0,0 +1,7362 @@
+/*
+ * scst_lib.c
+ *
-+ * Copyright (C) 2004 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2004 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ * Copyright (C) 2004 - 2005 Leonid Stoljar
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
@@ -12505,13 +12520,14 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_lib.c linux-2.6.36/drivers/scst/s
diff -uprN orig/linux-2.6.36/drivers/scst/scst_main.c linux-2.6.36/drivers/scst/scst_main.c
--- orig/linux-2.6.36/drivers/scst/scst_main.c
+++ linux-2.6.36/drivers/scst/scst_main.c
-@@ -0,0 +1,2195 @@
+@@ -0,0 +1,2198 @@
+/*
+ * scst_main.c
+ *
-+ * Copyright (C) 2004 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2004 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ * Copyright (C) 2004 - 2005 Leonid Stoljar
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
@@ -12612,6 +12628,8 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_main.c linux-2.6.36/drivers/scst/
+unsigned long scst_trace_flag;
+#endif
+
++int scst_max_tasklet_cmd = SCST_DEF_MAX_TASKLET_CMD;
++
+unsigned long scst_flags;
+atomic_t scst_cmd_count;
+
@@ -14704,13 +14722,14 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_main.c linux-2.6.36/drivers/scst/
diff -uprN orig/linux-2.6.36/drivers/scst/scst_module.c linux-2.6.36/drivers/scst/scst_module.c
--- orig/linux-2.6.36/drivers/scst/scst_module.c
+++ linux-2.6.36/drivers/scst/scst_module.c
-@@ -0,0 +1,69 @@
+@@ -0,0 +1,70 @@
+/*
+ * scst_module.c
+ *
-+ * Copyright (C) 2004 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2004 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ * Copyright (C) 2004 - 2005 Leonid Stoljar
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * Support for loading target modules. The usage is similar to scsi_module.c
+ *
@@ -14783,7 +14802,7 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_pres.c linux-2.6.36/drivers/scst/
+ *
+ * Copyright (C) 2009 - 2010 Alexey Obitotskiy <alexeyo1@open-e.com>
+ * Copyright (C) 2009 - 2010 Open-E, Inc.
-+ * Copyright (C) 2009 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2009 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
@@ -17435,7 +17454,7 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_pres.h linux-2.6.36/drivers/scst/
+ *
+ * Copyright (C) 2009 - 2010 Alexey Obitotskiy <alexeyo1@open-e.com>
+ * Copyright (C) 2009 - 2010 Open-E, Inc.
-+ * Copyright (C) 2009 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2009 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
@@ -17603,13 +17622,14 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_pres.h linux-2.6.36/drivers/scst/
diff -uprN orig/linux-2.6.36/drivers/scst/scst_priv.h linux-2.6.36/drivers/scst/scst_priv.h
--- orig/linux-2.6.36/drivers/scst/scst_priv.h
+++ linux-2.6.36/drivers/scst/scst_priv.h
-@@ -0,0 +1,599 @@
+@@ -0,0 +1,603 @@
+/*
+ * scst_priv.h
+ *
-+ * Copyright (C) 2004 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2004 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ * Copyright (C) 2004 - 2005 Leonid Stoljar
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
@@ -17757,6 +17777,9 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_priv.h linux-2.6.36/drivers/scst/
+
+extern unsigned int scst_setup_id;
+
++#define SCST_DEF_MAX_TASKLET_CMD 20
++extern int scst_max_tasklet_cmd;
++
+extern spinlock_t scst_init_lock;
+extern struct list_head scst_init_cmd_list;
+extern wait_queue_head_t scst_init_cmd_list_waitQ;
@@ -18206,13 +18229,14 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_priv.h linux-2.6.36/drivers/scst/
diff -uprN orig/linux-2.6.36/drivers/scst/scst_sysfs.c linux-2.6.36/drivers/scst/scst_sysfs.c
--- orig/linux-2.6.36/drivers/scst/scst_sysfs.c
+++ linux-2.6.36/drivers/scst/scst_sysfs.c
-@@ -0,0 +1,5291 @@
+@@ -0,0 +1,5336 @@
+/*
+ * scst_sysfs.c
+ *
+ * Copyright (C) 2009 Daniel Henrique Debonzi <debonzi@linux.vnet.ibm.com>
-+ * Copyright (C) 2009 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2009 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ * Copyright (C) 2009 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
@@ -22647,6 +22671,49 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_sysfs.c linux-2.6.36/drivers/scst
+ __ATTR(setup_id, S_IRUGO | S_IWUSR, scst_setup_id_show,
+ scst_setup_id_store);
+
++static ssize_t scst_max_tasklet_cmd_show(struct kobject *kobj,
++ struct kobj_attribute *attr, char *buf)
++{
++ int count;
++
++ TRACE_ENTRY();
++
++ count = sprintf(buf, "%d\n%s\n", scst_max_tasklet_cmd,
++ (scst_max_tasklet_cmd == SCST_DEF_MAX_TASKLET_CMD)
++ ? "" : SCST_SYSFS_KEY_MARK);
++
++ TRACE_EXIT();
++ return count;
++}
++
++static ssize_t scst_max_tasklet_cmd_store(struct kobject *kobj,
++ struct kobj_attribute *attr, const char *buf, size_t count)
++{
++ int res;
++ unsigned long val;
++
++ TRACE_ENTRY();
++
++ res = strict_strtoul(buf, 0, &val);
++ if (res != 0) {
++ PRINT_ERROR("strict_strtoul() for %s failed: %d ", buf, res);
++ goto out;
++ }
++
++ scst_max_tasklet_cmd = val;
++ PRINT_INFO("Changed scst_max_tasklet_cmd to %d", scst_max_tasklet_cmd);
++
++ res = count;
++
++out:
++ TRACE_EXIT_RES(res);
++ return res;
++}
++
++static struct kobj_attribute scst_max_tasklet_cmd_attr =
++ __ATTR(max_tasklet_cmd, S_IRUGO | S_IWUSR, scst_max_tasklet_cmd_show,
++ scst_max_tasklet_cmd_store);
++
+#if defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING)
+static struct kobj_attribute scst_trace_level_attr =
+ __ATTR(trace_level, S_IRUGO | S_IWUSR, scst_main_trace_level_show,
@@ -22663,6 +22730,7 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_sysfs.c linux-2.6.36/drivers/scst
+static struct attribute *scst_sysfs_root_default_attrs[] = {
+ &scst_threads_attr.attr,
+ &scst_setup_id_attr.attr,
++ &scst_max_tasklet_cmd_attr.attr,
+#if defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING)
+ &scst_trace_level_attr.attr,
+#endif
@@ -23501,13 +23569,14 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_sysfs.c linux-2.6.36/drivers/scst
diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/scst_targ.c
--- orig/linux-2.6.36/drivers/scst/scst_targ.c
+++ linux-2.6.36/drivers/scst/scst_targ.c
-@@ -0,0 +1,6582 @@
+@@ -0,0 +1,6654 @@
+/*
+ * scst_targ.c
+ *
-+ * Copyright (C) 2004 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2004 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ * Copyright (C) 2004 - 2005 Leonid Stoljar
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
@@ -23586,13 +23655,24 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/
+ struct scst_tasklet *t = &scst_tasklets[smp_processor_id()];
+ unsigned long flags;
+
-+ spin_lock_irqsave(&t->tasklet_lock, flags);
-+ TRACE_DBG("Adding cmd %p to tasklet %d cmd list", cmd,
-+ smp_processor_id());
-+ list_add_tail(&cmd->cmd_list_entry, &t->tasklet_cmd_list);
-+ spin_unlock_irqrestore(&t->tasklet_lock, flags);
++ if (atomic_read(&scst_cmd_count) <= scst_max_tasklet_cmd) {
++ spin_lock_irqsave(&t->tasklet_lock, flags);
++ TRACE_DBG("Adding cmd %p to tasklet %d cmd list", cmd,
++ smp_processor_id());
++ list_add_tail(&cmd->cmd_list_entry, &t->tasklet_cmd_list);
++ spin_unlock_irqrestore(&t->tasklet_lock, flags);
+
-+ tasklet_schedule(&t->tasklet);
++ tasklet_schedule(&t->tasklet);
++ } else {
++ spin_lock_irqsave(&cmd->cmd_threads->cmd_list_lock, flags);
++ TRACE_DBG("Too many tasklet commands (%d), adding cmd %p to "
++ "active cmd list", atomic_read(&scst_cmd_count), cmd);
++ list_add_tail(&cmd->cmd_list_entry,
++ &cmd->cmd_threads->active_cmd_list);
++ wake_up(&cmd->cmd_threads->cmd_list_waitQ);
++ spin_unlock_irqrestore(&cmd->cmd_threads->cmd_list_lock, flags);
++ }
++ return;
+}
+
+/**
@@ -23703,10 +23783,14 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/
+#endif
+
+ /* Small context optimization */
-+ if (((*context == SCST_CONTEXT_TASKLET) ||
-+ (*context == SCST_CONTEXT_DIRECT_ATOMIC)) &&
-+ scst_cmd_is_expected_set(cmd)) {
-+ if (cmd->expected_data_direction & SCST_DATA_WRITE) {
++ if ((*context == SCST_CONTEXT_TASKLET) ||
++ (*context == SCST_CONTEXT_DIRECT_ATOMIC)) {
++ /*
++ * If any data_direction not set, it's SCST_DATA_UNKNOWN,
++ * which is 0, so we can safely | them
++ */
++ BUILD_BUG_ON(SCST_DATA_UNKNOWN != 0);
++ if ((cmd->data_direction | cmd->expected_data_direction) & SCST_DATA_WRITE) {
+ if (!test_bit(SCST_TGT_DEV_AFTER_INIT_WR_ATOMIC,
+ &cmd->tgt_dev->tgt_dev_flags))
+ *context = SCST_CONTEXT_THREAD;
@@ -23796,6 +23880,7 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/
+ PRINT_ERROR("Wrong context %d in IRQ from target %s, use "
+ "SCST_CONTEXT_THREAD instead", pref_context,
+ cmd->tgtt->name);
++ dump_stack();
+ pref_context = SCST_CONTEXT_THREAD;
+ }
+#endif
@@ -23870,14 +23955,6 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/
+ scst_schedule_tasklet(cmd);
+ break;
+
-+ case SCST_CONTEXT_DIRECT:
-+ scst_process_active_cmd(cmd, false);
-+ break;
-+
-+ case SCST_CONTEXT_DIRECT_ATOMIC:
-+ scst_process_active_cmd(cmd, true);
-+ break;
-+
+ default:
+ PRINT_ERROR("Context %x is undefined, using the thread one",
+ pref_context);
@@ -23894,6 +23971,14 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/
+ wake_up(&cmd->cmd_threads->cmd_list_waitQ);
+ spin_unlock_irqrestore(&cmd->cmd_threads->cmd_list_lock, flags);
+ break;
++
++ case SCST_CONTEXT_DIRECT:
++ scst_process_active_cmd(cmd, false);
++ break;
++
++ case SCST_CONTEXT_DIRECT_ATOMIC:
++ scst_process_active_cmd(cmd, true);
++ break;
+ }
+
+out:
@@ -24006,7 +24091,7 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/
+ * It shouldn't be because of the SCST_TGT_DEV_AFTER_*
+ * optimization.
+ */
-+ TRACE_DBG("Dev handler %s parse() needs thread "
++ TRACE_MGMT_DBG("Dev handler %s parse() needs thread "
+ "context, rescheduling", dev->handler->name);
+ res = SCST_CMD_STATE_RES_NEED_THREAD;
+ goto out;
@@ -24304,6 +24389,21 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/
+ if (unlikely(cmd->completed))
+ goto out_done;
+
++#ifndef CONFIG_SCST_TEST_IO_IN_SIRQ
++ /*
++ * We can't allow atomic command on the exec stages. It shouldn't
++ * be because of the SCST_TGT_DEV_AFTER_* optimization, but during
++ * parsing data_direction can change, so we need to recheck.
++ */
++ if (unlikely(scst_cmd_atomic(cmd) &&
++ !(cmd->data_direction & SCST_DATA_WRITE))) {
++ TRACE_DBG_FLAG(TRACE_DEBUG|TRACE_MINOR, "Atomic context and "
++ "non-WRITE data direction, rescheduling (cmd %p)", cmd);
++ res = SCST_CMD_STATE_RES_NEED_THREAD;
++ goto out;
++ }
++#endif
++
+out:
+ TRACE_EXIT_HRES(res);
+ return res;
@@ -24377,7 +24477,7 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/
+ * It shouldn't be because of the SCST_TGT_DEV_AFTER_*
+ * optimization.
+ */
-+ TRACE_DBG("Dev handler %s alloc_data_buf() needs "
++ TRACE_MGMT_DBG("Dev handler %s alloc_data_buf() needs "
+ "thread context, rescheduling",
+ dev->handler->name);
+ res = SCST_CMD_STATE_RES_NEED_THREAD;
@@ -24567,6 +24667,7 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/
+ PRINT_ERROR("Wrong context %d in IRQ from target %s, use "
+ "SCST_CONTEXT_THREAD instead", pref_context,
+ cmd->tgtt->name);
++ dump_stack();
+ pref_context = SCST_CONTEXT_THREAD;
+ }
+#endif
@@ -24593,6 +24694,7 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/
+
+ case SCST_PREPROCESS_STATUS_ERROR_SENSE_SET:
+ scst_set_cmd_abnormal_done_state(cmd);
++ pref_context = SCST_CONTEXT_THREAD;
+ break;
+
+ case SCST_PREPROCESS_STATUS_ERROR_FATAL:
@@ -24603,12 +24705,14 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/
+ scst_set_cmd_error(cmd,
+ SCST_LOAD_SENSE(scst_sense_hardw_error));
+ scst_set_cmd_abnormal_done_state(cmd);
++ pref_context = SCST_CONTEXT_THREAD;
+ break;
+
+ default:
+ PRINT_ERROR("%s() received unknown status %x", __func__,
+ status);
+ scst_set_cmd_abnormal_done_state(cmd);
++ pref_context = SCST_CONTEXT_THREAD;
+ break;
+ }
+
@@ -24633,7 +24737,15 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/
+
+ if ((tgtt->rdy_to_xfer == NULL) || unlikely(cmd->internal)) {
+ cmd->state = SCST_CMD_STATE_TGT_PRE_EXEC;
-+ res = SCST_CMD_STATE_RES_CONT_SAME;
++#ifndef CONFIG_SCST_TEST_IO_IN_SIRQ
++ /* We can't allow atomic command on the exec stages */
++ if (scst_cmd_atomic(cmd)) {
++ TRACE_DBG("NULL rdy_to_xfer() and atomic context, "
++ "rescheduling (cmd %p)", cmd);
++ res = SCST_CMD_STATE_RES_NEED_THREAD;
++ } else
++#endif
++ res = SCST_CMD_STATE_RES_CONT_SAME;
+ goto out;
+ }
+
@@ -24642,8 +24754,8 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/
+ * It shouldn't be because of the SCST_TGT_DEV_AFTER_*
+ * optimization.
+ */
-+ TRACE_DBG("Target driver %s rdy_to_xfer() needs thread "
-+ "context, rescheduling", tgtt->name);
++ TRACE_MGMT_DBG("Target driver %s rdy_to_xfer() needs thread "
++ "context, rescheduling", tgtt->name);
+ res = SCST_CMD_STATE_RES_NEED_THREAD;
+ goto out;
+ }
@@ -24741,6 +24853,9 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/
+
+ TRACE_DBG("Context: %x", context);
+
++ if (check_retries)
++ scst_check_retries(tgt);
++
+ if (context == SCST_CONTEXT_SAME)
+ context = scst_cmd_atomic(cmd) ? SCST_CONTEXT_DIRECT_ATOMIC :
+ SCST_CONTEXT_DIRECT;
@@ -24751,18 +24866,18 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/
+ break;
+
+ case SCST_CONTEXT_DIRECT:
-+ if (check_retries)
-+ scst_check_retries(tgt);
+ scst_process_active_cmd(cmd, false);
+ break;
+
++ case SCST_CONTEXT_TASKLET:
++ scst_schedule_tasklet(cmd);
++ break;
++
+ default:
+ PRINT_ERROR("Context %x is unknown, using the thread one",
+ context);
+ /* go through */
+ case SCST_CONTEXT_THREAD:
-+ if (check_retries)
-+ scst_check_retries(tgt);
+ spin_lock_irqsave(&cmd->cmd_threads->cmd_list_lock, flags);
+ TRACE_DBG("Adding cmd %p to active cmd list", cmd);
+ if (unlikely(cmd->queue_type == SCST_CMD_QUEUE_HEAD_OF_QUEUE))
@@ -24774,12 +24889,6 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/
+ wake_up(&cmd->cmd_threads->cmd_list_waitQ);
+ spin_unlock_irqrestore(&cmd->cmd_threads->cmd_list_lock, flags);
+ break;
-+
-+ case SCST_CONTEXT_TASKLET:
-+ if (check_retries)
-+ scst_check_retries(tgt);
-+ scst_schedule_tasklet(cmd);
-+ break;
+ }
+
+ TRACE_EXIT();
@@ -24818,6 +24927,7 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/
+ PRINT_ERROR("Wrong context %d in IRQ from target %s, use "
+ "SCST_CONTEXT_THREAD instead", pref_context,
+ cmd->tgtt->name);
++ dump_stack();
+ pref_context = SCST_CONTEXT_THREAD;
+ }
+#endif
@@ -24865,6 +24975,7 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/
+
+ case SCST_RX_STATUS_ERROR_SENSE_SET:
+ scst_set_cmd_abnormal_done_state(cmd);
++ pref_context = SCST_CONTEXT_THREAD;
+ break;
+
+ case SCST_RX_STATUS_ERROR_FATAL:
@@ -24874,12 +24985,14 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/
+ scst_set_cmd_error(cmd,
+ SCST_LOAD_SENSE(scst_sense_hardw_error));
+ scst_set_cmd_abnormal_done_state(cmd);
++ pref_context = SCST_CONTEXT_THREAD;
+ break;
+
+ default:
+ PRINT_ERROR("scst_rx_data() received unknown status %x",
+ status);
+ scst_set_cmd_abnormal_done_state(cmd);
++ pref_context = SCST_CONTEXT_THREAD;
+ break;
+ }
+
@@ -26018,7 +26131,7 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/
+ if (ctx_changed)
+ scst_reset_io_context(cmd->tgt_dev, old_ctx);
+
-+ TRACE_EXIT();
++ TRACE_EXIT_RES(res);
+ return res;
+
+out_error:
@@ -26044,7 +26157,6 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/
+ __scst_cmd_get(cmd);
+
+ res = scst_do_real_exec(cmd);
-+
+ if (likely(res == SCST_EXEC_COMPLETED)) {
+ scst_post_exec_sn(cmd, true);
+ if (cmd->dev->scsi_dev != NULL)
@@ -26441,8 +26553,14 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/
+ SCST_LOAD_SENSE(scst_sense_hardw_error));
+ }
+ goto out;
-+ } else if (unlikely(scst_check_sense(cmd)))
++ } else if (unlikely(scst_check_sense(cmd))) {
++ /*
++ * We can't allow atomic command on the exec stages, so
++ * restart to the thread
++ */
++ res = SCST_CMD_STATE_RES_NEED_THREAD;
+ goto out;
++ }
+
+ if (likely(scsi_status_is_good(cmd->status))) {
+ unsigned char type = cmd->dev->type;
@@ -26686,8 +26804,8 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/
+ * It shouldn't be because of the SCST_TGT_DEV_AFTER_*
+ * optimization.
+ */
-+ TRACE_DBG("Dev handler %s dev_done() needs thread "
-+ "context, rescheduling", dev->handler->name);
++ TRACE_MGMT_DBG("Dev handler %s dev_done() needs thread "
++ "context, rescheduling", dev->handler->name);
+ res = SCST_CMD_STATE_RES_NEED_THREAD;
+ goto out;
+ }
@@ -26756,6 +26874,24 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/
+ if (unlikely(cmd->internal))
+ cmd->state = SCST_CMD_STATE_FINISHED_INTERNAL;
+
++#ifndef CONFIG_SCST_TEST_IO_IN_SIRQ
++ if (cmd->state != SCST_CMD_STATE_PRE_XMIT_RESP) {
++ /* We can't allow atomic command on the exec stages */
++ if (scst_cmd_atomic(cmd)) {
++ switch (state) {
++ case SCST_CMD_STATE_TGT_PRE_EXEC:
++ case SCST_CMD_STATE_SEND_FOR_EXEC:
++ case SCST_CMD_STATE_LOCAL_EXEC:
++ case SCST_CMD_STATE_REAL_EXEC:
++ TRACE_DBG("Atomic context and redirect, "
++ "rescheduling (cmd %p)", cmd);
++ res = SCST_CMD_STATE_RES_NEED_THREAD;
++ break;
++ }
++ }
++ }
++#endif
++
+out:
+ TRACE_EXIT_HRES(res);
+ return res;
@@ -26854,8 +26990,8 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/
+ * It shouldn't be because of the SCST_TGT_DEV_AFTER_*
+ * optimization.
+ */
-+ TRACE_DBG("Target driver %s xmit_response() needs thread "
-+ "context, rescheduling", tgtt->name);
++ TRACE_MGMT_DBG("Target driver %s xmit_response() needs thread "
++ "context, rescheduling", tgtt->name);
+ res = SCST_CMD_STATE_RES_NEED_THREAD;
+ goto out;
+ }
@@ -26987,7 +27123,11 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/
+
+ cmd->cmd_hw_pending = 0;
+
++ if (unlikely(cmd->tgt_dev == NULL))
++ pref_context = SCST_CONTEXT_THREAD;
++
+ cmd->state = SCST_CMD_STATE_FINISHED;
++
+ scst_process_redirect_cmd(cmd, pref_context, 1);
+
+ TRACE_EXIT();
@@ -27531,8 +27671,8 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/
+
+ case SCST_CMD_STATE_PRE_DEV_DONE:
+ res = scst_pre_dev_done(cmd);
-+ EXTRACHECKS_BUG_ON(res ==
-+ SCST_CMD_STATE_RES_NEED_THREAD);
++ EXTRACHECKS_BUG_ON((res == SCST_CMD_STATE_RES_NEED_THREAD) &&
++ (cmd->state == SCST_CMD_STATE_PRE_DEV_DONE));
+ break;
+
+ case SCST_CMD_STATE_MODE_SELECT_CHECKS:
@@ -30087,13 +30227,14 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/
diff -uprN orig/linux-2.6.36/include/scst/scst_debug.h linux-2.6.36/include/scst/scst_debug.h
--- orig/linux-2.6.36/include/scst/scst_debug.h
+++ linux-2.6.36/include/scst/scst_debug.h
-@@ -0,0 +1,350 @@
+@@ -0,0 +1,351 @@
+/*
+ * include/scst_debug.h
+ *
-+ * Copyright (C) 2004 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2004 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ * Copyright (C) 2004 - 2005 Leonid Stoljar
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * Contains macroses for execution tracing and error reporting
+ *
@@ -30441,13 +30582,14 @@ diff -uprN orig/linux-2.6.36/include/scst/scst_debug.h linux-2.6.36/include/scst
diff -uprN orig/linux-2.6.36/drivers/scst/scst_debug.c linux-2.6.36/drivers/scst/scst_debug.c
--- orig/linux-2.6.36/drivers/scst/scst_debug.c
+++ linux-2.6.36/drivers/scst/scst_debug.c
-@@ -0,0 +1,223 @@
+@@ -0,0 +1,224 @@
+/*
+ * scst_debug.c
+ *
-+ * Copyright (C) 2004 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2004 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ * Copyright (C) 2004 - 2005 Leonid Stoljar
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * Contains helper functions for execution tracing and error reporting.
+ * Intended to be included in main .c file.
@@ -30668,13 +30810,14 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_debug.c linux-2.6.36/drivers/scst
diff -uprN orig/linux-2.6.36/drivers/scst/scst_proc.c linux-2.6.36/drivers/scst/scst_proc.c
--- orig/linux-2.6.36/drivers/scst/scst_proc.c
+++ linux-2.6.36/drivers/scst/scst_proc.c
-@@ -0,0 +1,2703 @@
+@@ -0,0 +1,2704 @@
+/*
+ * scst_proc.c
+ *
-+ * Copyright (C) 2004 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2004 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ * Copyright (C) 2004 - 2005 Leonid Stoljar
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
@@ -33375,12 +33518,13 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_proc.c linux-2.6.36/drivers/scst/
diff -uprN orig/linux-2.6.36/include/scst/scst_sgv.h linux-2.6.36/include/scst/scst_sgv.h
--- orig/linux-2.6.36/include/scst/scst_sgv.h
+++ linux-2.6.36/include/scst/scst_sgv.h
-@@ -0,0 +1,97 @@
+@@ -0,0 +1,98 @@
+/*
+ * include/scst_sgv.h
+ *
-+ * Copyright (C) 2004 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2004 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * Include file for SCST SGV cache.
+ *
@@ -33476,12 +33620,13 @@ diff -uprN orig/linux-2.6.36/include/scst/scst_sgv.h linux-2.6.36/include/scst/s
diff -uprN orig/linux-2.6.36/drivers/scst/scst_mem.h linux-2.6.36/drivers/scst/scst_mem.h
--- orig/linux-2.6.36/drivers/scst/scst_mem.h
+++ linux-2.6.36/drivers/scst/scst_mem.h
-@@ -0,0 +1,150 @@
+@@ -0,0 +1,151 @@
+/*
+ * scst_mem.h
+ *
-+ * Copyright (C) 2006 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2006 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
@@ -33630,12 +33775,13 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_mem.h linux-2.6.36/drivers/scst/s
diff -uprN orig/linux-2.6.36/drivers/scst/scst_mem.c linux-2.6.36/drivers/scst/scst_mem.c
--- orig/linux-2.6.36/drivers/scst/scst_mem.c
+++ linux-2.6.36/drivers/scst/scst_mem.c
-@@ -0,0 +1,1879 @@
+@@ -0,0 +1,1880 @@
+/*
+ * scst_mem.c
+ *
-+ * Copyright (C) 2006 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2006 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
@@ -35741,12 +35887,13 @@ diff -uprN orig/linux-2.6.36/Documentation/scst/sgv_cache.txt linux-2.6.36/Docum
diff -uprN orig/linux-2.6.36/include/scst/scst_user.h linux-2.6.36/include/scst/scst_user.h
--- orig/linux-2.6.36/include/scst/scst_user.h
+++ linux-2.6.36/include/scst/scst_user.h
-@@ -0,0 +1,321 @@
+@@ -0,0 +1,322 @@
+/*
+ * include/scst_user.h
+ *
-+ * Copyright (C) 2007 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2007 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * Contains constants and data structures for scst_user module.
+ * See http://scst.sourceforge.net/doc/scst_user_spec.txt or
@@ -35770,9 +35917,9 @@ diff -uprN orig/linux-2.6.36/include/scst/scst_user.h linux-2.6.36/include/scst/
+
+#define DEV_USER_NAME "scst_user"
+#define DEV_USER_PATH "/dev/"
-+#define DEV_USER_VERSION_NAME "2.0.0"
++#define DEV_USER_VERSION_NAME "2.0.0.2-rc1"
+#define DEV_USER_VERSION \
-+ DEV_USER_VERSION_NAME "$Revision: 3165 $" SCST_CONST_VERSION
++ DEV_USER_VERSION_NAME "$Revision: 3221 $" SCST_CONST_VERSION
+
+#define SCST_USER_PARSE_STANDARD 0
+#define SCST_USER_PARSE_CALL 1
@@ -36066,12 +36213,13 @@ diff -uprN orig/linux-2.6.36/include/scst/scst_user.h linux-2.6.36/include/scst/
diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/scst_user.c linux-2.6.36/drivers/scst/dev_handlers/scst_user.c
--- orig/linux-2.6.36/drivers/scst/dev_handlers/scst_user.c
+++ linux-2.6.36/drivers/scst/dev_handlers/scst_user.c
-@@ -0,0 +1,3738 @@
+@@ -0,0 +1,3739 @@
+/*
+ * scst_user.c
+ *
-+ * Copyright (C) 2007 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2007 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * SCSI virtual user space device handler
+ *
@@ -39808,15 +39956,16 @@ diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/scst_user.c linux-2.6.36/
diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/scst_vdisk.c linux-2.6.36/drivers/scst/dev_handlers/scst_vdisk.c
--- orig/linux-2.6.36/drivers/scst/dev_handlers/scst_vdisk.c
+++ linux-2.6.36/drivers/scst/dev_handlers/scst_vdisk.c
-@@ -0,0 +1,4226 @@
+@@ -0,0 +1,4228 @@
+/*
+ * scst_vdisk.c
+ *
-+ * Copyright (C) 2004 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2004 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ * Copyright (C) 2004 - 2005 Leonid Stoljar
+ * Copyright (C) 2007 Ming Zhang <blackmagic02881 at gmail dot com>
+ * Copyright (C) 2007 Ross Walker <rswwalker at hotmail dot com>
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * SCSI disk (type 0) and CDROM (type 5) dev handler using files
+ * on file systems or block devices (VDISK)
@@ -41032,6 +41181,7 @@ diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/scst_vdisk.c linux-2.6.36
+ int usn_len;
+ read_lock(&vdisk_serial_rwlock);
+ usn_len = strlen(virt_dev->usn);
++ buf[1] = 0x80;
+ buf[3] = usn_len;
+ strncpy(&buf[4], virt_dev->usn, usn_len);
+ read_unlock(&vdisk_serial_rwlock);
@@ -44038,7 +44188,7 @@ diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/scst_vdisk.c linux-2.6.36
diff -uprN orig/linux-2.6.36/Documentation/scst/README.scst linux-2.6.36/Documentation/scst/README.scst
--- orig/linux-2.6.36/Documentation/scst/README.scst
+++ linux-2.6.36/Documentation/scst/README.scst
-@@ -0,0 +1,1445 @@
+@@ -0,0 +1,1453 @@
+Generic SCSI target mid-level for Linux (SCST)
+==============================================
+
@@ -44292,6 +44442,14 @@ diff -uprN orig/linux-2.6.36/Documentation/scst/README.scst linux-2.6.36/Documen
+
+ - handlers - this is a root subdirectory for all SCST dev handlers
+
++ - max_tasklet_cmd - specifies how many commands at max can be queued in
++ the SCST core simultaneously from all connected initiators to allow
++ processing commands in soft-IRQ context in tasklets. If the count of
++ the commands exceeds this value, then all of them will be processed
++ only in threads. This is to to prevent possible starvation under
++ heavy load and in some cases to improve performance by more evenly
++ spreading load over available CPUs.
++
+ - sgv - this is a root subdirectory for all SCST SGV caches
+
+ - targets - this is a root subdirectory for all SCST targets
@@ -45478,7 +45636,7 @@ diff -uprN orig/linux-2.6.36/Documentation/scst/README.scst linux-2.6.36/Documen
+ * Jianxi Chen <pacers@users.sourceforge.net> for fixing problem with
+ devices >2TB in size
+
-+ * Bart Van Assche <bart.vanassche@gmail.com> for a lot of help
++ * Bart Van Assche <bvanassche@acm.org> for a lot of help
+
+ * Daniel Debonzi <debonzi@linux.vnet.ibm.com> for a big part of the
+ initial SCST sysfs tree implementation
@@ -46442,13 +46600,14 @@ diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/Makefile linux-2.6.36/dri
diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/scst_cdrom.c linux-2.6.36/drivers/scst/dev_handlers/scst_cdrom.c
--- orig/linux-2.6.36/drivers/scst/dev_handlers/scst_cdrom.c
+++ linux-2.6.36/drivers/scst/dev_handlers/scst_cdrom.c
-@@ -0,0 +1,301 @@
+@@ -0,0 +1,302 @@
+/*
+ * scst_cdrom.c
+ *
-+ * Copyright (C) 2004 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2004 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ * Copyright (C) 2004 - 2005 Leonid Stoljar
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * SCSI CDROM (type 5) dev handler
+ *
@@ -46747,13 +46906,14 @@ diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/scst_cdrom.c linux-2.6.36
diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/scst_changer.c linux-2.6.36/drivers/scst/dev_handlers/scst_changer.c
--- orig/linux-2.6.36/drivers/scst/dev_handlers/scst_changer.c
+++ linux-2.6.36/drivers/scst/dev_handlers/scst_changer.c
-@@ -0,0 +1,222 @@
+@@ -0,0 +1,223 @@
+/*
+ * scst_changer.c
+ *
-+ * Copyright (C) 2004 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2004 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ * Copyright (C) 2004 - 2005 Leonid Stoljar
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * SCSI medium changer (type 8) dev handler
+ *
@@ -47004,13 +47164,14 @@ diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/scst_dev_handler.h linux-
diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/scst_disk.c linux-2.6.36/drivers/scst/dev_handlers/scst_disk.c
--- orig/linux-2.6.36/drivers/scst/dev_handlers/scst_disk.c
+++ linux-2.6.36/drivers/scst/dev_handlers/scst_disk.c
-@@ -0,0 +1,379 @@
+@@ -0,0 +1,380 @@
+/*
+ * scst_disk.c
+ *
-+ * Copyright (C) 2004 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2004 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ * Copyright (C) 2004 - 2005 Leonid Stoljar
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * SCSI disk (type 0) dev handler
+ * &
@@ -47387,13 +47548,14 @@ diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/scst_disk.c linux-2.6.36/
diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/scst_modisk.c linux-2.6.36/drivers/scst/dev_handlers/scst_modisk.c
--- orig/linux-2.6.36/drivers/scst/dev_handlers/scst_modisk.c
+++ linux-2.6.36/drivers/scst/dev_handlers/scst_modisk.c
-@@ -0,0 +1,398 @@
+@@ -0,0 +1,399 @@
+/*
+ * scst_modisk.c
+ *
-+ * Copyright (C) 2004 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2004 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ * Copyright (C) 2004 - 2005 Leonid Stoljar
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * SCSI MO disk (type 7) dev handler
+ * &
@@ -47789,13 +47951,14 @@ diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/scst_modisk.c linux-2.6.3
diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/scst_processor.c linux-2.6.36/drivers/scst/dev_handlers/scst_processor.c
--- orig/linux-2.6.36/drivers/scst/dev_handlers/scst_processor.c
+++ linux-2.6.36/drivers/scst/dev_handlers/scst_processor.c
-@@ -0,0 +1,222 @@
+@@ -0,0 +1,223 @@
+/*
+ * scst_processor.c
+ *
-+ * Copyright (C) 2004 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2004 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ * Copyright (C) 2004 - 2005 Leonid Stoljar
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * SCSI medium processor (type 3) dev handler
+ *
@@ -48015,13 +48178,14 @@ diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/scst_processor.c linux-2.
diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/scst_raid.c linux-2.6.36/drivers/scst/dev_handlers/scst_raid.c
--- orig/linux-2.6.36/drivers/scst/dev_handlers/scst_raid.c
+++ linux-2.6.36/drivers/scst/dev_handlers/scst_raid.c
-@@ -0,0 +1,223 @@
+@@ -0,0 +1,224 @@
+/*
+ * scst_raid.c
+ *
-+ * Copyright (C) 2004 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2004 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ * Copyright (C) 2004 - 2005 Leonid Stoljar
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * SCSI raid(controller) (type 0xC) dev handler
+ *
@@ -48242,13 +48406,14 @@ diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/scst_raid.c linux-2.6.36/
diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/scst_tape.c linux-2.6.36/drivers/scst/dev_handlers/scst_tape.c
--- orig/linux-2.6.36/drivers/scst/dev_handlers/scst_tape.c
+++ linux-2.6.36/drivers/scst/dev_handlers/scst_tape.c
-@@ -0,0 +1,431 @@
+@@ -0,0 +1,432 @@
+/*
+ * scst_tape.c
+ *
-+ * Copyright (C) 2004 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2004 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ * Copyright (C) 2004 - 2005 Leonid Stoljar
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * SCSI tape (type 1) dev handler
+ * &
@@ -50595,10 +50760,11 @@ diff -uprN orig/linux-2.6.36/Documentation/scst/README.fcst linux-2.6.36/Documen
diff -uprN orig/linux-2.6.36/include/scst/iscsi_scst.h linux-2.6.36/include/scst/iscsi_scst.h
--- orig/linux-2.6.36/include/scst/iscsi_scst.h
+++ linux-2.6.36/include/scst/iscsi_scst.h
-@@ -0,0 +1,220 @@
+@@ -0,0 +1,221 @@
+/*
-+ * Copyright (C) 2007 - 2010 Vladislav Bolkhovitin
++ * Copyright (C) 2007 - 2011 Vladislav Bolkhovitin
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
@@ -50819,10 +50985,11 @@ diff -uprN orig/linux-2.6.36/include/scst/iscsi_scst.h linux-2.6.36/include/scst
diff -uprN orig/linux-2.6.36/include/scst/iscsi_scst_ver.h linux-2.6.36/include/scst/iscsi_scst_ver.h
--- orig/linux-2.6.36/include/scst/iscsi_scst_ver.h
+++ linux-2.6.36/include/scst/iscsi_scst_ver.h
-@@ -0,0 +1,20 @@
+@@ -0,0 +1,21 @@
+/*
-+ * Copyright (C) 2007 - 2010 Vladislav Bolkhovitin
++ * Copyright (C) 2007 - 2011 Vladislav Bolkhovitin
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
@@ -50839,14 +51006,14 @@ diff -uprN orig/linux-2.6.36/include/scst/iscsi_scst_ver.h linux-2.6.36/include/
+
+#define ISCSI_VERSION_STRING_SUFFIX
+
-+#define ISCSI_VERSION_STRING "2.0.0" ISCSI_VERSION_STRING_SUFFIX
++#define ISCSI_VERSION_STRING "2.0.0.1-rc1" ISCSI_VERSION_STRING_SUFFIX
diff -uprN orig/linux-2.6.36/include/scst/iscsi_scst_itf_ver.h linux-2.6.36/include/scst/iscsi_scst_itf_ver.h
--- orig/linux-2.6.36/include/scst/iscsi_scst_itf_ver.h
+++ linux-2.6.36/include/scst/iscsi_scst_itf_ver.h
@@ -0,0 +1,3 @@
+/* Autogenerated, don't edit */
+
-+#define ISCSI_SCST_INTERFACE_VERSION ISCSI_VERSION_STRING "_" "31815603fdea2196eb9774eac0e41bf15c9a9130"
++#define ISCSI_SCST_INTERFACE_VERSION ISCSI_VERSION_STRING "_" "57aaf159ef6c60783eff3839e56458b060ca741d"
diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/Makefile linux-2.6.36/drivers/scst/iscsi-scst/Makefile
--- orig/linux-2.6.36/drivers/scst/iscsi-scst/Makefile
+++ linux-2.6.36/drivers/scst/iscsi-scst/Makefile
@@ -50887,11 +51054,12 @@ diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/Kconfig linux-2.6.36/driver
diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/config.c linux-2.6.36/drivers/scst/iscsi-scst/config.c
--- orig/linux-2.6.36/drivers/scst/iscsi-scst/config.c
+++ linux-2.6.36/drivers/scst/iscsi-scst/config.c
-@@ -0,0 +1,1032 @@
+@@ -0,0 +1,1033 @@
+/*
+ * Copyright (C) 2004 - 2005 FUJITA Tomonori <tomof@acm.org>
-+ * Copyright (C) 2007 - 2010 Vladislav Bolkhovitin
++ * Copyright (C) 2007 - 2011 Vladislav Bolkhovitin
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
@@ -51923,11 +52091,12 @@ diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/config.c linux-2.6.36/drive
diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/conn.c linux-2.6.36/drivers/scst/iscsi-scst/conn.c
--- orig/linux-2.6.36/drivers/scst/iscsi-scst/conn.c
+++ linux-2.6.36/drivers/scst/iscsi-scst/conn.c
-@@ -0,0 +1,910 @@
+@@ -0,0 +1,911 @@
+/*
+ * Copyright (C) 2002 - 2003 Ardis Technolgies <roman@ardistech.com>
-+ * Copyright (C) 2007 - 2010 Vladislav Bolkhovitin
++ * Copyright (C) 2007 - 2011 Vladislav Bolkhovitin
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
@@ -52837,14 +53006,15 @@ diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/conn.c linux-2.6.36/drivers
diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/digest.c linux-2.6.36/drivers/scst/iscsi-scst/digest.c
--- orig/linux-2.6.36/drivers/scst/iscsi-scst/digest.c
+++ linux-2.6.36/drivers/scst/iscsi-scst/digest.c
-@@ -0,0 +1,244 @@
+@@ -0,0 +1,245 @@
+/*
+ * iSCSI digest handling.
+ *
+ * Copyright (C) 2004 - 2006 Xiranet Communications GmbH
+ * <arne.redlich@xiranet.com>
-+ * Copyright (C) 2007 - 2010 Vladislav Bolkhovitin
++ * Copyright (C) 2007 - 2011 Vladislav Bolkhovitin
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
@@ -53085,13 +53255,14 @@ diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/digest.c linux-2.6.36/drive
diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/digest.h linux-2.6.36/drivers/scst/iscsi-scst/digest.h
--- orig/linux-2.6.36/drivers/scst/iscsi-scst/digest.h
+++ linux-2.6.36/drivers/scst/iscsi-scst/digest.h
-@@ -0,0 +1,31 @@
+@@ -0,0 +1,32 @@
+/*
+ * iSCSI digest handling.
+ *
+ * Copyright (C) 2004 Xiranet Communications GmbH <arne.redlich@xiranet.com>
-+ * Copyright (C) 2007 - 2010 Vladislav Bolkhovitin
++ * Copyright (C) 2007 - 2011 Vladislav Bolkhovitin
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
@@ -53120,13 +53291,14 @@ diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/digest.h linux-2.6.36/drive
diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/event.c linux-2.6.36/drivers/scst/iscsi-scst/event.c
--- orig/linux-2.6.36/drivers/scst/iscsi-scst/event.c
+++ linux-2.6.36/drivers/scst/iscsi-scst/event.c
-@@ -0,0 +1,165 @@
+@@ -0,0 +1,166 @@
+/*
+ * Event notification code.
+ *
+ * Copyright (C) 2005 FUJITA Tomonori <tomof@acm.org>
-+ * Copyright (C) 2007 - 2010 Vladislav Bolkhovitin
++ * Copyright (C) 2007 - 2011 Vladislav Bolkhovitin
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
@@ -53289,11 +53461,12 @@ diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/event.c linux-2.6.36/driver
diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/iscsi.c linux-2.6.36/drivers/scst/iscsi-scst/iscsi.c
--- orig/linux-2.6.36/drivers/scst/iscsi-scst/iscsi.c
+++ linux-2.6.36/drivers/scst/iscsi-scst/iscsi.c
-@@ -0,0 +1,3956 @@
+@@ -0,0 +1,3957 @@
+/*
+ * Copyright (C) 2002 - 2003 Ardis Technolgies <roman@ardistech.com>
-+ * Copyright (C) 2007 - 2010 Vladislav Bolkhovitin
++ * Copyright (C) 2007 - 2011 Vladislav Bolkhovitin
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
@@ -57246,78 +57419,15 @@ diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/iscsi.c linux-2.6.36/driver
+MODULE_VERSION(ISCSI_VERSION_STRING);
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("SCST iSCSI Target");
-diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/iscsi_dbg.h linux-2.6.36/drivers/scst/iscsi-scst/iscsi_dbg.h
---- orig/linux-2.6.36/drivers/scst/iscsi-scst/iscsi_dbg.h
-+++ linux-2.6.36/drivers/scst/iscsi-scst/iscsi_dbg.h
-@@ -0,0 +1,60 @@
-+/*
-+ * Copyright (C) 2007 - 2010 Vladislav Bolkhovitin
-+ * Copyright (C) 2007 - 2010 ID7 Ltd.
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * as published by the Free Software Foundation, version 2
-+ * of the License.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ */
-+
-+#ifndef ISCSI_DBG_H
-+#define ISCSI_DBG_H
-+
-+#define LOG_PREFIX "iscsi-scst"
-+
-+#include <scst/scst_debug.h>
-+
-+#define TRACE_D_WRITE 0x80000000
-+#define TRACE_CONN_OC 0x40000000
-+#define TRACE_D_IOV 0x20000000
-+#define TRACE_D_DUMP_PDU 0x10000000
-+#define TRACE_NET_PG 0x08000000
-+#define TRACE_CONN_OC_DBG 0x04000000
-+
-+#ifdef CONFIG_SCST_DEBUG
-+#define ISCSI_DEFAULT_LOG_FLAGS (TRACE_FUNCTION | TRACE_LINE | TRACE_PID | \
-+ TRACE_OUT_OF_MEM | TRACE_MGMT | TRACE_MGMT_DEBUG | \
-+ TRACE_MINOR | TRACE_SPECIAL | TRACE_CONN_OC)
-+#else
-+#define ISCSI_DEFAULT_LOG_FLAGS (TRACE_OUT_OF_MEM | TRACE_MGMT | \
-+ TRACE_SPECIAL)
-+#endif
-+
-+#ifdef CONFIG_SCST_DEBUG
-+struct iscsi_pdu;
-+struct iscsi_cmnd;
-+extern void iscsi_dump_pdu(struct iscsi_pdu *pdu);
-+extern unsigned long iscsi_get_flow_ctrl_or_mgmt_dbg_log_flag(
-+ struct iscsi_cmnd *cmnd);
-+#else
-+#define iscsi_dump_pdu(x) do {} while (0)
-+#define iscsi_get_flow_ctrl_or_mgmt_dbg_log_flag(x) do {} while (0)
-+#endif
-+
-+#if defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING)
-+extern unsigned long iscsi_trace_flag;
-+#define trace_flag iscsi_trace_flag
-+#endif
-+
-+#define TRACE_CONN_CLOSE(args...) TRACE_DBG_FLAG(TRACE_DEBUG|TRACE_CONN_OC, args)
-+#define TRACE_CONN_CLOSE_DBG(args...) TRACE(TRACE_CONN_OC_DBG, args)
-+#define TRACE_NET_PAGE(args...) TRACE_DBG_FLAG(TRACE_NET_PG, args)
-+#define TRACE_WRITE(args...) TRACE_DBG_FLAG(TRACE_DEBUG|TRACE_D_WRITE, args)
-+
-+#endif
diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/iscsi.h linux-2.6.36/drivers/scst/iscsi-scst/iscsi.h
--- orig/linux-2.6.36/drivers/scst/iscsi-scst/iscsi.h
+++ linux-2.6.36/drivers/scst/iscsi-scst/iscsi.h
-@@ -0,0 +1,743 @@
+@@ -0,0 +1,744 @@
+/*
+ * Copyright (C) 2002 - 2003 Ardis Technolgies <roman@ardistech.com>
-+ * Copyright (C) 2007 - 2010 Vladislav Bolkhovitin
++ * Copyright (C) 2007 - 2011 Vladislav Bolkhovitin
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
@@ -58057,14 +58167,80 @@ diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/iscsi.h linux-2.6.36/driver
+#endif
+
+#endif /* __ISCSI_H__ */
+diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/iscsi_dbg.h linux-2.6.36/drivers/scst/iscsi-scst/iscsi_dbg.h
+--- orig/linux-2.6.36/drivers/scst/iscsi-scst/iscsi_dbg.h
++++ linux-2.6.36/drivers/scst/iscsi-scst/iscsi_dbg.h
+@@ -0,0 +1,61 @@
++/*
++ * Copyright (C) 2007 - 2011 Vladislav Bolkhovitin
++ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation, version 2
++ * of the License.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ */
++
++#ifndef ISCSI_DBG_H
++#define ISCSI_DBG_H
++
++#define LOG_PREFIX "iscsi-scst"
++
++#include <scst/scst_debug.h>
++
++#define TRACE_D_WRITE 0x80000000
++#define TRACE_CONN_OC 0x40000000
++#define TRACE_D_IOV 0x20000000
++#define TRACE_D_DUMP_PDU 0x10000000
++#define TRACE_NET_PG 0x08000000
++#define TRACE_CONN_OC_DBG 0x04000000
++
++#ifdef CONFIG_SCST_DEBUG
++#define ISCSI_DEFAULT_LOG_FLAGS (TRACE_FUNCTION | TRACE_LINE | TRACE_PID | \
++ TRACE_OUT_OF_MEM | TRACE_MGMT | TRACE_MGMT_DEBUG | \
++ TRACE_MINOR | TRACE_SPECIAL | TRACE_CONN_OC)
++#else
++#define ISCSI_DEFAULT_LOG_FLAGS (TRACE_OUT_OF_MEM | TRACE_MGMT | \
++ TRACE_SPECIAL)
++#endif
++
++#ifdef CONFIG_SCST_DEBUG
++struct iscsi_pdu;
++struct iscsi_cmnd;
++extern void iscsi_dump_pdu(struct iscsi_pdu *pdu);
++extern unsigned long iscsi_get_flow_ctrl_or_mgmt_dbg_log_flag(
++ struct iscsi_cmnd *cmnd);
++#else
++#define iscsi_dump_pdu(x) do {} while (0)
++#define iscsi_get_flow_ctrl_or_mgmt_dbg_log_flag(x) do {} while (0)
++#endif
++
++#if defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING)
++extern unsigned long iscsi_trace_flag;
++#define trace_flag iscsi_trace_flag
++#endif
++
++#define TRACE_CONN_CLOSE(args...) TRACE_DBG_FLAG(TRACE_DEBUG|TRACE_CONN_OC, args)
++#define TRACE_CONN_CLOSE_DBG(args...) TRACE(TRACE_CONN_OC_DBG, args)
++#define TRACE_NET_PAGE(args...) TRACE_DBG_FLAG(TRACE_NET_PG, args)
++#define TRACE_WRITE(args...) TRACE_DBG_FLAG(TRACE_DEBUG|TRACE_D_WRITE, args)
++
++#endif
diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/iscsi_hdr.h linux-2.6.36/drivers/scst/iscsi-scst/iscsi_hdr.h
--- orig/linux-2.6.36/drivers/scst/iscsi-scst/iscsi_hdr.h
+++ linux-2.6.36/drivers/scst/iscsi-scst/iscsi_hdr.h
-@@ -0,0 +1,525 @@
+@@ -0,0 +1,526 @@
+/*
+ * Copyright (C) 2002 - 2003 Ardis Technolgies <roman@ardistech.com>
-+ * Copyright (C) 2007 - 2010 Vladislav Bolkhovitin
++ * Copyright (C) 2007 - 2011 Vladislav Bolkhovitin
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
@@ -58589,13 +58765,14 @@ diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/iscsi_hdr.h linux-2.6.36/dr
diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/nthread.c linux-2.6.36/drivers/scst/iscsi-scst/nthread.c
--- orig/linux-2.6.36/drivers/scst/iscsi-scst/nthread.c
+++ linux-2.6.36/drivers/scst/iscsi-scst/nthread.c
-@@ -0,0 +1,1838 @@
+@@ -0,0 +1,1839 @@
+/*
+ * Network threads.
+ *
+ * Copyright (C) 2004 - 2005 FUJITA Tomonori <tomof@acm.org>
-+ * Copyright (C) 2007 - 2010 Vladislav Bolkhovitin
++ * Copyright (C) 2007 - 2011 Vladislav Bolkhovitin
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
@@ -60431,11 +60608,12 @@ diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/nthread.c linux-2.6.36/driv
diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/param.c linux-2.6.36/drivers/scst/iscsi-scst/param.c
--- orig/linux-2.6.36/drivers/scst/iscsi-scst/param.c
+++ linux-2.6.36/drivers/scst/iscsi-scst/param.c
-@@ -0,0 +1,306 @@
+@@ -0,0 +1,307 @@
+/*
+ * Copyright (C) 2005 FUJITA Tomonori <tomof@acm.org>
-+ * Copyright (C) 2007 - 2010 Vladislav Bolkhovitin
++ * Copyright (C) 2007 - 2011 Vladislav Bolkhovitin
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
@@ -60741,11 +60919,12 @@ diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/param.c linux-2.6.36/driver
diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/session.c linux-2.6.36/drivers/scst/iscsi-scst/session.c
--- orig/linux-2.6.36/drivers/scst/iscsi-scst/session.c
+++ linux-2.6.36/drivers/scst/iscsi-scst/session.c
-@@ -0,0 +1,499 @@
+@@ -0,0 +1,500 @@
+/*
+ * Copyright (C) 2002 - 2003 Ardis Technolgies <roman@ardistech.com>
-+ * Copyright (C) 2007 - 2010 Vladislav Bolkhovitin
++ * Copyright (C) 2007 - 2011 Vladislav Bolkhovitin
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
@@ -61244,11 +61423,12 @@ diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/session.c linux-2.6.36/driv
diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/target.c linux-2.6.36/drivers/scst/iscsi-scst/target.c
--- orig/linux-2.6.36/drivers/scst/iscsi-scst/target.c
+++ linux-2.6.36/drivers/scst/iscsi-scst/target.c
-@@ -0,0 +1,533 @@
+@@ -0,0 +1,534 @@
+/*
+ * Copyright (C) 2002 - 2003 Ardis Technolgies <roman@ardistech.com>
-+ * Copyright (C) 2007 - 2010 Vladislav Bolkhovitin
++ * Copyright (C) 2007 - 2011 Vladislav Bolkhovitin
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
@@ -62519,21 +62699,22 @@ diff -uprN orig/linux-2.6.36/Documentation/scst/README.iscsi linux-2.6.36/Docume
+
+ * Tomasz Chmielewski <mangoo@wpkg.org> for testing and suggestions
+
-+ * Bart Van Assche <bart.vanassche@gmail.com> for a lot of help
++ * Bart Van Assche <bvanassche@acm.org> for a lot of help
+
+Vladislav Bolkhovitin <vst@vlnb.net>, http://scst.sourceforge.net
+
diff -uprN orig/linux-2.6.36/drivers/scsi/qla2xxx/qla2x_tgt.h linux-2.6.36/drivers/scsi/qla2xxx/qla2x_tgt.h
--- orig/linux-2.6.36/drivers/scsi/qla2xxx/qla2x_tgt.h
+++ linux-2.6.36/drivers/scsi/qla2xxx/qla2x_tgt.h
-@@ -0,0 +1,131 @@
+@@ -0,0 +1,132 @@
+/*
+ * qla2x_tgt.h
+ *
-+ * Copyright (C) 2004 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2004 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ * Copyright (C) 2004 - 2005 Leonid Stoljar
+ * Copyright (C) 2006 Nathaniel Clark <nate@misrule.us>
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * Additional file for the target driver support.
+ *
@@ -62661,14 +62842,15 @@ diff -uprN orig/linux-2.6.36/drivers/scsi/qla2xxx/qla2x_tgt.h linux-2.6.36/drive
diff -uprN orig/linux-2.6.36/drivers/scsi/qla2xxx/qla2x_tgt_def.h linux-2.6.36/drivers/scsi/qla2xxx/qla2x_tgt_def.h
--- orig/linux-2.6.36/drivers/scsi/qla2xxx/qla2x_tgt_def.h
+++ linux-2.6.36/drivers/scsi/qla2xxx/qla2x_tgt_def.h
-@@ -0,0 +1,729 @@
+@@ -0,0 +1,730 @@
+/*
+ * qla2x_tgt_def.h
+ *
-+ * Copyright (C) 2004 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2004 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ * Copyright (C) 2004 - 2005 Leonid Stoljar
+ * Copyright (C) 2006 Nathaniel Clark <nate@misrule.us>
+ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * Additional file for the target driver support.
+ *
@@ -63437,14 +63619,15 @@ diff -uprN orig/linux-2.6.36/drivers/scst/qla2xxx-target/Kconfig linux-2.6.36/dr
diff -uprN orig/linux-2.6.36/drivers/scst/qla2xxx-target/qla2x00t.c linux-2.6.36/drivers/scst/qla2xxx-target/qla2x00t.c
--- orig/linux-2.6.36/drivers/scst/qla2xxx-target/qla2x00t.c
+++ linux-2.6.36/drivers/scst/qla2xxx-target/qla2x00t.c
-@@ -0,0 +1,5486 @@
+@@ -0,0 +1,5487 @@
+/*
+ * qla2x00t.c
+ *
-+ * Copyright (C) 2004 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2004 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ * Copyright (C) 2004 - 2005 Leonid Stoljar
+ * Copyright (C) 2006 Nathaniel Clark <nate@misrule.us>
+ * Copyright (C) 2006 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * QLogic 22xx/23xx/24xx/25xx FC target driver.
+ *
@@ -68927,14 +69110,15 @@ diff -uprN orig/linux-2.6.36/drivers/scst/qla2xxx-target/qla2x00t.c linux-2.6.36
diff -uprN orig/linux-2.6.36/drivers/scst/qla2xxx-target/qla2x00t.h linux-2.6.36/drivers/scst/qla2xxx-target/qla2x00t.h
--- orig/linux-2.6.36/drivers/scst/qla2xxx-target/qla2x00t.h
+++ linux-2.6.36/drivers/scst/qla2xxx-target/qla2x00t.h
-@@ -0,0 +1,273 @@
+@@ -0,0 +1,274 @@
+/*
+ * qla2x00t.h
+ *
-+ * Copyright (C) 2004 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2004 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ * Copyright (C) 2004 - 2005 Leonid Stoljar
+ * Copyright (C) 2006 Nathaniel Clark <nate@misrule.us>
+ * Copyright (C) 2006 - 2010 ID7 Ltd.
++ * Copyright (C) 2010 - 2011 SCST Ltd.
+ *
+ * QLogic 22xx/23xx/24xx/25xx FC target driver.
+ *
@@ -68960,8 +69144,8 @@ diff -uprN orig/linux-2.6.36/drivers/scst/qla2xxx-target/qla2x00t.h linux-2.6.36
+
+/* Version numbers, the same as for the kernel */
+#define Q2T_VERSION(a, b, c, d) (((a) << 030) + ((b) << 020) + (c) << 010 + (d))
-+#define Q2T_VERSION_CODE Q2T_VERSION(1, 0, 2, 0)
-+#define Q2T_VERSION_STRING "2.0.0"
++#define Q2T_VERSION_CODE Q2T_VERSION(2, 0, 0, 1)
++#define Q2T_VERSION_STRING "2.0.0.1-rc1"
+#define Q2T_PROC_VERSION_NAME "version"
+
+#define Q2T_MAX_CDB_LEN 16
@@ -69901,8 +70085,8 @@ diff -uprN orig/linux-2.6.36/drivers/scst/srpt/ib_srpt.c linux-2.6.36/drivers/sc
@@ -0,0 +1,3698 @@
+/*
+ * Copyright (c) 2006 - 2009 Mellanox Technology Inc. All rights reserved.
++ * Copyright (C) 2008 - 2010 Bart Van Assche <bvanassche@acm.org>.
+ * Copyright (C) 2008 Vladislav Bolkhovitin <vst@vlnb.net>
-+ * Copyright (C) 2008 - 2010 Bart Van Assche <bart.vanassche@gmail.com>
+ *
+ * This software is available to you under a choice of one of two
+ * licenses. You may choose to be licensed under the terms of the GNU
@@ -73603,7 +73787,7 @@ diff -uprN orig/linux-2.6.36/drivers/scst/srpt/ib_srpt.h linux-2.6.36/drivers/sc
@@ -0,0 +1,353 @@
+/*
+ * Copyright (c) 2006 - 2009 Mellanox Technology Inc. All rights reserved.
-+ * Copyright (C) 2009 - 2010 Bart Van Assche <bart.vanassche@gmail.com>
++ * Copyright (C) 2009 - 2010 Bart Van Assche <bvanassche@acm.org>
+ *
+ * This software is available to you under a choice of one of two
+ * licenses. You may choose to be licensed under the terms of the GNU
@@ -74066,7 +74250,7 @@ diff -uprN orig/linux-2.6.36/Documentation/scst/README.srpt linux-2.6.36/Documen
+"thread=1".
+
+Send questions about this driver to scst-devel@lists.sourceforge.net, CC:
-+Vu Pham <vuhuong@mellanox.com> and Bart Van Assche <bart.vanassche@gmail.com>.
++Vu Pham <vuhuong@mellanox.com> and Bart Van Assche <bvanassche@acm.org>.
diff -uprN orig/linux-2.6.36/drivers/scst/scst_local/Kconfig linux-2.6.36/drivers/scst/scst_local/Kconfig
--- orig/linux-2.6.36/drivers/scst/scst_local/Kconfig
+++ linux-2.6.36/drivers/scst/scst_local/Kconfig
@@ -74106,7 +74290,7 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_local/scst_local.c linux-2.6.36/d
+/*
+ * Copyright (C) 2008 - 2010 Richard Sharpe
+ * Copyright (C) 1992 Eric Youngdale
-+ * Copyright (C) 2008 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2008 - 2011 Vladislav Bolkhovitin <vst@vlnb.net>
+ *
+ * Simulate a host adapter and an SCST target adapter back to back
+ *
@@ -74987,7 +75171,7 @@ diff -uprN orig/linux-2.6.36/drivers/scst/scst_local/scst_local.c linux-2.6.36/d
+ {
+ struct Scsi_Host *h = SCpnt->device->host;
+ spin_unlock_irq(h->host_lock);
-+ scst_cmd_init_done(scst_cmd, scst_estimate_context_direct());
++ scst_cmd_init_done(scst_cmd, scst_estimate_context_atomic());
+ spin_lock_irq(h->host_lock);
+ }
+#else