10 years agoRemoved SRP_CRED_REQ support again.
bvassche [Wed, 13 Jan 2010 20:19:54 +0000 (20:19 +0000)]
Removed SRP_CRED_REQ support again.

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

10 years agoFixed the following category of checkpatch errors:
bvassche [Wed, 13 Jan 2010 19:33:21 +0000 (19:33 +0000)]
Fixed the following category of checkpatch errors:
   3 ERROR: code indent should use tabs where possible

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

10 years agoFixed processing of REQUEST SENSE and INQUIRY commands for not existing LUNs
vlnb [Wed, 13 Jan 2010 18:10:10 +0000 (18:10 +0000)]
Fixed processing of REQUEST SENSE and INQUIRY commands for not existing LUNs

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

10 years agoRegular reservations cleanup
vlnb [Wed, 13 Jan 2010 14:03:55 +0000 (14:03 +0000)]
Regular reservations cleanup

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

10 years agoFixed a compiler warning about a format specification mismatch.
bvassche [Wed, 13 Jan 2010 13:21:08 +0000 (13:21 +0000)]
Fixed a compiler warning about a format specification mismatch.

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

10 years agoMade sure that the EXTRACHECKS_BUG_ON() macro does not trigger a compiler
bvassche [Wed, 13 Jan 2010 13:20:00 +0000 (13:20 +0000)]
Made sure that the EXTRACHECKS_BUG_ON() macro does not trigger a compiler
warning about an empty controlled statement in a release or perf build.

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

10 years agoMade sure that none of the EXTRACHECKS_BUG_ON(), EXTRACHECKS_WARN_ON()
bvassche [Wed, 13 Jan 2010 13:13:03 +0000 (13:13 +0000)]
Made sure that none of the EXTRACHECKS_BUG_ON(), EXTRACHECKS_WARN_ON()
or EXTRACHECKS_WARN_ON_ONCE() macros trigger a compiler warning about an
empty controlled statement in a release or perf build.

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

10 years agoFixed the following checkpatch complaint:
bvassche [Wed, 13 Jan 2010 08:21:39 +0000 (08:21 +0000)]
Fixed the following checkpatch complaint:
   1 WARNING: braces {} are not necessary for single statement blocks

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

10 years agoDocs about QLA FW version updated
vlnb [Tue, 12 Jan 2010 20:10:56 +0000 (20:10 +0000)]
Docs about QLA FW version updated

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

10 years agoCustom commands parsing cleanups
vlnb [Tue, 12 Jan 2010 19:05:27 +0000 (19:05 +0000)]
Custom commands parsing cleanups

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

10 years agoLink to PRs patch to test updated.
vlnb [Tue, 12 Jan 2010 15:05:25 +0000 (15:05 +0000)]
Link to PRs patch to test updated.

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

10 years agoPatch from Daniel Fernandes <dfernandes1978@hotmail.com> fixing broken link to the...
vlnb [Tue, 12 Jan 2010 14:53:33 +0000 (14:53 +0000)]
Patch from Daniel Fernandes <dfernandes1978@hotmail.com> fixing broken link to the Marvell logo after Marvell redesigned their site.

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

10 years ago - Logging cleanups. Particularly, TRACE_MGMT_MINOR level was removed
vlnb [Tue, 12 Jan 2010 13:29:01 +0000 (13:29 +0000)]
 - Logging cleanups. Particularly, TRACE_MGMT_MINOR level was removed
 - Docs updates
 - Other minor fixes and cleanups

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

10 years agoFixed a race condition (use-after-free) that could trigger a kernel bug report during...
bvassche [Tue, 12 Jan 2010 08:52:08 +0000 (08:52 +0000)]
Fixed a race condition (use-after-free) that could trigger a kernel bug report during module unloading.

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

10 years agoWeb update
vlnb [Mon, 11 Jan 2010 19:44:15 +0000 (19:44 +0000)]
Web update

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

10 years ago - Improved handling of commands with TASK ABORTED status
vlnb [Mon, 11 Jan 2010 19:41:23 +0000 (19:41 +0000)]
 - Improved handling of commands with TASK ABORTED status

 - Minor cleanup

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

10 years agoLet's experimantally disable SCST_MAX_DEV_COMMANDS and cmd->dev_cmd_count functionali...
vlnb [Mon, 11 Jan 2010 19:27:07 +0000 (19:27 +0000)]
Let's experimantally disable SCST_MAX_DEV_COMMANDS and cmd->dev_cmd_count functionality and see if users will complain about it. If not, we will remove it.

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

10 years agoWhen converting the SCST source code into a series of upstream patches, SCST
vlnb [Mon, 11 Jan 2010 19:16:38 +0000 (19:16 +0000)]
When converting the SCST source code into a series of upstream patches, SCST
is built via the kbuild infastructure. In kernel version 2.6.24 (commit
f77bf01425b11947eeb3b5b54685212c302741b8) the kbuild variable ccflags-y has
been introduced and the use of EXTRA_CFLAGS in kbuild makefiles has been
deprecated. The patch below converts SCST's in-tree makefiles such that these
use ccflags-y instead of EXTRA_CFLAGS when generating kernel patches for
kernel 2.6.24 or later.

Additionally, this patch removes the "default n" from the file
scst/kernel/in-tree/Kconfig.scst since this statement is superfluous.

The patch below has been tested by verifying the output of the following
for ((v=23;v<=32;v++)); do rm -rf re* && scripts/run-regression-tests 2.6.$v; done

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

10 years agoMade sure that if a work completion reports an error status that
bvassche [Mon, 11 Jan 2010 19:00:03 +0000 (19:00 +0000)]
Made sure that if a work completion reports an error status that
completion queue processing is not aborted but that the remaining
completion queue entries are processed.

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

10 years agoConverted a WARN_ON() into a PRINT_ERROR() statement.
bvassche [Mon, 11 Jan 2010 18:41:55 +0000 (18:41 +0000)]
Converted a WARN_ON() into a PRINT_ERROR() statement.

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

10 years agoClose IB channel after session unregistration instead of before in order
bvassche [Mon, 11 Jan 2010 11:30:08 +0000 (11:30 +0000)]
Close IB channel after session unregistration instead of before in order
to prevent the following errors to occur:
ib_srpt: srpt_completion:1737:***ERROR***: failed sending response status= 4
ib_srpt: srpt_completion:1737:***ERROR***: failed sending response status= 5

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

10 years agoMade sure that the pre-cflags patches are uniform to the other in-tree kernel
bvassche [Sun, 10 Jan 2010 13:16:28 +0000 (13:16 +0000)]
Made sure that the pre-cflags patches are uniform to the other in-tree kernel
patches, i.e. that -p1 has to be used to apply these patches.

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

10 years agoBackported some 2.6.32 IB bug fixes to the 2.6.30 kernel.
bvassche [Sun, 10 Jan 2010 13:14:28 +0000 (13:14 +0000)]
Backported some 2.6.32 IB bug fixes to the 2.6.30 kernel.

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

10 years agoFixed the following race conditions:
bvassche [Sat, 9 Jan 2010 20:14:13 +0000 (20:14 +0000)]
Fixed the following race conditions:
- With thread=1, the kernel thread was stopped before all I/O was stopped.
  This could result in IB completions for responses sent to the initiator
  not being processed, scst_tgt_cmd_done() not being called for certain
  SCST commands and hence this race could cause "rmmod ib_srpt" to hang.
- ib_unregister_event_handler() was called after cancel_work_sync(). This
  could cause srpt_event_handler() to queue new work, work that could be
  executed after the data it operates on had been deallocated.
Change: simplified module unloading by calling ib_destroy_cm_id(sdev->cm_id)
  before calling scst_unregister(). This made the variable "cleaning_up"

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

10 years agoFixed the following category of checkpatch complaints:
bvassche [Sat, 9 Jan 2010 15:01:59 +0000 (15:01 +0000)]
Fixed the following category of checkpatch complaints:
   2 ERROR: code indent should use tabs where possible

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

10 years agoCommands can be aborted by other transports, so cmnd_rx_continue() should check scst_...
vlnb [Fri, 8 Jan 2010 16:19:31 +0000 (16:19 +0000)]
Commands can be aborted by other transports, so cmnd_rx_continue() should check scst_cmd_aborted().

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

10 years agoMark "completed" should be cleared from being retried commands.
vlnb [Fri, 8 Jan 2010 16:14:49 +0000 (16:14 +0000)]
Mark "completed" should be cleared from being retried commands.

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

10 years agoPatch from Alexey Obitotskiy <alexeyo1@open-e.com> with 2 fixes and cleanups implemen...
vlnb [Fri, 8 Jan 2010 16:11:13 +0000 (16:11 +0000)]
Patch from Alexey Obitotskiy <alexeyo1@open-e.com> with 2 fixes and cleanups implementing initiator-oriented access control in sysfs interface.

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

10 years agoWeb updates
vlnb [Fri, 8 Jan 2010 16:06:21 +0000 (16:06 +0000)]
Web updates

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

10 years agoUpdated kernel revisions.
bvassche [Thu, 7 Jan 2010 12:41:46 +0000 (12:41 +0000)]
Updated kernel revisions.

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

10 years agoRemoved some TRACE_ENTRY() / TRACE_EXIT() statements.
bvassche [Wed, 6 Jan 2010 20:47:08 +0000 (20:47 +0000)]
Removed some TRACE_ENTRY() / TRACE_EXIT() statements.

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

10 years agoFixed checkpatch complaints about whitespace (use tabs instead of spaces /
bvassche [Wed, 6 Jan 2010 20:22:15 +0000 (20:22 +0000)]
Fixed checkpatch complaints about whitespace (use tabs instead of spaces /
trailing whitespace) and the sparse complaint about using '0' as a pointer.

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

10 years agoChanges:
bvassche [Wed, 6 Jan 2010 20:11:24 +0000 (20:11 +0000)]
- srpt_release_channel_by_cmid(): the sdev->spinlock and scst_mgmt_lock are
  no longer locked nested.
- srpt_find_channel(): does now return NULL when the channel is not found
  (which never happens).

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

10 years agoA huge chunk of related to each other changes, which had to be tested together.
vlnb [Wed, 6 Jan 2010 13:02:22 +0000 (13:02 +0000)]
A huge chunk of related to each other changes, which had to be tested together.

iSCSI-SCST: A huge improvements in errors recovery and iSCSI RFC complaince as well as performance. Also:

 - Fixes and improvements for MaxOutstandingR2T>1

 - Flow control tracing added.

 - Cleanups

SCST core:

 - Now for scst_cmd_init_stage1_done() commands preprocessing_done() is always called before xmit_response(), even in case of abort or error.

 - Fixed recently introduced bug, which can lead to sending responses for aborted commands after reply on the corresponding TM command already sent.

 - Flow control tracing added.

 - Now it is possible to call functions setting commands execution status (e.g., scst_set_cmd_error_status()) several times for the same command. Only the first call will be completed, other calls - ignored.

 - All commands are counted and shown in proc/sysfs now. Before only active, i.e. not yet executed commands, were counted and shown there.

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

10 years agoAdded more debugging code.
bvassche [Mon, 4 Jan 2010 20:56:00 +0000 (20:56 +0000)]
Added more debugging code.

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

10 years agoChanges:
bvassche [Mon, 4 Jan 2010 20:26:19 +0000 (20:26 +0000)]
- Removed references to SCST core internal state names.
- Does no longer accept new connections while unloading.
- Module unloading should now really no longer cause a hang.

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

10 years agoMerged two lines.
bvassche [Mon, 4 Jan 2010 20:13:04 +0000 (20:13 +0000)]
Merged two lines.

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

10 years agoDo not try to include files marked for deletion.
bvassche [Mon, 4 Jan 2010 20:05:53 +0000 (20:05 +0000)]
Do not try to include files marked for deletion.

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

10 years agoFixed typos.
bvassche [Sun, 3 Jan 2010 08:34:21 +0000 (08:34 +0000)]
Fixed typos.

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

10 years agoFixed sporadic lockup triggered by removing the ib_srpt kernel module.
bvassche [Sat, 2 Jan 2010 13:56:12 +0000 (13:56 +0000)]
Fixed sporadic lockup triggered by removing the ib_srpt kernel module.
The following complaint was logged by the kernel when this happened:

INFO: task rmmod:26637 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
rmmod         D 00000000ffffffff     0 26637  26629
 ffff88009ce9dbd8 0000000000000046 ffff88009ce9dbf8 ffffffff8052466e
 0000000000000000 0000000000000001 0000000000000001 0000000000000001
 ffff88003c24d070 00000000001d17c0 000000000000c8a0 ffff88003c24d078
Call Trace:
 [<ffffffff8052466e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
 [<ffffffff80522408>] schedule+0x18/0x40
 [<ffffffff805227a5>] schedule_timeout+0x165/0x1a0
 [<ffffffff80525320>] ? _spin_unlock_irq+0x30/0x60
 [<ffffffff8023f4d9>] ? sub_preempt_count+0xa9/0xe0
 [<ffffffff80521756>] wait_for_common+0x116/0x1a0
 [<ffffffff80248850>] ? default_wake_function+0x0/0x20
 [<ffffffff8052189d>] wait_for_completion+0x1d/0x20
 [<ffffffffa06983e1>] scst_unregister_session+0x101/0x240 [scst]
 [<ffffffffa070f52f>] srpt_release+0xef/0x1e0 [ib_srpt]
 [<ffffffff805252d5>] ? _spin_unlock_irqrestore+0x65/0x80
 [<ffffffffa0693f60>] scst_unregister+0x70/0x380 [scst]
 [<ffffffff805252b2>] ? _spin_unlock_irqrestore+0x42/0x80
 [<ffffffffa0711982>] srpt_remove_one+0xa2/0x190 [ib_srpt]
 [<ffffffffa03b3105>] ib_unregister_client+0x65/0x120 [ib_core]
 [<ffffffff8027a02d>] ? trace_hardirqs_on+0xd/0x10
 [<ffffffffa0715114>] srpt_cleanup_module+0x70/0xd4 [ib_srpt]
 [<ffffffff80284f87>] sys_delete_module+0x1a7/0x270
 [<ffffffff8020cc6d>] ? retint_swapgs+0xe/0x13
 [<ffffffff80279e79>] ? trace_hardirqs_on_caller+0x29/0x1d0
 [<ffffffff8052466e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
 [<ffffffff8020c21b>] system_call_fastpath+0x16/0x1b
INFO: lockdep is turned off.

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

10 years agoChanges:
bvassche [Sat, 2 Jan 2010 12:27:32 +0000 (12:27 +0000)]
- Decreased number of target-to-initiator request send buffers from two
  to one such that a clear error message can be printed when the SRP
  initiator did not respond to the SRP_CRED_REQ information unit.
- Bug fix: don't modify ch->last_response_req_lim when sending an SRP
  information unit that contains the REQUEST LIMIT DELTA field failed.

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

10 years agoChanges related to credit-based SRP buffer management:
bvassche [Fri, 1 Jan 2010 17:48:07 +0000 (17:48 +0000)]
Changes related to credit-based SRP buffer management:
- Bug fix: don't set the REQUEST LIMIT DELTA field to SRPT_RQ_SIZE when
  sending the first reponse to the initiator but to the proper value
  (a small integer).
- An SRP_CRED_REQ information unit is now sent to the initiator if the
  number of I/O contexts available for receiving dropped below two I/O
  contexts (see also the SRP standard for more information). This change
  is required to fix the SRP initiator lockup that happens when the
  initiator sends requests faster than the target can process them. In
  order to fix the lockup, it is  also necessary to implement SRP_CRED_REQ
  support in the SRP initiator in the vanilla Linux kernel and in OFED.
  Neither kernel version 2.6.32 nor OFED 1.5 nor any previous
  version of these components supports SRP_CRED_REQ information units.
  See also http://bugzilla.kernel.org/show_bug.cgi?id=14235 for more
  information about the initiator lockup.

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

10 years agoAdded and commented out the following statement:
bvassche [Fri, 1 Jan 2010 17:06:38 +0000 (17:06 +0000)]
Added and commented out the following statement:

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

10 years agoThe patch below fixes the following two issues in the iscsi-scst-howto.txt
vlnb [Mon, 28 Dec 2009 19:58:39 +0000 (19:58 +0000)]
The patch below fixes the following two issues in the iscsi-scst-howto.txt
* For some Linux distro's the command iscsi-iname is installed in /usr/sbin
  and for others in /sbin.
* The scst and scst_vdisk modules must be loaded before the sample scstadmin
  commands work.

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

10 years agoCompilation of the SCST's sysfs code triggers a section mismatch because the
vlnb [Mon, 28 Dec 2009 19:55:45 +0000 (19:55 +0000)]
Compilation of the SCST's sysfs code triggers a section mismatch because the
function scst_sysfs_cleanup() is declared as an exit-only function while it is
also called from init_scst(). The patch below fixes this section mismatch.

This patch has been tested by verifying that the following command does not
report any section mismatches:

make CONFIG_DEBUG_SECTION_MISMATCH=y scst iscsi-scst srpt

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

10 years agoChanges:
bvassche [Mon, 28 Dec 2009 19:31:51 +0000 (19:31 +0000)]
- Convert sense data to/from fixed format / descriptor format before
  sending back a response.
- Print an error message to the kernel log when an unsupported IB event
  has been received.
- Return the SCSI status BUSY instead of CHECK CONDITION when allocating
  an SCST command failed (until r1409, the SCSI status in the SRP_RSP
  information unit was set to TASK SET FULL in this case).

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

10 years agoFollow-up for r1415: compiles again without warnings on both 32-bit
bvassche [Sat, 26 Dec 2009 18:57:17 +0000 (18:57 +0000)]
Follow-up for r1415: compiles again without warnings on both 32-bit
and 64-bit systems.

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

10 years agoUpdated to do list.
bvassche [Sat, 26 Dec 2009 09:23:39 +0000 (09:23 +0000)]
Updated to do list.

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

10 years agoBehavior changes:
bvassche [Fri, 25 Dec 2009 15:26:42 +0000 (15:26 +0000)]
Behavior changes:
- Fixed: the SCSOLNT and UCSOLNT bits were ignored in received SRP requests,
  and the SOLNT bit was not set in responses when required. This is required
  by the SRP protocol specification.
- Fixed: SRP_RSP messages must be limited to the MAXIMUM TARGET TO INITIATOR
  IU LENGTH  field indicated in the SRP_LOGIN_RSP response instead of the
  maximum message size supported by SRPT. This is also required by the SRP
  protocol specification.
- Fixed: the STATUS field of response messages with status GOOD and that
  contain sense data is no longer modified into CHECK CONDITION.
Internal changes (refactoring):
- Replaced the SCSI sense data handling data structures and code in SRPT by
  those of the SCST core.
- Moved the code for building an error response from srpt_handle_cmd() and
  srpt_handle_tsk_mgmt() to srpt_handle_new_iu().
- Removed the ioctx::data_len member.

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

10 years agoFixed a recently introduced format specification mismatch.
bvassche [Fri, 25 Dec 2009 09:10:10 +0000 (09:10 +0000)]
Fixed a recently introduced format specification mismatch.

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

10 years agoMove all the code from scst_cdbprobe.h to scst_lib.c where it should really belong.
vlnb [Thu, 24 Dec 2009 19:46:20 +0000 (19:46 +0000)]
Move all the code from scst_cdbprobe.h to scst_lib.c where it should really belong.

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

10 years agoWeb updates.
vlnb [Thu, 24 Dec 2009 13:54:49 +0000 (13:54 +0000)]
Web updates.

Tooltips code and usage provided by Greg V Zemskov <mne@greg.su> and Kirill Malkin <kirill.malkin@reldata.com>

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

10 years ago- Die if /proc/scsi_tgt/version doesn't exist.
mgandalf [Wed, 23 Dec 2009 19:55:07 +0000 (19:55 +0000)]
- Die if /proc/scsi_tgt/version doesn't exist.
- Replace croak() with die() in the module.

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

10 years agoUpdated kernel versions, and to, and...
bvassche [Sat, 19 Dec 2009 10:46:17 +0000 (10:46 +0000)]
Updated kernel versions, and to, and respectively.

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

10 years agoMade sure that all log lines generated by the ib_srpt kernel module
bvassche [Fri, 18 Dec 2009 19:11:24 +0000 (19:11 +0000)]
Made sure that all log lines generated by the ib_srpt kernel module
have an "ib_srpt: " prefix. Thanks to Stanley Sufficool for the patch.

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

10 years agoBetter handling of devices, which don't support MODE SENSE control mode page
vlnb [Fri, 18 Dec 2009 17:21:27 +0000 (17:21 +0000)]
Better handling of devices, which don't support MODE SENSE control mode page

Tested-By: Dietmar Maurer <dietmar@proxmox.com>
git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@1408 d57e44dd-8a1f-0410-8b47-8ef2f437770f

10 years agoMade sure that checkpatch doesn't complain about missing whitespace around
bvassche [Fri, 18 Dec 2009 17:16:03 +0000 (17:16 +0000)]
Made sure that checkpatch doesn't complain about missing whitespace around
the minus character in the following expression:
    tgt_dev->curr_sn = (typeof(tgt_dev->curr_sn)) -300

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

10 years agoSmall cleanup: there's no need to have SN's long + test on SNs overflow added
vlnb [Thu, 17 Dec 2009 12:57:24 +0000 (12:57 +0000)]
Small cleanup: there's no need to have SN's long + test on SNs overflow added

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

10 years agoFixed the following category of complaints reported by the 2.6.32 checkpatch:
bvassche [Wed, 16 Dec 2009 20:01:08 +0000 (20:01 +0000)]
Fixed the following category of complaints reported by the 2.6.32 checkpatch:
  11 ERROR: that open brace { should be on the previous line

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

10 years agoAdded kernel version
bvassche [Wed, 16 Dec 2009 19:51:11 +0000 (19:51 +0000)]
Added kernel version

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

10 years agoAdded to repository.
bvassche [Wed, 16 Dec 2009 19:49:19 +0000 (19:49 +0000)]
Added to repository.

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

10 years agoFixed kernel version numbers.
bvassche [Wed, 16 Dec 2009 19:49:00 +0000 (19:49 +0000)]
Fixed kernel version numbers.

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

10 years agoFix incorrect initialization of scst_mgmt_cmd_stub structure
vlnb [Wed, 16 Dec 2009 19:24:42 +0000 (19:24 +0000)]
Fix incorrect initialization of scst_mgmt_cmd_stub structure

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

10 years agoUpdate for 2.6.32 + fix context of vdisk_t10_dev_id_rwlock
vlnb [Wed, 16 Dec 2009 19:21:41 +0000 (19:21 +0000)]
Update for 2.6.32 + fix context of vdisk_t10_dev_id_rwlock

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

10 years agoFixed incorrect "set_t10_dev_id " token size caused by rename of set_t10_device_id...
vlnb [Wed, 16 Dec 2009 11:48:29 +0000 (11:48 +0000)]
Fixed incorrect "set_t10_dev_id " token size caused by rename of set_t10_device_id to set_t10_dev_id.

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

10 years agoPatch from Daniel Fernandes <dfernandes1978@hotmail.com> adding missed links in 2...
vlnb [Wed, 16 Dec 2009 11:38:54 +0000 (11:38 +0000)]
Patch from Daniel Fernandes <dfernandes1978@hotmail.com> adding missed links in 2 pages

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

10 years agoFix spelling typos.
vlnb [Wed, 16 Dec 2009 11:35:12 +0000 (11:35 +0000)]
Fix spelling typos.

Signed-off-by: Dotan Barak <dotanba@gmail.com>
with additional spelling fixes noticed by frank zago <fzago@systemfabricworks.com>

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

10 years ago- Added -noprompt option. Use with care!
mgandalf [Tue, 15 Dec 2009 20:01:01 +0000 (20:01 +0000)]
- Added -noprompt option. Use with care!
- Added support for T10 device ID. Applied modified patch by witoldk1@open-e.com.

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

10 years agoPatch from Witold Kowolik <witold.kowolik@open-e.com> ranaming SCSI ID to T10 device...
vlnb [Tue, 15 Dec 2009 19:32:20 +0000 (19:32 +0000)]
Patch from Witold Kowolik <witold.kowolik@open-e.com> ranaming SCSI ID to T10 device ID + small fix to handle spaces in t10dev_id with small changes. Particularly, I renamed everywhere t10_device_id in t10_dev_id.

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

10 years agoPatch from Smadar Gonen <smadar.gn@gmail.com> with minor changes fixing race in task...
vlnb [Tue, 15 Dec 2009 18:32:13 +0000 (18:32 +0000)]
Patch from Smadar Gonen <smadar.gn@gmail.com> with minor changes fixing race in task managmement code if several TM functions affect the same command on different stages of processing.

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

10 years agoUpdated kernel version to
bvassche [Mon, 14 Dec 2009 19:14:23 +0000 (19:14 +0000)]
Updated kernel version to

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

10 years agoSpelling fix.
bvassche [Sun, 13 Dec 2009 18:02:39 +0000 (18:02 +0000)]
Spelling fix.

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

10 years agoUpdated SRPT documentation.
bvassche [Sun, 13 Dec 2009 18:01:14 +0000 (18:01 +0000)]
Updated SRPT documentation.

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

10 years agoBug fix: SRQ availability counter is no longer decremented when ib_post_send() fails.
bvassche [Sun, 13 Dec 2009 17:59:44 +0000 (17:59 +0000)]
Bug fix: SRQ availability counter is no longer decremented when ib_post_send() fails.

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

10 years agoAdded an additional consistency check: an error message is now printed if
bvassche [Sun, 13 Dec 2009 13:00:39 +0000 (13:00 +0000)]
Added an additional consistency check: an error message is now printed if
the kernel-ib-devel RPM has been installed but not the kernel-ib RPM.

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

10 years agoWhitespace-only change: fixed a checkpatch complaint.
bvassche [Wed, 9 Dec 2009 12:03:35 +0000 (12:03 +0000)]
Whitespace-only change: fixed a checkpatch complaint.

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

10 years agoUpdated kernel version to
bvassche [Wed, 9 Dec 2009 11:38:11 +0000 (11:38 +0000)]
Updated kernel version to

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

10 years agoUpdated kernel versions and to and respectively.
bvassche [Tue, 8 Dec 2009 20:47:50 +0000 (20:47 +0000)]
Updated kernel versions and to and respectively.

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

10 years agoUpdate: the __same_type() macro has been introduced in kernel version 2.6.31, not...
bvassche [Mon, 7 Dec 2009 08:51:58 +0000 (08:51 +0000)]
Update: the __same_type() macro has been introduced in kernel version 2.6.31, not in 2.6.30.

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

10 years ago- Fixed a checkpatch complaint.
bvassche [Mon, 7 Dec 2009 08:07:58 +0000 (08:07 +0000)]
- Fixed a checkpatch complaint.
- Made sure that the SRPT source code compiles again on systems with a 2.6.29
  or older kernel.

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

10 years agoFMR only applies to the SRP initiator, not to the SRP target.
bvassche [Mon, 7 Dec 2009 07:21:39 +0000 (07:21 +0000)]
FMR only applies to the SRP initiator, not to the SRP target.

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

10 years ago- Simplified error handling in srpt_get_desc_tbl(): incorrect indirect
bvassche [Sun, 6 Dec 2009 19:00:25 +0000 (19:00 +0000)]
- Simplified error handling in srpt_get_desc_tbl(): incorrect indirect
  descriptors are now reported by returning -EINVAL instead of setting the
  third argument to true. Removed the third argument of this function.
- Added support for SRP_CMD requests with non-zero ADDITIONAL CDB LENGTH.
  Note: support for these requests has not yet been tested -- I do not know
  of any SRP initiator that generates such requests.

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

10 years agoUpdated SRPT documentation.
bvassche [Sun, 6 Dec 2009 12:44:47 +0000 (12:44 +0000)]
Updated SRPT documentation.

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

10 years agoUpdated to do list.
bvassche [Sun, 6 Dec 2009 12:37:21 +0000 (12:37 +0000)]
Updated to do list.

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

10 years ago- Moved two constants from ib_srpt.c to ib_srpt.h.
bvassche [Sat, 5 Dec 2009 10:10:53 +0000 (10:10 +0000)]
- Moved two constants from ib_srpt.c to ib_srpt.h.
- Changed default value of srp_max_message_size from 4096 to 2116. This
  size corresponds to the size of an SRP_CMD request message containing
  an indirect buffer list with 128 elements.
- A warning is now printed when an SRP_CMD request is received containing
  more than one CDB -- this kind of messages is not yet supported.
- Switched back from multiple ib_dma_sync_single_for_cpu() calls to a
  single call because the latter results in better performance.
- An error message is now printed if a corrupt SRP_CMD request has been
  received. Before these were ignored silently.

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

10 years ago- Added new vdisk_blockio and vdisk_nullio introduced by the sysfs changes.
mgandalf [Fri, 4 Dec 2009 19:08:32 +0000 (19:08 +0000)]
- Added new vdisk_blockio and vdisk_nullio introduced by the sysfs changes.
  Change by witoldk1@open-e.com.

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

10 years agoValidator fix
vlnb [Thu, 3 Dec 2009 18:57:58 +0000 (18:57 +0000)]
Validator fix

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

10 years agoWeb updates
vlnb [Thu, 3 Dec 2009 18:43:13 +0000 (18:43 +0000)]
Web updates

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

11 years agoSome locking cleanups
vlnb [Mon, 30 Nov 2009 19:17:59 +0000 (19:17 +0000)]
Some locking cleanups

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

11 years agoShould have been included in the previous commit (r1371).
bvassche [Mon, 30 Nov 2009 10:59:40 +0000 (10:59 +0000)]
Should have been included in the previous commit (r1371).

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

11 years agoAvoid dangling pointer dereferences by resetting ioctx->scmnd in srpt_on_free_cmd().
bvassche [Mon, 30 Nov 2009 09:51:17 +0000 (09:51 +0000)]
Avoid dangling pointer dereferences by resetting ioctx->scmnd in srpt_on_free_cmd().

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

11 years agoCleanup:
bvassche [Sat, 28 Nov 2009 18:40:15 +0000 (18:40 +0000)]
- Removed a spinlock that became superfluous.
- Fixed checkpatch and sparse complaints.

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

11 years ago- Split srpt_find_channel into two functions: srpt_find_channel() and
bvassche [Sat, 28 Nov 2009 17:20:22 +0000 (17:20 +0000)]
- Split srpt_find_channel into two functions: srpt_find_channel() and
- Removed tracing statements from srpt_unmap_sg_to_ib_sge() because this
  function is now invoked while performing I/O.

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

11 years agoBug fixes (some introduced in the previous revision, some long-standing):
bvassche [Sat, 28 Nov 2009 16:36:53 +0000 (16:36 +0000)]
Bug fixes (some introduced in the previous revision, some long-standing):
- Fixed system lockup triggered by "rmmod ib_srpt" while the SRP was writing
  data. This lockup occurred because srpt_reset_ioctx() was not resetting
  the pointers to the memory it freed, which indirectly triggered a kernel
  oops in the IB interrupt handler.
- Fixed BUG() during "rmmod ib_srpt" triggered by calling scst_rx_cmd()
  after scst_unregister_session(). This has been fixed by making sure that
  the channel state is set to RDMA_CHANNEL_DISCONNECTING before calling
Performance improvements:
- Simplified cmd_wait_list manipulation code.

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

11 years agoBug fixes:
bvassche [Sat, 28 Nov 2009 14:03:55 +0000 (14:03 +0000)]
Bug fixes:
- Fixed races on srpt_ioctx::state manipulation by declaring this variable
- Fixed races on srpt_rdma_ch::state manipulation by declaring this variable
- Fixed bug in srpt_abort_scst_cmd(): SRPT_STATE_DATA_IN was not yet handled.
- Fixed races on srpt_rdma_ch::cm_id destruction. Clearly documented which
  object owns the cm_id at which time.
Performance improvements:
- Eliminated the list of active commands (active_scmnd_list) because this
  list was a duplicated of a list already kept by the SCST core.
- Switched to double-checked locking in srpt_handle_new_iu(). This saves one
  spin_lock_irqsave() and one spin_unlock_irqrestore() call in the common
  case (that is, a live channel).
- Eliminated RDMA channel state tests in SCST command handling callback
  functions -- removed the function srpt_abort_if_disconnecting().

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

11 years agoRemoved trailing whitespace.
bvassche [Sat, 28 Nov 2009 08:24:10 +0000 (08:24 +0000)]
Removed trailing whitespace.

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

11 years agoPatch from Witold Kowolik <witoldk1@open-e.com> implementing manual setting of SCSI...
vlnb [Fri, 27 Nov 2009 18:52:23 +0000 (18:52 +0000)]
Patch from Witold Kowolik <witoldk1@open-e.com> implementing manual setting of SCSI ID on vdisk devices (with some changes)

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

11 years agoFollowup for r1361
vlnb [Fri, 27 Nov 2009 18:22:45 +0000 (18:22 +0000)]
Followup for r1361

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

11 years agoChanges:
bvassche [Fri, 27 Nov 2009 17:52:47 +0000 (17:52 +0000)]
- The message that sense data is truncated is now generated via the
  PRINT_WARNING() macro instead of TRACE_DBG().
- Cleaned up code for sense data truncation.
- Compiles again on RHEL and CentOS systems.

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

11 years agoLog sense data truncation when debugging is enabled.
bvassche [Fri, 27 Nov 2009 12:10:59 +0000 (12:10 +0000)]
Log sense data truncation when debugging is enabled.

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