Commit Graph

374 Commits

Author SHA1 Message Date
Vladislav Bolkhovitin
a06c3d97e3 - Fixed sg_tablesize in qla2x00t to be per target card, not global
- Minor cleanups


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@374 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-15 17:27:50 +00:00
Vladislav Bolkhovitin
00bca6ce75 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 
code.

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
scst/kernel/in-tree/Makefile.drivers.Linux-2.6.24.patch'>scst/kernel/in-tree/Makefile.drivers.Linux-2.6.24.patch.
- Renamed Kconfig'>scst/kernel/in-tree/Kconfig.scsi.Linux-2.6.24.patch to
scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.24.patch'>scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.24.patch.
- Renamed scst/kernel/in-tree/Makefile.scsi_tgt'>scst/kernel/in-tree/Makefile.scsi_tgt to
scst/kernel/in-tree/Makefile.scst'>scst/kernel/in-tree/Makefile.scst.
- Renamed scst/kernel/in-tree/Kconfig.scsi_tgt'>scst/kernel/in-tree/Kconfig.scsi_tgt to
scst/kernel/in-tree/Kconfig.scst'>scst/kernel/in-tree/Kconfig.scst.

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
menuconfig.
- Elaborated the SCST help texts a little bit (in file
scst/kernel/in-tree/Kconfig.scst).

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

This patch has been tested as follows:

mkdir -p tmp
cd tmp
rm -rf linux-2.6.25.3 /lib/modules/2.6.25.3-scst
tar xjf ~vanasscb/software/downloads/linux-2.6.25.3.tar.bz2
cd linux-2.6.25.3
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/2.6.25.3-scst
update-initramfs -k 2.6.25.3-scst -c
reboot
modprobe iscsi-scst
modprobe ib_srpt
lsmod | grep -E 'scst|ib_srpt'
dmesg

Signed-off-by: bart.vanassche@gmail.com 


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@373 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-15 15:00:21 +00:00
Vladislav Bolkhovitin
4b7125ddbe Update to the latest IET
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@372 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-15 09:35:20 +00:00
Vladislav Bolkhovitin
cc685733a5 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: http://svn.code.sf.net/p/scst/svn/trunk@371 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-14 17:20:20 +00:00
Vladislav Bolkhovitin
445ebd0119 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: http://svn.code.sf.net/p/scst/svn/trunk@370 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-14 14:58:29 +00:00
Vladislav Bolkhovitin
87e8cf6123 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.

Modified:
* scripts/generate-kernel-patch'>scripts/generate-kernel-patch
Added:
* 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: http://svn.code.sf.net/p/scst/svn/trunk@369 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-14 10:01:30 +00:00
Vladislav Bolkhovitin
cf53d51733 - In "extraclean" target new autogenerated files added
- Don't automatically build iscsi-scst-adm anymore until it will be fixed


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@368 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-13 17:18:07 +00:00
Vladislav Bolkhovitin
994ecdbf28 Reference to Open-FCoE added
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@367 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-13 10:08:21 +00:00
Vladislav Bolkhovitin
8e5bb8a22f 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
reboot



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@366 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-13 09:27:16 +00:00
Vladislav Bolkhovitin
259ab730ce - 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: http://svn.code.sf.net/p/scst/svn/trunk@365 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-12 15:58:34 +00:00
Vladislav Bolkhovitin
2bff6d9765 - 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: http://svn.code.sf.net/p/scst/svn/trunk@364 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-07 18:44:15 +00:00
Vladislav Bolkhovitin
1b40d8f1f9 Double "repository" word fixed
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@363 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-04 10:31:05 +00:00
Vladislav Bolkhovitin
77518a69fb Web updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@362 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-02 11:40:26 +00:00
Stanislaw Gruszka
fa2612efd1 Remove request sense warning and fix typo.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@361 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-01 06:49:33 +00:00
Stanislaw Gruszka
eac485e270 Nullify f/w pointer if load fails.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@360 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-01 06:46:23 +00:00
Stanislaw Gruszka
fda0d8a9a4 Bugfix - disallow to free initiator data when disabling target mode,
as long as all reference to it is dropped.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@359 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-30 14:19:38 +00:00
Stanislaw Gruszka
37c1a3ab1a Add missing definition of strncasecmp() for older kernels.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@358 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-24 13:12:08 +00:00
Stanislaw Gruszka
0f3f7be821 - Update README.scst.
- Add comment about overall isp_scst.c design.
- Put some compile time selectable values in one place.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@357 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-24 12:50:51 +00:00
Stanislaw Gruszka
db1399ff87 Bugfix: put initiator reference counter when finish task management.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@356 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-24 09:31:02 +00:00
Stanislaw Gruszka
9252bb3170 Synchronize with Feral CVS repository:
- use kthread
- MBOX_ACQUIRE macro redefined


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@355 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-24 06:34:08 +00:00
Stanislaw Gruszka
1b384e9234 Remove unnecessary variables.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@354 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-23 11:17:33 +00:00
Stanislaw Gruszka
6d004ffe91 - Compile time conditinal debug.
- Initialize variable.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@353 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-23 09:23:43 +00:00
Stanislaw Gruszka
8cfda488ba - 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: http://svn.code.sf.net/p/scst/svn/trunk@352 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-23 09:15:14 +00:00
Vladislav Bolkhovitin
be9a66547f Fixed wrong state assigmnent in scst_xmit_response()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@351 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-22 15:04:09 +00:00
Vladislav Bolkhovitin
925fbcdda3 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: http://svn.code.sf.net/p/scst/svn/trunk@350 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-22 10:30:53 +00:00
Stanislaw Gruszka
56382c20ac Type fix.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@349 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-21 17:37:43 +00:00
Stanislaw Gruszka
9be327002c Remove not necessary headers and definitions.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@348 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-21 17:34:42 +00:00
Vladislav Bolkhovitin
0480442bed Fixes compilation brokenness on kernels below 2.6.24
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@347 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-21 16:34:55 +00:00
Vladislav Bolkhovitin
eaf21084d9 Added possibility to create virtual removable devices
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@346 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-21 15:04:10 +00:00
Stanislaw Gruszka
9696649c7c Limit scatter/gather table size (need to be reviewed).
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@345 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-21 10:45:22 +00:00
Stanislaw Gruszka
1399e8e64c - 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: http://svn.code.sf.net/p/scst/svn/trunk@344 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-21 10:37:35 +00:00
Stanislaw Gruszka
c921c18c13 Remove obsolete kernel_thread and use kthread API.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@343 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-21 10:31:16 +00:00
Stanislaw Gruszka
5b11d67e24 Change proc interface to SCST like. Allow to enable/disable each lun for SPI device.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@342 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-21 10:27:59 +00:00
Stanislaw Gruszka
a437da7b02 Logout implementation, reference counting to protect initiator data.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@341 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-21 08:36:14 +00:00
Vladislav Bolkhovitin
72528747b3 Forgotten in r338 patches
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@340 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-21 07:01:13 +00:00
Vladislav Bolkhovitin
d1598c4d3c More svn:ignore fixes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@339 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-18 16:42:10 +00:00
Vladislav Bolkhovitin
25b29b701a Update for 2.6.25
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@338 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-18 16:38:39 +00:00
Vladislav Bolkhovitin
fa84d540ef scsi_tgt.h renamed to scst.h
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@337 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-17 17:35:37 +00:00
Vladislav Bolkhovitin
b95fae3220 - Fixes scst_user brokennesses in various modes, especially in iSCSI-SCST
- Minor debug logging fixes
 - Minor cleanups


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@336 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-17 15:25:39 +00:00
Stanislaw Gruszka
67ea9c1d0a Remove unintended change from r334, added there only for testing TM.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@335 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-11 08:18:02 +00:00
Stanislaw Gruszka
83c63625e6 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: http://svn.code.sf.net/p/scst/svn/trunk@334 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-11 07:34:07 +00:00
Vladislav Bolkhovitin
c3a77a0d45 Critical fix:
- Fixes hang on HEAD OF QUEUE commands under high load


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@333 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-10 10:57:30 +00:00
Stanislaw Gruszka
aaa202a398 Fix bug when checking tmd flags against bidirectional transfer.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@332 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-08 09:11:10 +00:00
Stanislaw Gruszka
21850b4dca 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: http://svn.code.sf.net/p/scst/svn/trunk@331 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-08 06:47:30 +00:00
Stanislaw Gruszka
94eeba176d 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: http://svn.code.sf.net/p/scst/svn/trunk@330 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-04 12:18:00 +00:00
Stanislaw Gruszka
5523441b4b Document changes about how to enable/disable target.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@329 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-04 12:02:20 +00:00
Stanislaw Gruszka
c4c19fa17f Fix bug when enabling target on nonzero channel.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@328 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-04 11:57:40 +00:00
Stanislaw Gruszka
19827957bb Fix bugs introduced in r325 and r324.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@327 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-04 11:53:01 +00:00
Stanislaw Gruszka
adb98e77c3 Remove trailing whitespaces.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@326 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-04 11:49:19 +00:00
Stanislaw Gruszka
16717c2bc9 Implement multichannel support in the way each channel is seen by SCST
as separate HBA.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@325 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-04 11:48:28 +00:00