Commit Graph

982 Commits

Author SHA1 Message Date
Vladislav Bolkhovitin
8befa6faad 1.0.1.1 web updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1049 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-14 19:16:53 +00:00
Bart Van Assche
dedefa34de Rearranged preprocessor statements containing version checks such that these
are now processed correctly by scripts/specialize-patch.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1048 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-14 18:53:10 +00:00
Bart Van Assche
2232922dd9 - The expression "defined(SCST_IO_CONTEXT)" is now replaced by "1".
- The following two lines and the first blank line below are now removed:
  +#define SCSI_EXEC_REQ_FIFO_DEFINED
  +#define SCST_IO_CONTEXT
- Hunks that do no longer contain any modifications because of the 
  previous steps are now removed from the output because patch otherwise
  complains.
- Added support for evaluating expressions containing the arithmetic
  operators *, /, +, -.
- Removed support for partial evaluation of expressions because it is too
  tricky to get this right due to operator precedence.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1047 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-14 18:26:58 +00:00
Bart Van Assche
e6bd69006a Changed terminology in comments and one printk() message such that it
matches the terminology used in the SRP spec.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1046 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-13 19:05:31 +00:00
Bart Van Assche
edb8da8616 - Remove the line "+#define SCSI_EXEC_REQ_FIFO_DEFINED" from the generated
patch.
- Substitute "defined(SCSI_EXEC_REQ_FIFO_DEFINED)" by "1" in preprocessor
  statements.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1045 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-13 18:29:59 +00:00
Vladislav Bolkhovitin
f748e87fb3 The patch below fixes several recently introduced sparse warnings and
errors. The patch below has been tested by verifying the output of the following commands:
  scripts/run-regression-tests 2.6.29
  scripts/run-regression-tests 2.6.30.4

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

Committed with some minor changes/additions.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1044 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-13 17:34:32 +00:00
Bart Van Assche
b9b9ab44f5 Whitespace-only change -- fixed the following checkpatch error:
ERROR: space required after that ',' (ctx:VxV).


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1043 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-13 12:06:04 +00:00
Bart Van Assche
fdfb159727 Fixed typo.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1042 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-13 09:33:28 +00:00
Bart Van Assche
aedd521030 Joined a few preprocessor statements on a single line that were split
over multiple lines such that scripts/generate-kernel-patch and
scripts/run-regression-tests can process these.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1041 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-12 18:01:19 +00:00
Vladislav Bolkhovitin
d3d1fa2d29 New implementation of the pass-through commands execution. Changes:
- scsi_execute_async() renamed to scst_scsi_exec_async() and from now will stay in scst_lib.c
 - In scst_scsi_exec_async() support for long CDBs and bidirectional commands added
 - Patches scst_exec_req_fifo were removed for kernels between 2.6.26 and 2.6.29, because they are not needed anymore. Pass-through will work on those kernels without them
 - Monor bug fixes and cleanups
 - Docs updated



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1040 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-12 17:13:26 +00:00
Bart Van Assche
63b8d248ce Removed the one_guid_per_ioc kernel parameter again because it did not
solve the connectivity problem between WinOF and an SRP target
equipped with multiple IB ports.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1039 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-11 19:58:48 +00:00
Bart Van Assche
92ef2de4a5 Added a note about the size of struct ib_qp_attr.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1038 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-11 19:24:30 +00:00
Vladislav Bolkhovitin
dda7f2f71b - Added "replace" command to replace one LUN by another and generate INQUIRY DATA HAS CHANGED Unit Attention
- Sending INQUIRY DATA HAS CHANGED Unit Attention through AENs added
 - Minor fixes and cleanups



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1036 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-10 16:59:16 +00:00
Bart Van Assche
fb6bad5bd9 Should have been included in the previous commit (r1034).
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1035 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-10 15:44:22 +00:00
Bart Van Assche
64f93b6add - Implemented kernel module parameter one_guid_per_ioc. Setting this
parameter to true should make it possible to connect from a WinOF
  initiator to an SRP target when there is more than one IB path
  between initiator and target.
- Renamed mellanox_ioc_guid into global_ioc_guid.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1034 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-10 15:28:03 +00:00
Bart Van Assche
cc171de600 Whitespace-only change: fixed a checkpatch complaint about trailing whitespace.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1033 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-10 12:39:13 +00:00
Bart Van Assche
fbaed7ab3b Whitespace-only changes: fixed checkpatch complaints reported against a 2.6.27 kernel.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1032 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-10 12:32:06 +00:00
Vladislav Bolkhovitin
a6189e9096 - Adds generation of INQUERY DATA HAS CHANGED UA for changed devices during automatic sessions reassignment
- Requeue global UAs on delivery failure added
 - Minor fixes and cleanups



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1031 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-10 12:27:29 +00:00
Bart Van Assche
3d227b8f73 - Added consistency checking for the SRPT command state management
introduced in r1026.
- Removed WARN_ON() statements that could trigger a warning when nothing
  was wrong because these were reading uninitialized memory. These statements
  were introduced in r1026. The call stack of the warning logged in the
  kernel log is as follows:
  <IRQ>  [<ffffffffa057f578>] ? srpt_handle_new_iu+0x818/0xaf0 [ib_srpt]
  [<ffffffff80243f18>] warn_slowpath_common+0x78/0xd0
  [<ffffffff80243f7f>] warn_slowpath_null+0xf/0x20
  [<ffffffffa057f578>] srpt_handle_new_iu+0x818/0xaf0 [ib_srpt]
  [<ffffffffa057f9ab>] srpt_completion+0x15b/0x230 [ib_srpt]
  [<ffffffffa04351f2>] mlx4_ib_cq_comp+0x12/0x20 [mlx4_ib]
  [<ffffffffa01eb1aa>] mlx4_cq_completion+0x3a/0x80 [mlx4_core]
  [<ffffffffa01ec475>] mlx4_eq_int+0x2a5/0x2e0 [mlx4_core]
  [<ffffffffa01ec59a>] mlx4_msi_x_interrupt+0x6a/0x90 [mlx4_core]
  [<ffffffff8027c0aa>] handle_IRQ_event+0x3a/0xf0
  [<ffffffff8027dee1>] handle_edge_irq+0xc1/0x160
  [<ffffffff8020ec3f>] handle_irq+0x1f/0x30
  [<ffffffff8020e37a>] do_IRQ+0x6a/0xf0
  [<ffffffff8020c7d3>] ret_from_intr+0x0/0xa
  <EOI>  [<ffffffffa0012e52>] ? acpi_idle_enter_simple+0x159/0x187 [processor]
  [<ffffffffa0012e48>] ? acpi_idle_enter_simple+0x14f/0x187 [processor]
  [<ffffffff804323e5>] ? cpuidle_idle_call+0xa5/0x100
  [<ffffffff8020b0a2>] ? cpu_idle+0x62/0xd0
  [<ffffffff804be614>] ? rest_init+0x84/0x90
  [<ffffffff8067ecc5>] ? start_kernel+0x35a/0x415
  [<ffffffff8067e289>] ? x86_64_start_reservations+0x99/0xb9
  [<ffffffff8067e389>] ? x86_64_start_kernel+0xe0/0xf2


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1030 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-10 09:57:30 +00:00
Bart Van Assche
bbad4dfcaa - Fixed memory leak in srpt_handle_tsk_mgmt() error path.
- Modified srpt_build_cmd_rsp() and srpt_build_tskmgmt_rsp() such that
  these two functions now return the number of bytes of the response PDU
  built.
- Converted a printk() statement to TRACE_DBG().


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1029 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-08 15:02:19 +00:00
Bart Van Assche
375a72b685 Added more comments.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1028 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-08 14:59:28 +00:00
Stanislaw Gruszka
79e1938ff3 Update README.scst a bit.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1027 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-08 13:50:16 +00:00
Bart Van Assche
1b516fab15 Implemented SRPT command state management. The SRPT target code does no
longer rely on the struct scst_cmd state managed by the SCST core.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1026 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-08 11:52:46 +00:00
Bart Van Assche
10ec474914 Updated Subversion ignore list.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1025 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-07 14:17:40 +00:00
Bart Van Assche
c7572cd2cb Updated SRPT documentation.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1024 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-07 14:14:19 +00:00
Vladislav Bolkhovitin
4588200994 Patch from Bart Van Assche <bart.vanassche@gmail.com>:
Since SCST r979 the SRP target source code does no longer compile on RHEL /
CentOS systems where OFED has been installed. This is because OFED has its
own backported versions of the 2.6.20+ workqueue API and already includes a
definition of cancel_delayed_work_sync(). The patch below makes sure that on
RHEL 5 / CentOS 5 systems with OFED 1.4 installed the SCST definition of
cancel_delayed_work_sync() does not conflict with the OFED definition of
the same function.

The patch below has been tested by verifying that the SRPT source code
compiles and runs fine on CentOS 5.3 + OFED 1.4.1 and also on a system with
a vanilla 2.6.30.4 kernel.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1023 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-06 17:18:28 +00:00
Vladislav Bolkhovitin
b9cc1d34a2 - Atomic move of a security name from one security group to another implemented
- Cleanups



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1020 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-06 16:28:23 +00:00
Bart Van Assche
79b9d3141c Fixed the following checkpatch complaint: return is not a function,
parentheses are not required.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1019 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-06 13:42:28 +00:00
Vladislav Bolkhovitin
eb9a1f15c3 Web updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1018 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-06 11:49:05 +00:00
Vladislav Bolkhovitin
a65caa9b9b Automatic sessions reassignment implemented
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1017 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-06 11:47:18 +00:00
Bart Van Assche
7286d22319 Fixed data races on manipulation of the srpt_devices list by eliminating
this list. Only the number of IB devices is relevant for the SRPT
implementation. Introduced a new counter that tracks the number of IB
devices.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1016 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-06 10:05:10 +00:00
Bart Van Assche
e9feb2e818 - Refactoring: split srpt_ch_qp_rtr_rts() into two functions, namely
srpt_ch_qp_rtr() and srpt_ch_qp_rts().
- Replaced dynamic memory allocation (kmalloc()/kfree()) in the aforementioned
  two functions by stack allocation.
- Compiles again on pre-2.6.22 kernels (RHEL / CentOS systems).


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1015 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-06 09:12:37 +00:00
Bart Van Assche
8ca3e36e99 - Fixed race conditions related to channel state manipulation.
- Inlined srpt_disconnect_channel().
- Modified error handling coding style in srpt_cm_req_recv() to the usual
  kernel coding style: upon error, jump to the error handling code.
- Added more comments.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1014 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-05 19:48:16 +00:00
Vladislav Bolkhovitin
0e1890f3c7 Minor docs update
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1013 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-05 09:50:11 +00:00
Bart Van Assche
6dc8835e7e - Bug fix: if processing of any of the SRP task management functions by
the SCST core fails (abort task, LUN reset, ...), an SRP_RSP PDU is
  now sent back to the initiator.
- Added more debug tracing statements.
- Improved readability of some parts of the source code.
- Added more comments.
- Partially reverted one hunk of r1003: while casting an unsigned 64-bit
  value to the type u64 and printing such values via %llx works fine on
  x86 systems, the same code triggers a compiler warning on PowerPC
  systems. So while r1003 changed some (unsigned long long) casts to (u64)
  casts, this revision changes these back to (unsigned long long) casts.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1012 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-04 18:45:46 +00:00
Vladislav Bolkhovitin
b06a932d2c Web updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1011 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-04 17:50:43 +00:00
Vladislav Bolkhovitin
cef4a0ec28 A minor SAM violation fixed.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1010 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-04 17:17:16 +00:00
Vladislav Bolkhovitin
c722a2b159 Minor typo noticed by Bart Van Assche <bart.vanassche@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1009 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-04 16:59:09 +00:00
Vladislav Bolkhovitin
01c113dbb4 Patch from Smadar Gonen <smadar.gn@gmail.com>:
The following fixes were made:

 - Use monotonic clock as time source instead of a real-time clock so change of system time will not affect calculation.

 - Init scst_time to 0 + minor display fix.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1007 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-04 11:59:15 +00:00
Vladislav Bolkhovitin
24f4743f68 Web updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1006 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-04 11:10:18 +00:00
Bart Van Assche
70110ec078 Fixed race conditions on RDMA channel manipulations found via source reading:
- Added a second argument to srpt_find_channel() that specified whether or not
  the channel should be removed from the channel list if found.
- Moved list_del() statement from the body of the srpt_release_channel()
  function to its callers.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1005 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-03 16:00:36 +00:00
Bart Van Assche
7234de012f Multiple cosmetic source code changes.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1004 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-03 15:06:00 +00:00
Bart Van Assche
47d7742f4e - Enabled the LUN reset task management function.
- Changed return type of srpt_release_channel() from int to void
  because the return value did depend in a trivial way on the function
  arguments. Changed the return type of srpt_find_and_release_channel()
  and several of its callers also from int to void. Instead
  srpt_cm_handler() now directly sets its own return value.
- Converted a list_for_each_entry_safe() into a list_for_each_entry() loop
  because no elements are added or deleted in the loop body.
- Converted debug-printk() statements into TRACE_DBG().
- Changed indentation of one statement from 12 to 16 (was not reported by
  checkpatch).


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1003 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-02 18:57:48 +00:00
Bart Van Assche
7cb9d95684 Added even more comments.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1002 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-02 18:45:40 +00:00
Bart Van Assche
4d249a4112 Added command-line option -f, which allows to skip the test whether there is still data present.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1001 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-02 18:04:21 +00:00
Bart Van Assche
c49f89cec1 Whitespace-only change: fixed a checkpatch complaint.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1000 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-01 06:50:36 +00:00
Bart Van Assche
7c25f55ad9 Only call scst_tgt_cmd_done() if scst_rx_data() has not been called.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@999 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-08-01 06:03:55 +00:00
Bart Van Assche
58eb630bd0 Fixed the issue that 'rmmod ib_srpt' with ongoing SRP I/O could trigger
a deadlock.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@998 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-31 11:40:10 +00:00
Bart Van Assche
f5097d6263 Whitespace-only changes: fixed checkpatch complaints introduced in the previous commit.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@997 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-31 11:33:26 +00:00
Bart Van Assche
221ce1846b Added more comments.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@996 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-31 11:27:54 +00:00