Commit Graph

137 Commits

Author SHA1 Message Date
Dotan Barak
6291409b82 Use inline numbers for masks rather than assume peace
and goodwill and basic sensible cooperation.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@689 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-04 18:38:48 +00:00
Dotan Barak
8f6b4e5b99 Put some limit checking on dma segments so that
we don't, somehow, inadvertantly overrun the total
number of queue entries for a command + continuation
segments.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@680 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-23 23:18:25 +00:00
Dotan Barak
6880b800ef Major rewrite of DMA mapping code to reduce code duplication
and to allow some debug and enhancements that will be easier
soon.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@679 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-23 00:13:25 +00:00
Vladislav Bolkhovitin
e8b67bb755 - Docs updates
- Minor cleanups



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@675 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-18 18:52:35 +00:00
Dotan Barak
97abf4d107 Merge in work from Feral into this branch. The
recovery from not being able to push a ctio
fix is in. Various task management fixes are
also in. Other work in progress.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@672 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-11 18:55:43 +00:00
Dotan Barak
5e1547134a Broaden tags target.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@671 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-11 18:54:17 +00:00
Dotan Barak
e4d19dd1da Remove some misleading and dead files.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@661 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-03 06:32:12 +00:00
Dotan Barak
75561e4790 Update some firmware sets.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@660 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-03 06:31:27 +00:00
Vladislav Bolkhovitin
06905f3e57 Follow-up improvements to r556
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@558 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-10-31 16:17:08 +00:00
Vladislav Bolkhovitin
90c831b838 Cleanup removing usage of in_atomic(). Particularly, now target drivers and dev handlers need to explicitly supply preferred execution context in scst_cmd_done() and scst_tgt_cmd_done().
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
2008-10-31 10:49:25 +00:00
Dotan Barak
d7d2f38d5e Fix missing removal of DECLARE_MUTEX_UNLOCKED noticed by Shai.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@535 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-10-24 00:19:11 +00:00
Dotan Barak
d247bbbd5e Get rid of obsolete DECLARE_MUTEX_LOCKED usage.
Call device_create with extra driver data argument (NULL)
on 2.6.27 and later.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@532 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-10-22 21:45:16 +00:00
Dotan Barak
7a3b527b88 Belatedly put in a patch to avoid an OOPS that Stanley had
sent me but I hadn't integrated. Bad me.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@496 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-09-24 01:09:27 +00:00
Dotan Barak
508b07dbb0 Add more startup delay for 24XX cards when execing f/w (temp soln)
Add support for up through 2.6.25 (might even be good for 2.6.26)
Remove HBAAPI support. This never has worked well and I doubt anyone will miss it.
Remove files not pertinent SCST build.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@493 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-09-12 22:30:21 +00:00
Dotan Barak
1257ac6ecf Make qlaispd sleep interruptible so as to now
skew process statistics.

Submitted by: Stanislaw Gruszka



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@489 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-08-16 17:05:07 +00:00
Dotan Barak
aef7fa62d9 Fixed the following sparse warnings:
warning: Using plain integer as NULL pointer
warning: obsolete struct initializer, use C99 syntax
warning: symbol 'hba_api_ioctl_operations' was not declared. Should it be static?

Submitted-by: Dotan Barak <dotanba@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@488 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-08-14 22:42:58 +00:00
Stanislaw Gruszka
0622954292 Add KVER make parameter and remove Module{,s}.symvers on clean.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@451 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-07-10 06:44:28 +00:00
Vladislav Bolkhovitin
8c71b68271 - Version changed to 1.0.1
- Switched back to the debug mode



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@442 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-07-09 16:44:01 +00:00
Stanislaw Gruszka
5172b31980 Add release2debug and debug2release Makefile targets for qla_isp.
Leave qla_isp in release 'state' as other stuff.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@434 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-07-08 07:59:42 +00:00
Stanislaw Gruszka
3bdd1d549f Add uninstall makefile target.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@430 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-07-06 10:45:25 +00:00
Stanislaw Gruszka
2211857c67 Copy Modules.symvers stuff from qla2x00t makefiles to avoid undefined symbols warrning.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@429 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-07-05 20:19:11 +00:00
Stanislaw Gruszka
6c161367e6 Add warrning qla_isp do not support > 2.6.24
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@428 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-07-05 19:11:16 +00:00
Vladislav Bolkhovitin
1389b4595e Add "extraclean" entry to the qla_isp Makefiles.
Signed-off-by: Dotan Barak <dotanba@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@427 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-07-04 17:53:30 +00:00
Vladislav Bolkhovitin
2092cff5cd 3 small patches from Bart Van Assche <bart.vanassche@gmail.com>:
The patch below fixes the following category of checkpatch complaints:
ERROR: do not use C99 // comments

This patch has been verified as follows:
- Verified that checkpatch does no longer complain about C99 comments.
- Verified that make -s clean && make -s iscsi scst && make -s -C srpt
  still works.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>

The patch below fixes the following category of checkpatch complaints:
WARNING: unnecessary cast may hide bugs, see http://c-faq.com/malloc/mallocnocast.html

This patch has been verified as follows:
- Verified that checkpatch does no longer complain about unnecessary casts.
- Verified that make -s clean && make -s iscsi scst && make -s -C srpt
  still works and does not trigger any new compiler warnings.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>

The patch below fixes the following category of checkpatch warnings:
ERROR: Use of SPIN_LOCK_UNLOCKED is deprecated: see Documentation/spinlocks.txt

This patch has been verified as follows:
- Verified that checkpatch does no longer complain about spinlocks.
- Verified that make -s clean && make -s iscsi scst && make -s -C srpt
  still works and does not trigger any new compiler warnings.
- Verified 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.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@401 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-28 11:17:08 +00:00
Stanislaw Gruszka
684a1ed5b8 Check preprocesor definitions when releasing firmware.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@395 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-24 13:48:20 +00:00
Vladislav Bolkhovitin
56e642cf77 Patch from Bart Van Assche <bart.vanassche@gmail.com>:
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
2008-05-21 11:56:09 +00:00
Vladislav Bolkhovitin
1213800b2f 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
#!/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
2008-05-19 10:21:41 +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
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
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
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
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
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
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