Merge trunk r6232 into iser branch

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@6234 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2015-06-10 15:16:23 +00:00
parent 75259f141b
commit c97bb709db
13 changed files with 81 additions and 20 deletions

View File

@@ -3,7 +3,9 @@
ABT_DETAILS="x86_64"
ABT_JOBS=5
ABT_KERNELS=" \
3.18.8 \
4.0 \
3.19.4-nc \
3.18.8-nc \
3.17.8-nc \
3.16.7-nc \
3.15.10-nc \

View File

@@ -0,0 +1,5 @@
ccflags-y += -Idrivers/scsi/qla2xxx
qla2x00tgt-y := qla2x00t.o
obj-$(CONFIG_SCST_QLA_TGT_ADDON) += qla2x00tgt.o

View File

@@ -44,11 +44,10 @@ function download_kernel {
local plevel="$(patchlevel $1)"
local series="$1"
if [ "${series:0:2}" = "3." ]; then
series="3.x"
else
series="${series:0:3}"
fi
case "${series:0:2}" in
[12].*) series="${series:0:3}";;
*) series="${series/.*/}.x";;
esac
mkdir -p "${kernel_sources}" || return $?
test -w "${kernel_sources}" || return $?
(

View File

@@ -478,7 +478,7 @@ BEGIN {
exit 1
}
LINUX_VERSION_CODE = version_code(kernel_version)
if (LINUX_VERSION_CODE < 2*65536 || LINUX_VERSION_CODE > 4*65536)
if (LINUX_VERSION_CODE < 2*65536)
{
printf "Error: kernel version (%s) is out of range.\n", kernel_version
exit 1

View File

@@ -808,7 +808,7 @@ enum scst_dif_actions {
SCST_DIF_CHECK_APP_TAG = 2,
SCST_DIF_CHECK_REF_TAG = 4,
#define SCST_DIF_CHECKS_MASK (SCST_DIF_CHECK_GUARD_TAG|SCST_DIF_CHECK_APP_TAG| \
SCST_DIF_CHECK_REF_TAG)
SCST_DIF_CHECK_REF_TAG)
#define SCST_DIF_ACTION_SHIFT 4
/* How to handle PI */
@@ -1028,7 +1028,7 @@ struct scst_tgt_template {
* receiving DIF PI tags. If false, SCST will not allow to add
* DIF-enabled devices to this target driver's initiator groups.
*
* Can be overriden per target by scst_tgt_set_dif_supported()
* Can be overridden per target by scst_tgt_set_dif_supported()
*/
unsigned dif_supported:1;
@@ -1038,7 +1038,7 @@ struct scst_tgt_template {
* allow to add type 1 devices with TGT DIF mode to this target driver's
* initiator groups.
*
* Can be overriden per target by scst_tgt_set_hw_dif_type1_supported()
* Can be overridden per target by scst_tgt_set_hw_dif_type1_supported()
*/
unsigned hw_dif_type1_supported:1;
@@ -1048,7 +1048,7 @@ struct scst_tgt_template {
* allow to add type 2 devices with TGT DIF mode to this target driver's
* initiator groups.
*
* Can be overriden per target by scst_tgt_set_hw_dif_type2_supported()
* Can be overridden per target by scst_tgt_set_hw_dif_type2_supported()
*/
unsigned hw_dif_type2_supported:1;
@@ -1058,7 +1058,7 @@ struct scst_tgt_template {
* allow to add type 3 devices with TGT DIF mode to this target driver's
* initiator groups.
*
* Can be overriden per target by scst_tgt_set_hw_dif_type3_supported()
* Can be overridden per target by scst_tgt_set_hw_dif_type3_supported()
*/
unsigned hw_dif_type3_supported:1;
@@ -1068,7 +1068,7 @@ struct scst_tgt_template {
* and CRC on SCST/target driver boundary for better performance,
* because IP checksums are much cheaper for CPU, than CRC.
*
* Can be overriden per target by scst_tgt_set_hw_dif_ip_supported()
* Can be overridden per target by scst_tgt_set_hw_dif_ip_supported()
*/
unsigned hw_dif_ip_supported:1;
@@ -1077,7 +1077,7 @@ struct scst_tgt_template {
* and DIF tags SG vectors. Otherwise, for DIF tags minimally possible
* SG vector size will be allocated.
*
* Can be overriden per target by scst_tgt_set_hw_dif_same_sg_layout_required()
* Can be overridden per target by scst_tgt_set_hw_dif_same_sg_layout_required()
*/
unsigned hw_dif_same_sg_layout_required:1;

View File

@@ -0,0 +1,13 @@
diff --git a/drivers/Kconfig b/drivers/Kconfig
index c70d6e4..0a4ed1b 100644
--- a/drivers/Kconfig
+++ b/drivers/Kconfig
@@ -26,6 +26,8 @@ source "drivers/ide/Kconfig"
source "drivers/scsi/Kconfig"
+source "drivers/scst/Kconfig"
+
source "drivers/ata/Kconfig"
source "drivers/md/Kconfig"

View File

@@ -0,0 +1,14 @@
ccflags-y += -Wno-unused-parameter
obj-m := scst_cdrom.o scst_changer.o scst_disk.o scst_modisk.o scst_tape.o \
scst_vdisk.o scst_raid.o scst_processor.o scst_user.o
obj-$(CONFIG_SCST_DISK) += scst_disk.o
obj-$(CONFIG_SCST_TAPE) += scst_tape.o
obj-$(CONFIG_SCST_CDROM) += scst_cdrom.o
obj-$(CONFIG_SCST_MODISK) += scst_modisk.o
obj-$(CONFIG_SCST_CHANGER) += scst_changer.o
obj-$(CONFIG_SCST_RAID) += scst_raid.o
obj-$(CONFIG_SCST_PROCESSOR) += scst_processor.o
obj-$(CONFIG_SCST_VDISK) += scst_vdisk.o
obj-$(CONFIG_SCST_USER) += scst_user.o

View File

@@ -0,0 +1,12 @@
diff --git a/drivers/Makefile b/drivers/Makefile
index 527a6da..db2c24f 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -137,6 +137,7 @@ obj-$(CONFIG_SSB) += ssb/
obj-$(CONFIG_BCMA) += bcma/
obj-$(CONFIG_VHOST_RING) += vhost/
obj-$(CONFIG_VLYNQ) += vlynq/
+obj-$(CONFIG_SCST) += scst/
obj-$(CONFIG_STAGING) += staging/
obj-y += platform/
#common clk code

View File

@@ -0,0 +1,13 @@
ccflags-y += -Wno-unused-parameter
scst-y += scst_main.o
scst-y += scst_pres.o
scst-y += scst_targ.o
scst-y += scst_lib.o
scst-y += scst_sysfs.o
scst-y += scst_mem.o
scst-y += scst_tg.o
scst-y += scst_debug.o
obj-$(CONFIG_SCST) += scst.o dev_handlers/ fcst/ iscsi-scst/ qla2xxx-target/ \
srpt/ scst_local/

View File

@@ -1941,7 +1941,7 @@ static int vdisk_format_dif(struct scst_cmd *cmd, uint64_t start_lba,
&loff);
if (err < 0) {
PRINT_ERROR("Formatting DIF write() returned %lld from "
"%zd", (long long unsigned int)err, full_len);
"%zd", (long long)err, full_len);
if (err == -EAGAIN)
scst_set_busy(cmd);
else
@@ -2841,8 +2841,8 @@ static bool vdisk_parse_offset(struct vdisk_cmd_params *p, struct scst_cmd *cmd)
fua = (cdb[10] & 0x8);
if (fua)
TRACE(TRACE_ORDER, "FUA: loff=%lld, data_len=%lld",
(long long unsigned int)loff,
(long long unsigned int)data_len);
(unsigned long long)loff,
(unsigned long long)data_len);
}
break;
case WRITE_10:
@@ -5729,7 +5729,7 @@ restart:
if (err < 0) {
unsigned long flags;
PRINT_ERROR("DIF write() returned %lld from %zd",
(long long unsigned int)err, full_len);
(long long)err, full_len);
/* To protect sense setting with blockio */
spin_lock_irqsave(&vdev_err_lock, flags);
if (err == -EAGAIN)
@@ -7132,7 +7132,7 @@ out:
static enum compl_status_e blockio_exec_write_verify(struct vdisk_cmd_params *p)
{
/* Not yet implemented */
WARN_ON(true);
PRINT_WARNING("vdisk_blockio: WRITE VERIFY is not yet implemented");
return blockio_exec_write(p);
}

View File

@@ -698,6 +698,7 @@ static int scst_parse_cmd(struct scst_cmd *cmd)
if (scst_cmd_is_expected_set(cmd)) {
TRACE(TRACE_MINOR, "Using initiator supplied values: "
"direction %d, transfer_len %d/%d/%d",
cmd->expected_data_direction,
scst_cmd_get_expected_transfer_len_data(cmd),
scst_cmd_get_expected_transfer_len_dif(cmd),
cmd->expected_out_transfer_len);

View File

@@ -0,0 +1,2 @@
obj-$(CONFIG_SCST_LOCAL) += scst_local.o

View File

@@ -366,7 +366,7 @@ Performance Notes - Target Side
Performance Notes - Initiator Side
----------------------------------
* Using multiple RDMA connections between initator and target results in a
* Using multiple RDMA connections between initiator and target results in a
significant performance improvement. To benefit from this feature, use
kernel 3.19 or later at the initiator side and enable scsi-mq either by
setting SCSI_MQ_DEFAULT=y in the kernel config or via the following command: