14 years agoPatch from Bart Van Assche <bart.vanassche@gmail.com>:
vlnb [Tue, 20 May 2008 09:32:14 +0000 (09:32 +0000)]
Patch from Bart Van Assche <bart.vanassche@gmail.com>:

The patch below fixes statements that were indented by spaces are now indented by tabs.
The patch only contains whitespace changes -- after having applied the patch below, the
output of svn diff -x -w is still empty.

How this patch was tested:
- Verified that the output of svn diff -x -w is empty.
- Verified that the patch generated by generate-kernel-patch still applies
  cleanly to the kernel, that the patched kernel still compiles
  and that the SCST modules load properly after having installed the newly
  compiled kernel and after having rebooted.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>
git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@378 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoPatch from Bart Van Assche <bart.vanassche@gmail.com>, except few chuncks from qla2x0...
vlnb [Mon, 19 May 2008 10:21:41 +0000 (10:21 +0000)]
Patch from Bart Van Assche <bart.vanassche@gmail.com>, except few chuncks from qla2x00t/ obviously not related to the target mode addon:

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
trap "rm -f $t" EXIT
for f in "$@"
  sed 's/[  ]*$//' <"$f" >"$t" && mv "$t" "$f"
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: https://scst.svn.sourceforge.net/svnroot/scst/trunk@377 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoPatch from Bart Van Assche <bart.vanassche@gmail.com>:
vlnb [Fri, 16 May 2008 17:47:31 +0000 (17:47 +0000)]
Patch from Bart Van Assche <bart.vanassche@gmail.com>:

Disable the scst-user selection in Kconfig when HIGHMEM is enabled because
this module is incompatible with HIGHMEM. I have tested the modification
below by toggling HIGHMEM via "make ARCH=i386 xconfig".

Signed-off-by: <bart.vanassche@gmail.com>
git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@376 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoPatch from Bart Van Assche <bart.vanassche@gmail.com>:
vlnb [Fri, 16 May 2008 10:29:34 +0000 (10:29 +0000)]
Patch from Bart Van Assche <bart.vanassche@gmail.com>:

I don't know when this was broken, but with the current SVN version, after
having generated and applied a kernel patch for SCST, iscsi-scst doesn't
build anymore. The patch below fixes this and also includes a cleanup patch
for the generate-kernel-patch'>generate-kernel-patch script. The generated kernel patch has been
tested with the 2.6.24 and kernels (extracted kernel sources +
applied patch + built kernel + installed kernel + reboot + load SCST

Signed-off-by: <bart.vanassche@gmail.com>
git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@375 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years ago - Fixed sg_tablesize in qla2x00t to be per target card, not global
vlnb [Thu, 15 May 2008 17:27:50 +0000 (17:27 +0000)]
 - Fixed sg_tablesize in qla2x00t to be per target card, not global
 - Minor cleanups

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@374 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoPatch from Bart Van Assche <bart.vanassche@gmail.com>:
vlnb [Thu, 15 May 2008 15:00:21 +0000 (15:00 +0000)]
Patch from Bart Van Assche <bart.vanassche@gmail.com>:

By this time I have reworked the update of scripts/generate-kernel-patch'>scripts/generate-kernel-patch.
These are the changes that were already present in version 1 of this patch
and that have been kept in this patch:
- The SCST code has been moved from drivers/scsi/scsi_tgt to drivers/scst.
- Moved SCST header files from include/scsi_tgt to include/scst.
- Added iscsi-scst in drivers/scst/iscsi-scst.

For the time being the generate-kernel-patch does no longer try to add the
qla2x00t driver in drivers/scst/qla2x00-target -- I have not yet been able to
figure out how to get qla2x00t/qla2x00-target compiled without the initiator

Just as in version 1 of this patch, the following files in the Subversion
repository have been renamed to reflect the above changes:
- Renamed scst/kernel/in-tree/Makefile.scsi.Linux-2.6.24.patch'>scst/kernel/in-tree/Makefile.scsi.Linux-2.6.24.patch to
- Renamed Kconfig'>scst/kernel/in-tree/Kconfig.scsi.Linux-2.6.24.patch to
- Renamed scst/kernel/in-tree/Makefile.scsi_tgt'>scst/kernel/in-tree/Makefile.scsi_tgt to
- Renamed scst/kernel/in-tree/Kconfig.scsi_tgt'>scst/kernel/in-tree/Kconfig.scsi_tgt to

Because of the above changes the include path specified in the following
Makefiles had to be changed:
- scst/kernel/in-tree/Makefile.dev_handlers'>scst/kernel/in-tree/Makefile.dev_handlers
- srpt/src/Makefile.in_kernel'>srpt/src/Makefile.in_kernel

Other changes:
- I have added menu/endmenu entries in file scst/kernel/in-tree/Kconfig.scst
such that the SCST entries become visible when running make xconfig or make
- Elaborated the SCST help texts a little bit (in file

New in version 2 of this patch:
- Moved remaining patches in the generate-kernel-patch script to separate
- Added support for the 2.6.25 kernel.

This patch has been tested as follows:

mkdir -p tmp
cd tmp
rm -rf linux- /lib/modules/
tar xjf ~vanasscb/software/downloads/linux-
cd linux-
cp ../.config-2.6.25 .
(cd ~vanasscb/software/scst
&& ~vanasscb/software/scst/scripts/generate-kernel-patch \
2.6.25) | patch -p1
make oldconfig
diff ../.config .
make xconfig
make menuconfig
make -j5 bzImage modules
make modules_install install
cp -r /lib/firmware/$(uname -r) /lib/firmware/
update-initramfs -k -c
modprobe iscsi-scst
modprobe ib_srpt
lsmod | grep -E 'scst|ib_srpt'

Signed-off-by: bart.vanassche@gmail.com
git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@373 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoUpdate to the latest IET
vlnb [Thu, 15 May 2008 09:35:20 +0000 (09:35 +0000)]
Update to the latest IET

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@372 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoInterface versioning between iSCSI-SCST kernel and user space parts, iscsi_u.h rename...
vlnb [Wed, 14 May 2008 17:20:20 +0000 (17:20 +0000)]
Interface versioning between iSCSI-SCST kernel and user space parts, iscsi_u.h renamed to iscsi_scst.h. Property svn:ignore adjusted accordingly. Docs updated.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@371 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoCritical patch from anonymous. Fixes possible data corruption in BLOCKIO code. A...
vlnb [Wed, 14 May 2008 14:58:29 +0000 (14:58 +0000)]
Critical patch from anonymous. Fixes possible data corruption in BLOCKIO code. A pretty subtle bug. Can be triggered on very rare on practice combination of circumstances.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@370 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoPatch from Bart Van Assche <bart.vanassche@gmail.com>:
vlnb [Wed, 14 May 2008 10:01:30 +0000 (10:01 +0000)]
Patch from Bart Van Assche <bart.vanassche@gmail.com>:

The script generate-kernel-patch generates a kernel tree based on the sources
and the in-tree kernel patches in the SCST Subversion repository. When I
submitted the first version of the generate-kernel-patch script most but not
all in-tree patches were present as separate files in the SCST Subversion
repository. The patch below moves the two remaining patches that are contained
inline in the generate-kernel-patch script to separate files. This should
make it possible to use the script on future Linux kernels without having to
modify the script itself. The patch below does not contain functional
changes, it only moves two patches out of the script.

* scripts/generate-kernel-patch'>scripts/generate-kernel-patch
* srpt/src/Makefile.infiniband.Linux-2.6.24.patch'>srpt/src/Makefile.infiniband.Linux-2.6.24.patch
* srpt/src/Kconfig.infiniband.Linux-2.6.24.patch'>srpt/src/Kconfig.infiniband.Linux-2.6.24.patch

Also Makefile and Kconfig files were renamed (".drivers." was replaced by ".scsi.")

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@369 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years ago - In "extraclean" target new autogenerated files added
vlnb [Tue, 13 May 2008 17:18:07 +0000 (17:18 +0000)]
 - In "extraclean" target new autogenerated files added
 - Don't automatically build iscsi-scst-adm anymore until it will be fixed

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@368 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoReference to Open-FCoE added
vlnb [Tue, 13 May 2008 10:08:21 +0000 (10:08 +0000)]
Reference to Open-FCoE added

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@367 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoSeries of patches from Bart Van Assche <bart.vanassche@gmail.com>:
vlnb [Tue, 13 May 2008 09:27:16 +0000 (09:27 +0000)]
Series of patches from Bart Van Assche <bart.vanassche@gmail.com>:

 - Added Makefile.scsi.Linux-2.6.24.patch and Kconfig.scsi.Linux-2.6.24.patch
 - Updated Makefile.scsi_tgt to reflect move of the SCST device handlers from scst/src/ to scst/src/dev_handlers/
 - Added Makefile.dev_handlers
 - SCST include path fixed in srpt/ Makefile.in_kernel
 - Added script for converting the SCST source tree to a kernel patch. More comment on it:

The SCST source tree as it exists in the current Subversion repository will
have to be maintained for some time. And if SCST is submitted for inclusion
in the mainline kernel, this tree will have to be converted to a kernel
patch, reviewer comments will have to be processed, and the patch will have
to be resubmitted. So it's convenient to have a script available that
converts the Subversion source tree into a kernel patch. The patch below does
just that: convert the scst and srpt directories into a kernel patch
(iscsi-scst support will be added later on). I have tested the script
contained in the patch below as follows:

rm -rf linux-2.6.24
rm -rf /lib/modules/2.6.24-scst
tar xjf ~vanasscb/software/downloads/linux-2.6.24.tar.bz2
cd linux-2.6.24
cp ../.config .
(cd ~vanasscb/software/scst
&& ~vanasscb/software/scst/scripts/generate-kernel-patch \
2.6.24) | patch -p1
make -j5 bzImage modules && make modules_install install
cp -r /lib/firmware/$(uname -r) /lib/firmware/2.6.24-scst
update-initramfs -k 2.6.24-scst -c

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@366 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years ago - Fixed GFP_KERNEL misuse. Reported independently by mbe1@charter.net and Erez Zilbe...
vlnb [Mon, 12 May 2008 15:58:34 +0000 (15:58 +0000)]
 - Fixed GFP_KERNEL misuse. Reported independently by mbe1@charter.net and Erez Zilber <erezz@Voltaire.COM>
 - Fixed not sufficient in_irq() to determine atomic allocation context. Reported by mbe1@charter.net

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@365 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years ago - Rejecting command reimplemented in a more simple, straightforward and readable...
vlnb [Wed, 7 May 2008 18:44:15 +0000 (18:44 +0000)]
 - Rejecting command reimplemented in a more simple, straightforward and readable way.
 - Minor external interface change: now target drivers should set for aborted commands SCST_CMD_DELIVERY_ABORTED status via scst_set_delivery_status(). In-tree drivers updated.
 - Fixed broken compilation if put_page_callback patch not applied to the kernel. Reported by Erez Zilber <erezz@Voltaire.COM>
 - Fixed several minor problems reported by David Berton <davidbrt@yahoo.com>
 - Fixed __exit misuse, when such functions called from __init functions.
 - Docs updated.
 - Other minor changes and cleanups.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@364 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoDouble "repository" word fixed
vlnb [Sun, 4 May 2008 10:31:05 +0000 (10:31 +0000)]
Double "repository" word fixed

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@363 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoWeb updates
vlnb [Fri, 2 May 2008 11:40:26 +0000 (11:40 +0000)]
Web updates

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@362 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoRemove request sense warning and fix typo.
swgruszka [Thu, 1 May 2008 06:49:33 +0000 (06:49 +0000)]
Remove request sense warning and fix typo.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@361 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoNullify f/w pointer if load fails.
swgruszka [Thu, 1 May 2008 06:46:23 +0000 (06:46 +0000)]
Nullify f/w pointer if load fails.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@360 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoBugfix - disallow to free initiator data when disabling target mode,
swgruszka [Wed, 30 Apr 2008 14:19:38 +0000 (14:19 +0000)]
Bugfix - disallow to free initiator data when disabling target mode,
as long as all reference to it is dropped.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@359 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoAdd missing definition of strncasecmp() for older kernels.
swgruszka [Thu, 24 Apr 2008 13:12:08 +0000 (13:12 +0000)]
Add missing definition of strncasecmp() for older kernels.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@358 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years ago- Update README.scst.
swgruszka [Thu, 24 Apr 2008 12:50:51 +0000 (12:50 +0000)]
- Update README.scst.
- Add comment about overall isp_scst.c design.
- Put some compile time selectable values in one place.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@357 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoBugfix: put initiator reference counter when finish task management.
swgruszka [Thu, 24 Apr 2008 09:31:02 +0000 (09:31 +0000)]
Bugfix: put initiator reference counter when finish task management.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@356 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoSynchronize with Feral CVS repository:
swgruszka [Thu, 24 Apr 2008 06:34:08 +0000 (06:34 +0000)]
Synchronize with Feral CVS repository:
- use kthread
- MBOX_ACQUIRE macro redefined

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@355 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoRemove unnecessary variables.
swgruszka [Wed, 23 Apr 2008 11:17:33 +0000 (11:17 +0000)]
Remove unnecessary variables.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@354 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years ago- Compile time conditinal debug.
swgruszka [Wed, 23 Apr 2008 09:23:43 +0000 (09:23 +0000)]
- Compile time conditinal debug.
- Initialize variable.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@353 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years ago- Avoid tmd's leakage when disable target mode when pending I/O (some work still
swgruszka [Wed, 23 Apr 2008 09:15:14 +0000 (09:15 +0000)]
- Avoid tmd's leakage when disable target mode when pending I/O (some work still
  needed in low level driver).
- Properly free channels on error case.
- Start HBA unregistation after proc file is removed.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@352 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoFixed wrong state assigmnent in scst_xmit_response()
vlnb [Tue, 22 Apr 2008 15:04:09 +0000 (15:04 +0000)]
Fixed wrong state assigmnent in scst_xmit_response()

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@351 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoThe bunch of pending changes. Sorry, it's quite big.
vlnb [Tue, 22 Apr 2008 10:30:53 +0000 (10:30 +0000)]
The bunch of pending changes. Sorry, it's quite big.

 - "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: https://scst.svn.sourceforge.net/svnroot/scst/trunk@350 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoType fix.
swgruszka [Mon, 21 Apr 2008 17:37:43 +0000 (17:37 +0000)]
Type fix.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@349 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoRemove not necessary headers and definitions.
swgruszka [Mon, 21 Apr 2008 17:34:42 +0000 (17:34 +0000)]
Remove not necessary headers and definitions.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@348 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoFixes compilation brokenness on kernels below 2.6.24
vlnb [Mon, 21 Apr 2008 16:34:55 +0000 (16:34 +0000)]
Fixes compilation brokenness on kernels below 2.6.24

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@347 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoAdded possibility to create virtual removable devices
vlnb [Mon, 21 Apr 2008 15:04:10 +0000 (15:04 +0000)]
Added possibility to create virtual removable devices

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@346 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoLimit scatter/gather table size (need to be reviewed).
swgruszka [Mon, 21 Apr 2008 10:45:22 +0000 (10:45 +0000)]
Limit scatter/gather table size (need to be reviewed).

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@345 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years ago- bug fix: pass error to scst_rx_data
swgruszka [Mon, 21 Apr 2008 10:37:35 +0000 (10:37 +0000)]
- bug fix: pass error to scst_rx_data
- set transfer length for SPI transport
- add unlikely()/likely()
- print error when don't know what to do with tmd

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@344 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoRemove obsolete kernel_thread and use kthread API.
swgruszka [Mon, 21 Apr 2008 10:31:16 +0000 (10:31 +0000)]
Remove obsolete kernel_thread and use kthread API.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@343 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoChange proc interface to SCST like. Allow to enable/disable each lun for SPI device.
swgruszka [Mon, 21 Apr 2008 10:27:59 +0000 (10:27 +0000)]
Change proc interface to SCST like. Allow to enable/disable each lun for SPI device.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@342 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoLogout implementation, reference counting to protect initiator data.
swgruszka [Mon, 21 Apr 2008 08:36:14 +0000 (08:36 +0000)]
Logout implementation, reference counting to protect initiator data.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@341 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoForgotten in r338 patches
vlnb [Mon, 21 Apr 2008 07:01:13 +0000 (07:01 +0000)]
Forgotten in r338 patches

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@340 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoMore svn:ignore fixes
vlnb [Fri, 18 Apr 2008 16:42:10 +0000 (16:42 +0000)]
More svn:ignore fixes

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@339 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoUpdate for 2.6.25
vlnb [Fri, 18 Apr 2008 16:38:39 +0000 (16:38 +0000)]
Update for 2.6.25

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@338 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoscsi_tgt.h renamed to scst.h
vlnb [Thu, 17 Apr 2008 17:35:37 +0000 (17:35 +0000)]
scsi_tgt.h renamed to scst.h

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@337 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years ago - Fixes scst_user brokennesses in various modes, especially in iSCSI-SCST
vlnb [Thu, 17 Apr 2008 15:25:39 +0000 (15:25 +0000)]
 - Fixes scst_user brokennesses in various modes, especially in iSCSI-SCST
 - Minor debug logging fixes
 - Minor cleanups

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@336 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoRemove unintended change from r334, added there only for testing TM.
swgruszka [Fri, 11 Apr 2008 08:18:02 +0000 (08:18 +0000)]
Remove unintended change from r334, added there only for testing TM.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@335 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoFixes for task management:
swgruszka [Fri, 11 Apr 2008 07:34:07 +0000 (07:34 +0000)]
Fixes for task management:
- abort only tasks from initiator, which send TM function
- check LUN for LUN_RESET function
- schedule tasklet to free aborted command from tmd's queue
- call scst_tgt_cmd_done() to free aborted command from SCST

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@334 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoCritical fix:
vlnb [Thu, 10 Apr 2008 10:57:30 +0000 (10:57 +0000)]
Critical fix:

 - Fixes hang on HEAD OF QUEUE commands under high load

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@333 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoFix bug when checking tmd flags against bidirectional transfer.
swgruszka [Tue, 8 Apr 2008 09:11:10 +0000 (09:11 +0000)]
Fix bug when checking tmd flags against bidirectional transfer.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@332 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoPass expected transfer length and direction to SCST for fibre channel devices.
swgruszka [Tue, 8 Apr 2008 06:47:30 +0000 (06:47 +0000)]
Pass expected transfer length and direction to SCST for fibre channel devices.
Fix bug when using SCST_DATA_UNKNOWN insted of SCST_DATA_NONE.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@331 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoWe need only 2 debug level, one for error situations, second for normal
swgruszka [Fri, 4 Apr 2008 12:18:00 +0000 (12:18 +0000)]
We need only 2 debug level, one for error situations, second for normal
data flow. Print only in debug mode about sense buffer cutting.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@330 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoDocument changes about how to enable/disable target.
swgruszka [Fri, 4 Apr 2008 12:02:20 +0000 (12:02 +0000)]
Document changes about how to enable/disable target.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@329 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoFix bug when enabling target on nonzero channel.
swgruszka [Fri, 4 Apr 2008 11:57:40 +0000 (11:57 +0000)]
Fix bug when enabling target on nonzero channel.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@328 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoFix bugs introduced in r325 and r324.
swgruszka [Fri, 4 Apr 2008 11:53:01 +0000 (11:53 +0000)]
Fix bugs introduced in r325 and r324.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@327 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoRemove trailing whitespaces.
swgruszka [Fri, 4 Apr 2008 11:49:19 +0000 (11:49 +0000)]
Remove trailing whitespaces.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@326 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoImplement multichannel support in the way each channel is seen by SCST
swgruszka [Fri, 4 Apr 2008 11:48:28 +0000 (11:48 +0000)]
Implement multichannel support in the way each channel is seen by SCST
as separate HBA.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@325 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoFix HBA registration / unregistration:
swgruszka [Fri, 4 Apr 2008 11:26:53 +0000 (11:26 +0000)]
Fix HBA registration / unregistration:
- not acknowledge when fail to register
- unregistration when no one can call functions from HBA

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@324 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoDo not dump stack when data length is bigger than low level driver can handle.
swgruszka [Fri, 4 Apr 2008 11:17:49 +0000 (11:17 +0000)]
Do not dump stack when data length is bigger than low level driver can handle.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@323 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoPrint error when we can not send all sense data (which is very unlikely).
swgruszka [Tue, 1 Apr 2008 13:51:07 +0000 (13:51 +0000)]
Print error when we can not send all sense data (which is very unlikely).

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@322 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoAdd missed things from Feral CVS repository.
swgruszka [Tue, 1 Apr 2008 12:04:34 +0000 (12:04 +0000)]
Add missed things from Feral CVS repository.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@321 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoStop setting command expected values for SCST,
swgruszka [Tue, 1 Apr 2008 07:14:26 +0000 (07:14 +0000)]
Stop setting command expected values for SCST,
as we can not assure values are right.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@320 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years ago- Update copyrights.
swgruszka [Tue, 1 Apr 2008 06:47:11 +0000 (06:47 +0000)]
- Update copyrights.
- Substitute scsi_tdebug to debug.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@319 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoRemove obsolete linux stuff.
swgruszka [Tue, 1 Apr 2008 06:38:55 +0000 (06:38 +0000)]
Remove obsolete linux stuff.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@318 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoSynchronize with Feral CVS repository:
swgruszka [Fri, 28 Mar 2008 13:03:31 +0000 (13:03 +0000)]
Synchronize with Feral CVS repository:
- define an IS_1020 macro
- more dma mask cleanups

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@317 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoSynchronize with Feral CVS repository:
swgruszka [Fri, 28 Mar 2008 13:01:38 +0000 (13:01 +0000)]
Synchronize with Feral CVS repository:
- Make pre-1240 cards be able to do 64 bit dma as well, making sure that
  they don't cross a 16MB boundary.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@316 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoSynchronize with Feral CVS repository:
swgruszka [Fri, 28 Mar 2008 13:00:26 +0000 (13:00 +0000)]
Synchronize with Feral CVS repository:
- remove the poorly thought out isp_in_intr goop

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@315 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoSynchronize with Feral CVS repository:
swgruszka [Fri, 28 Mar 2008 12:58:58 +0000 (12:58 +0000)]
Synchronize with Feral CVS repository:
- Make FC_SCRATCH_ACQUIRE a macro that returns true/false
- Fixes from Stanislaw for 2.6.23 & 2.6.24. Many thanks.
- A quick hack to isp_kthread to use waitqueues instead of semaphores
  to have less blockage. More rewrites later

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@314 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoSynchronize with Feral CVS repository:
swgruszka [Fri, 28 Mar 2008 12:47:37 +0000 (12:47 +0000)]
Synchronize with Feral CVS repository:
- Do some whitespace changes. Solaris related compilation fix. Remove
- Remove XS_SET_STATE_STATE macro.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@313 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoSynchronize with Feral CVS repository:
swgruszka [Fri, 28 Mar 2008 12:44:16 +0000 (12:44 +0000)]
Synchronize with Feral CVS repository:
- update 24xx firmware to 4.03.00

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@312 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoSynchronize with Feral CVS repository:
swgruszka [Fri, 28 Mar 2008 12:42:36 +0000 (12:42 +0000)]
Synchronize with Feral CVS repository:
- whitespace and other minor fixes
- Remove F/W crash dump support. We only worked it out for 2200 and 2300
  cards. It's also true that QLogic would not support us even if we *did*
  give them a crash dump, so the usage here is not really worth it.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@311 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoSynchronize with Feral CVS repository:
swgruszka [Fri, 28 Mar 2008 12:38:10 +0000 (12:38 +0000)]
Synchronize with Feral CVS repository:
- simplify: remove f/w crashdump stuff

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@310 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoSynchronize with Feral CVS repository:
swgruszka [Fri, 28 Mar 2008 12:35:40 +0000 (12:35 +0000)]
Synchronize with Feral CVS repository:
- Use a slightly cleaner macro.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@309 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoSynchronize with Feral CVS repository:
swgruszka [Fri, 28 Mar 2008 12:33:36 +0000 (12:33 +0000)]
Synchronize with Feral CVS repository:
- whitespace

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@308 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoSynchronize with Feral CVS repository:
swgruszka [Fri, 28 Mar 2008 12:31:35 +0000 (12:31 +0000)]
Synchronize with Feral CVS repository:
- Allow different platforms/environments to specificy the size of the
  high and low private storage for tmd_cmd_t structures
- Add a scan scsi thread event so that we can attach devices as we
  discover them
- Fix some tabs
- Make things work correctly when CONFIG_FW_LOADER is *not* defined
- Get rid of sema and use wait_interruptible

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@307 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoSynchronize with Feral CVS repository:
swgruszka [Fri, 28 Mar 2008 12:27:17 +0000 (12:27 +0000)]
Synchronize with Feral CVS repository:
- remove redundant pdb

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@306 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoSynchronize with Feral CVS repository:
swgruszka [Fri, 28 Mar 2008 12:23:27 +0000 (12:23 +0000)]
Synchronize with Feral CVS repository:
- Copyright Update
- Fix some fabric login bugs

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@305 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoPatch from Vu Pham <vuhuong@mellanox.com>: SRP target driver
vlnb [Mon, 17 Mar 2008 11:29:50 +0000 (11:29 +0000)]
Patch from Vu Pham <vuhuong@mellanox.com>: SRP target driver

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@304 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoFixes possible *dev_cmd_count leak
vlnb [Fri, 14 Mar 2008 10:42:03 +0000 (10:42 +0000)]
Fixes possible *dev_cmd_count leak

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@303 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoBugfixes:
swgruszka [Thu, 13 Mar 2008 10:58:44 +0000 (10:58 +0000)]
- pass commands to SCST after assigning initiator to them
- enable lun's on proper channel

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@302 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years ago - Fixed race on TM leading to crashes
vlnb [Tue, 11 Mar 2008 19:09:30 +0000 (19:09 +0000)]
 - Fixed race on TM leading to crashes
 - Connection close improved to be less agressive and honor TCP TIME_WATE state
 - Docs updates

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@301 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoProtect initiators list using tmds_lock. Avoid possibility to
swgruszka [Tue, 11 Mar 2008 14:27:13 +0000 (14:27 +0000)]
Protect initiators list using tmds_lock. Avoid possibility to
allocate initiator twice.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@300 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years ago - Fixed READ POSITION command handling
vlnb [Mon, 10 Mar 2008 10:59:56 +0000 (10:59 +0000)]
 - Fixed READ POSITION command handling
 - Fixed race in TM handling

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@299 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years ago - Fixed race on TM processing leading to BUG()
vlnb [Wed, 5 Mar 2008 18:22:01 +0000 (18:22 +0000)]
 - Fixed race on TM processing leading to BUG()
 - Fixed dev_cdrom and dev_modisk load failures if there are no media in the drives
 - Other minor fixes and cleanups

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@298 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years ago - TM fixes
vlnb [Fri, 29 Feb 2008 18:25:56 +0000 (18:25 +0000)]
 - TM fixes
 - Optimizations and send timeout introduced in r295 temporary disabled
 - Big connection shutdown times improvements. Great thanks to Alexey Kuznetsov for suggestions!
 - RESERVE/RELEASE serialization now made with TST field 0 (i.e. single task set)
 - Other minor fixes and improvements

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@297 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years ago - Fixes for previous commit
vlnb [Tue, 26 Feb 2008 18:22:45 +0000 (18:22 +0000)]
 - Fixes for previous commit
 - Minor logging improvements

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@296 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoA bunch of pending changes:
vlnb [Mon, 25 Feb 2008 18:48:02 +0000 (18:48 +0000)]
A bunch of pending changes:
 - Response data send timeout implemented: now if initiator doesn't accept data for too long (7 sec), target closes connection
 - Connction closing improved: now session cleared without need to wait for all outstanding commands data fully transmitted
 - On session unregistration now all outstanding commands are implicitely aborted
 - TM processing in SCST core made independant from other TM commands (before they were serialized)
 - Few bug fixes
 - Other minor improvements and cleanups
 - Docs update

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@295 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoPass proper expected length for INQUIRY command
swgruszka [Tue, 19 Feb 2008 12:02:14 +0000 (12:02 +0000)]
Pass proper expected length for INQUIRY command

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@294 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoUpdate README
swgruszka [Tue, 19 Feb 2008 10:42:43 +0000 (10:42 +0000)]

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@293 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoCompilation for kernel 2.6.24
swgruszka [Tue, 19 Feb 2008 10:12:12 +0000 (10:12 +0000)]
Compilation for kernel 2.6.24

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@292 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoAllow driver to compile
swgruszka [Tue, 19 Feb 2008 09:38:52 +0000 (09:38 +0000)]
Allow driver to compile

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@291 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoAvoid race conditions when task is aborted. Commands can be
swgruszka [Tue, 19 Feb 2008 09:37:46 +0000 (09:37 +0000)]
Avoid race conditions when task is aborted. Commands can be
in two places, our internal queue or passed to SCST.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@290 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoInterface to enable/disable target per channel
swgruszka [Tue, 19 Feb 2008 09:19:38 +0000 (09:19 +0000)]
Interface to enable/disable target per channel

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@289 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoSome cleanups and performance works
vlnb [Mon, 18 Feb 2008 18:44:29 +0000 (18:44 +0000)]
Some cleanups and performance works

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@288 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years ago - Fixed minor problem in iSCSI-SCST
vlnb [Wed, 13 Feb 2008 17:15:47 +0000 (17:15 +0000)]
 - Fixed minor problem in iSCSI-SCST
 - Important reference counting and barriers usage cleanups
 - Sense buffer made dynamic
 - Other minor improvements and cleanups
 - Docs updates

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@287 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoPrevent to compile broken driver
swgruszka [Wed, 13 Feb 2008 16:28:35 +0000 (16:28 +0000)]
Prevent to compile broken driver

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@286 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoLet's isp_scst.c compile, multichannel support will be added later.
swgruszka [Tue, 12 Feb 2008 11:52:00 +0000 (11:52 +0000)]
Let's isp_scst.c compile, multichannel support will be added later.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@285 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoSynchronize with Feral CVS repository:
swgruszka [Tue, 12 Feb 2008 11:10:16 +0000 (11:10 +0000)]
Synchronize with Feral CVS repository:

Clean up MSI-X implementation and make sure we snag at least *3* vectors
so that the ATIO-Q vector is snagged.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@284 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoSynchronize with Feral CVS repository:
swgruszka [Tue, 12 Feb 2008 11:08:06 +0000 (11:08 +0000)]
Synchronize with Feral CVS repository:
- Add a missing MSI disable and provide for pre-2.6.8 kernels.
- Fix bugs- forgot to actually compile (shame on me).

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@283 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoSynchronize with Feral CVS repository:
swgruszka [Tue, 12 Feb 2008 11:05:04 +0000 (11:05 +0000)]
Synchronize with Feral CVS repository:

I don't know why I thought this would work- forcing a re-login to the fabric
controller just barfs.

Make down count reflect jiffies elapsed rather than depend on calls to

Shorten deadloop time default to 10 seconds.

At least enable MSI (if not MSI-X) for 24XX cards.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@282 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoSynchronize with Feral CVS repository:
swgruszka [Tue, 12 Feb 2008 11:02:21 +0000 (11:02 +0000)]
Synchronize with Feral CVS repository:

We can (somehow) get commands on an atio7 for which we've never had a PLOGI/PRLI.
How this happens, I don't know. Anyway, we stick a tentative entry in the PDB
and call the task thread to find the rest of the info. This includes, badly and
stupidly, searching for the N-port handle by asking the chip. Sometimes it's not
there. In that case, we terminate the command.

In restarting commands that arrive while we start up, have the watchdog
time call isp_task_thread- this gives us a bit of hysteresis.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@281 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoSynchronize with Feral CVS repository:
swgruszka [Tue, 12 Feb 2008 10:59:43 +0000 (10:59 +0000)]
Synchronize with Feral CVS repository:
- Need to include linux/vmalloc.h. Showed up on PPC port.
- Fix complaints about using an uninitialized pointer.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@280 d57e44dd-8a1f-0410-8b47-8ef2f437770f

14 years agoSynchronize with Feral CVS repository:
swgruszka [Tue, 12 Feb 2008 10:55:04 +0000 (10:55 +0000)]
Synchronize with Feral CVS repository:

Make 2100/2200 and 2300 cards also maintain a target mode port database.

For the 24XX, we have to find the IID, N-port handle and channel when we
get an ATIO7. For the other cards, we already have the channel and N-port
handle and Port IID of the initiator, but have to find the S_ID.

Do the isp_find_pdb_by_{sid,loopid} functions search backwards to minimize
search time.

Don't load fw images more than once per device type!

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@279 d57e44dd-8a1f-0410-8b47-8ef2f437770f