diff --git a/nightly/conf/nightly.conf b/nightly/conf/nightly.conf index a7d386a6a..3f03f01f1 100644 --- a/nightly/conf/nightly.conf +++ b/nightly/conf/nightly.conf @@ -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 \ diff --git a/qla2x00t/qla2x00-target/Makefile_in-tree-4.0 b/qla2x00t/qla2x00-target/Makefile_in-tree-4.0 new file mode 100644 index 000000000..9657aee84 --- /dev/null +++ b/qla2x00t/qla2x00-target/Makefile_in-tree-4.0 @@ -0,0 +1,5 @@ +ccflags-y += -Idrivers/scsi/qla2xxx + +qla2x00tgt-y := qla2x00t.o + +obj-$(CONFIG_SCST_QLA_TGT_ADDON) += qla2x00tgt.o diff --git a/scripts/kernel-functions b/scripts/kernel-functions index ce527498e..609ce564e 100644 --- a/scripts/kernel-functions +++ b/scripts/kernel-functions @@ -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 $? ( diff --git a/scripts/specialize-patch b/scripts/specialize-patch index f0b0e79ce..b10179c6b 100755 --- a/scripts/specialize-patch +++ b/scripts/specialize-patch @@ -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 diff --git a/scst/include/scst.h b/scst/include/scst.h index dc6273dc7..513195600 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -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; diff --git a/scst/kernel/in-tree/Kconfig.drivers.Linux-4.0.patch b/scst/kernel/in-tree/Kconfig.drivers.Linux-4.0.patch new file mode 100644 index 000000000..39d30a55e --- /dev/null +++ b/scst/kernel/in-tree/Kconfig.drivers.Linux-4.0.patch @@ -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" diff --git a/scst/kernel/in-tree/Makefile.dev_handlers-4.0 b/scst/kernel/in-tree/Makefile.dev_handlers-4.0 new file mode 100644 index 000000000..f933b36f7 --- /dev/null +++ b/scst/kernel/in-tree/Makefile.dev_handlers-4.0 @@ -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 diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-4.0.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-4.0.patch new file mode 100644 index 000000000..6bbacd12f --- /dev/null +++ b/scst/kernel/in-tree/Makefile.drivers.Linux-4.0.patch @@ -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 diff --git a/scst/kernel/in-tree/Makefile.scst-4.0 b/scst/kernel/in-tree/Makefile.scst-4.0 new file mode 100644 index 000000000..53af5f388 --- /dev/null +++ b/scst/kernel/in-tree/Makefile.scst-4.0 @@ -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/ diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 3436167af..e25753ec1 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -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); } diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index be0029837..2103ca260 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -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); diff --git a/scst_local/in-tree/Makefile-4.0 b/scst_local/in-tree/Makefile-4.0 new file mode 100644 index 000000000..8cbbbff63 --- /dev/null +++ b/scst_local/in-tree/Makefile-4.0 @@ -0,0 +1,2 @@ +obj-$(CONFIG_SCST_LOCAL) += scst_local.o + diff --git a/srpt/README b/srpt/README index 85bb1a4da..85f9b91c3 100644 --- a/srpt/README +++ b/srpt/README @@ -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: