Additionally, surround complex values with parentheses, declare static
char arrays const and change C++ comments into C comments.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6849 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Not all SCST components handle DESTDIR properly, or at all.
In particular:
* INSTALL_MOD_PATH should account for DESTDIR when 'make modules_install'
is invoked, so the kernel make infrastructure deploys the modules
and runs depmod against the proper directory tree.
* depmods must include a '-b' option to reference the proper directory tree.
* Drop special ISCSI_DESTDIR.
Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5289 d57e44dd-8a1f-0410-8b47-8ef2f437770f
When deriving the kernel version (KVER) from KDIR, the file
$(KDIR)/include/config/kernel.release should be preferred over
'make kernelversion'.
For example, the Ubuntu 3.2.0-23-generic kernel has a kernel.release
file containing '3.2.0-23-generic', but 'make kernelversion' returns
3.2.14. Since the modules are stored under /lib/modules/3.2.0-23-generic,
the value in kernel.release is the correct one to use.
Also:
- Evaluate KVER only once
- All depmod commands must include KVER
Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
[bvanassche: Split long lines / removed trailing whitespace]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5286 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Running 'make modules_install' already triggers invocation of depmod,
hence leave it out from those Makefiles that use 'make modules_install'.
Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5283 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Currently the install location of SCST is pretty much hard coded into
the Makefiles to be /usr/local.
I am custom building a system for ZFS & SCST and I want to install in
/usr instead of /usr/local.
Currently I am doing a “find . -name Makefile -exec sed -i 's:/usr/local:/usr:g'
{} \;” to accommodate this.
This patch fixes it.
From Sietse van Zanen <sietse@wizdom.nu>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4791 d57e44dd-8a1f-0410-8b47-8ef2f437770f
While writing DKMS support for the SCST and iSCST-SCST kernel modules, I ran
into a (common) problem with regard to out-of-tree build detection. A common
method to detect out-of-tree building is by using the KERNELRELEASE variable.
The usage of this variable poses a problem when using DKMS. DKMS itself uses
the KERNELRELEASE variable to specify the kernel for which the driver to
build. A suggested alternative would to use the PATCHLEVEL variable as part
of the detection mechanism instead. I attached a patch reflecting this
suggested change.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@720 d57e44dd-8a1f-0410-8b47-8ef2f437770f
WARNING! This commit changes external SCST interface, so it can break compilation of your out of SCST SVN tree target driver or dev handler. To fix it, simply supply the preferred exection context to scst_cmd_done() and/or scst_tgt_cmd_done().
Thanks to Bart Van Assche <bart.vanassche@gmail.com> for pointing on it.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@556 d57e44dd-8a1f-0410-8b47-8ef2f437770f
an external module. When applying the SCST kernel patch to the mainstream
kernel tree with debugging and/or tracing enabled however, the resulting code
triggers a compiler error. This is because the symbols DEBUG and TRACING
conflict with symbols with the same named defined in unrelated kernel headers.
The patch below resolves these conflicts by renaming the following preprocessor
symbols:
- DEBUG into CONFIG_SCST_DEBUG.
- DEBUG_DIGEST_FAILURES into CONFIG_SCST_ISCSI_DEBUG_DIGEST_FAILURES.
- DEBUG_OOM into CONFIG_SCST_DEBUG_OOM.
- DEBUG_RETRY into CONFIG_SCST_DEBUG_RETRY.
- DEBUG_SN into CONFIG_SCST_DEBUG_SN.
- DEBUG_TM into CONFIG_SCST_DEBUG_TM.
- EXTRACHECKS into CONFIG_SCST_EXTRACHECKS.
- SCST_HIGHMEM into CONFIG_SCST_HIGHMEM.
- STRICT_SERIALIZING into CONFIG_SCST_STRICT_SERIALIZING.
- TM_DBG_GO_OFFLINE into CONFIG_SCST_TM_DBG_GO_OFFLINE. Mapped 0/1 values
into macro undefined / macro defined.
- TRACING into CONFIG_SCST_TRACING.
- USE_EXPECTED_VALUES into CONFIG_SCST_USE_EXPECTED_VALUES.
- In qla_isp/linux/isp_scst.c, renamed DEBUG into DEBUG_ISP_SCST.
- In qla_isp/..., renamed SCSI_TARGET in SCST_SCSI_TARGET.
- In qla_isp/..., renamed SCSI_TARGET_DEV in SCST_SCSI_TARGET_DEV.
Additionally, all CONFIG_SCSI_TARGET* macro's are renamed into CONFIG_SCST* in
order to avoid confusion between the STGT CONFIG-symbols and the SCST CONFIG-
symbols.
The following additional options are now configurable through Kconfig:
- CONFIG_SCST_ISCSI_DEBUG_DIGEST_FAILURES
- CONFIG_SCST_STRICT_SERIALIZING
- CONFIG_SCST_STRICT_SECURITY
- CONFIG_SCST_ALLOW_PASSTHROUGH_IO_SUBMIT_IN_SIRQ
- CONFIG_SCST_ABORT_CONSIDER_FINISHED_TASKS_AS_NOT_EXISTING
- CONFIG_SCST_USE_EXPECTED_VALUES
- CONFIG_SCST_DEBUG_OOM
- CONFIG_SCST_DEBUG_RETRY
- CONFIG_SCST_DEBUG_SN
- CONFIG_SCST_DEBUG_TM
- CONFIG_SCST_TM_DBG_GO_OFFLINE
The patch below has been verified as follows:
- Verified that the following command does not print any new warning messages:
make -s clean && make -C srpt -s clean && make -s scst iscsi-scst && make -C srpt -s
- Verified as follows that the internal SCST patches still apply cleanly:
for p in *patch; do patch -p0 --dry-run -f -s <$p; done
- Checked that the patch generated by generate-kernel-patch still applies
cleanly to the 2.6.25.7 kernel, and that the patched kernel tree still
compiles, installs and boots fine, that the iscsi-scst, ib_srpt,
scst_disk and scst_vdisk modules still load, and that iSCSI communication
still works fine. All SCST kernel configuration options that could be
enabled have been enabled during this test.
Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@453 d57e44dd-8a1f-0410-8b47-8ef2f437770f
The patch below fixes the checkpatch complaints on kfree():
WARNING: kfree(NULL) is safe this check is probabally not required
This patch has been verified as follows:
- Verified that checkpatch does no longer complain about kfree().
- Verified that make -s clean && make -s iscsi scst && make -s -C srpt
still works and does not trigger any new compiler warnings.
- Checked that the patch generated by generate-kernel-patch still applies
cleanly to the 2.6.25.4 kernel, and that the patched kernel tree still
compiles, installs and boots fine, and that the iscsi-scst, ib_srpt,
scst_disk and scst_vdisk modules still load.
Note: I'm not sure any of the above verifications did trigger the code paths
changed by this patch.
Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@402 d57e44dd-8a1f-0410-8b47-8ef2f437770f
I've updated the MPT fusion target driver for LSI SCSI/FC/SAS HBAs. The original SCST MPT driver was based on the 1.00.13 LSI
sample target driver. LSI has since released version 1.00.14 of the sample target driver. I've ported all the changes from .13 to
.14 into the SCST MPT driver for consistency. I've also updated the SCST MPT driver to compile under 2.6.24 and 2.6.25.4. Finally,
I force the SCSI parallel transfer rate to very slow depending on the SCSI HBA firmware revision. Newer versions of SCSI HBA
firmware have a bug where the incorrect amount of data is transferred for non-divisible-by-4 length transfers (like standard 14 byte
REQUEST SENSE). LSI is aware of the problem and I'll update the driver to restore functionality upon a new good SCSI HBA firmware
release.
I still have not confirmed operation with LSI SAS or FC HBAs.
Signed-off-by: Erik Habbinga <erikhabbinga@inphase-tech.com>
Changes:
./mpt/mpt_scst.h
- differences between LSI sample target drivers 1.00.13 and 1.00.14
./mpt/Kconfig
- remove some unnecessary white space
./mpt/mpt_scst.c
- differences between LSI sample target drivers 1.00.13 and 1.00.14
- changes for kernel 2.6.24 and 2.6.25.4
- force slow transfers for newer SCSI HBA firmware versions
./mpt/Makefile
- simplified for inclusion into kernel source tree
./mpt/in-tree/Kconfig-2.6.24.diff
- patch against 2.6.24 and 2.6.25.4 drivers/message/fusion/Kconfig
./mpt/in-tree/Makefile.diff
- changed to work with generate-kernel-patch script
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@387 d57e44dd-8a1f-0410-8b47-8ef2f437770f
The patch below implements the following changes:
- Fixes the remaining warnings reported by checkpatch.pl with regard to the use
of whitespace in C code.
- Adds double qoutes around some #warning messages, such that checkpatch.pl
does no longer try to interprete the text behind the #warning preprocessor
directive.
- Adds an extra conversion to the generate-kernel-patch script that removes
the single space from before goto-labels while generating the kernel patch.
This patch has been tested as follows:
- Verified that svn diff -x -w only shows changes in the #warning preprocessor directives.
- Verified the output of svn diff by reading it.
- Verified that checkpatch.pl does no longer complain on the use of whitespace
(searched through the checkpatch.pl output for the text ' space').
- Verified that the patch generated by the generate-kernel-patch script still
applies cleanly to the 2.6.24 kernel, and that the patched kernel still compiles cleanly.
Please let me know if I have to resubmit parts of this patch to other SCST authors.
Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@381 d57e44dd-8a1f-0410-8b47-8ef2f437770f
One of the Linux kernel patch submission requirements is that source files do
not contain trailing whitespace. The patch below removes trailing whitespace
from .c and .h source files.
Note: it might be more convenient to run the script I used to generate this
patch than to review and apply the patch below. This is how I generated and
verified the patch below:
cat <<EOF >./strip-trailing-whitespace
#!/bin/bash
trap "rm -f $t" EXIT
t=/tmp/temporary-file.$$
for f in "$@"
do
sed 's/[ ]*$//' <"$f" >"$t" && mv "$t" "$f"
done
EOF
chmod a+x ./strip-trailing-whitespace
find -name '*.[ch]' | xargs ./strip-trailing-whitespace
svn diff -x -w
Signed-off-by: <bart.vanassche@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@377 d57e44dd-8a1f-0410-8b47-8ef2f437770f
- "RECEIVE DIAGNOSTIC RESULTS" command handling fixed
- Obtaining device queue parameters in scst_obtain_device_parameters() changed to handle NOT READY sense
- Fixed possible dev_cmd_count underflow
- Minor iSCSI-SCST connection closing cleanups and fixes
- Semantic of other *_atomic flags changed a bit. Now they are intended only to allow SCST to optimize execution context. The corresponing functions now can *always* be called on atomic context and, if necessary, should manually determine that using scst_cmd_atomic() function and restart using corresponding *_NEED_THREAD_* return value.
- scst_cmd_get_tgt_resp_flags() and SCST_TSC_FLAG_STATUS flag made obsolete and replaced by scst_cmd_get_is_send_status(). All in-tree drivers updated accordingly
- Cleanup: preprocessing_done_atomic removed, now preprocessing_done() callback always called on thread context
- 64-bit cleanups
- Documented that iscsi-scst-adm is currently broken and explained why
- In user space Makefile's added possibility to specify external linker flags
- Minor performance optimizations
- Other minor cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@350 d57e44dd-8a1f-0410-8b47-8ef2f437770f
- Important reference counting and barriers usage cleanups
- Sense buffer made dynamic
- Other minor improvements and cleanups
- Docs updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@287 d57e44dd-8a1f-0410-8b47-8ef2f437770f