Commit Graph

61 Commits

Author SHA1 Message Date
Bart Van Assche
7617a71367 Added more comments.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@863 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-05-19 17:58:06 +00:00
Bart Van Assche
5347e3f509 Reverted r857 because the coding style of r856 is believed to be what is expected upstream instead of the coding style of r857.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@860 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-05-19 16:41:09 +00:00
Bart Van Assche
f3d5d989ca Cleaned up changes introduced in r855.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@857 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-05-16 11:24:45 +00:00
Bart Van Assche
812d04fa03 Added more comments.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@856 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-05-16 11:20:52 +00:00
Bart Van Assche
76bdb860f0 Split srpt_handle_new_iu() in smaller functions.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@855 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-05-16 07:34:41 +00:00
Bart Van Assche
0a76a2b21a Updated to do list.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@848 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-05-11 17:55:59 +00:00
Bart Van Assche
72f5b47141 Another documentation update.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@838 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-05-10 19:20:58 +00:00
Bart Van Assche
0f132124b9 Added more details.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@837 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-05-10 18:28:09 +00:00
Bart Van Assche
7340819a3f Clarified an error message.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@836 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-05-10 18:25:08 +00:00
Bart Van Assche
63bc07871d Added a variant of the patch for scripts/Makefile.lib.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@835 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-05-10 18:04:57 +00:00
Bart Van Assche
603d81dde4 Documented how to build SCST-SRPT against OFED.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@834 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-05-10 17:31:22 +00:00
Bart Van Assche
9b25c9c44c Updated to do file.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@833 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-05-10 17:29:41 +00:00
Bart Van Assche
52d50a5ea7 Removed one OFED installation test because on some distro's it triggers false complaints.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@822 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-05-04 20:02:30 +00:00
Bart Van Assche
c521377609 ib_srpt.c compiles now on RHEL 5.x systems where OFED has been installed.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@820 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-05-04 18:57:04 +00:00
Bart Van Assche
2f1acab33e Prepend the OFED kernel header paths before the regular kernel header path when compiling on a system where OFED has been installed.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@819 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-05-04 18:55:50 +00:00
Bart Van Assche
90e914fd25 - Removed comments that referred to the 2.4 module build system.
- Simplified this Makefile: the target all now directly refers to
  src/Module.symvers. Removed the phony target Module.symvers.
- An error message is now printed if OFED has been built with srpt=y.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@817 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-05-02 12:38:33 +00:00
Bart Van Assche
19ab352393 Made building against OFED more robust.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@815 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-05-01 19:12:14 +00:00
Bart Van Assche
8f7f3d64cc Added support for compiling scst-srpt on a system where the OFED InfiniBand
kernel modules have been installed.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@814 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-05-01 09:24:47 +00:00
Vladislav Bolkhovitin
f572d4ff79 - Copyrights updated.
- Other minor updates



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@803 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-04-27 19:01:28 +00:00
Bart Van Assche
c712d12f40 The function srpt_cm_req_recv() now returns an error code instead of 0
when an SRP login request is rejected. This fixes a memory leak: the
InfiniBand core (drivers/infiniband/core/cm.c) only calls cm_free_work()
when the registered cm_handler function, i.e. srpt_cm_req_recv()
returns an error code. This patch has been submitted by by Frank Zago.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@800 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-04-26 09:10:52 +00:00
Bart Van Assche
c3d3378bc2 Made show_login_info() work for InfiniBand HCA's with more than two
ports. show_login_info() produces the information that can be retrieved
from /sys/class/infiniband_srpt/srpt-*/login_info. Note: as of today
there do not yet exist any InfiniBand HCA's with more than two ports.
Thanks to Frank Zago for reporting this issue.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@799 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-04-26 08:39:06 +00:00
Vladislav Bolkhovitin
eb14f7ca12 ChangeLog and ToDo files updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@725 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-27 19:50:23 +00:00
Vladislav Bolkhovitin
643c7ab2d1 Patch from Ruben Laban <r.laban@ism.nl>:
I replaced all occurences of DISTDIR with DESTDIR and also introduced SBINDIR (and friends) to some other Makefiles. 



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@719 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-25 19:33:10 +00:00
Vladislav Bolkhovitin
d3d5666f5d Cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@682 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-03 17:00:53 +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
Vladislav Bolkhovitin
48addc3482 Modified patch from Bart Van Assche <bart.vanassche@gmail.com>
It, hopefully, fixes compilation problems on CentOS 5.2 as well as on vanilla kernels <2.6.28


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@638 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-23 19:51:54 +00:00
Vladislav Bolkhovitin
968475e2dc Obsolete TODO removed
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@625 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-26 17:42:21 +00:00
Vladislav Bolkhovitin
de25580abb Checkpatch fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@616 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-10 15:55:16 +00:00
Vladislav Bolkhovitin
41c3515516 - Memory barriers cleanup. Comments for them improved
- Small docs update
 - srpt/README_in-tree added



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@614 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-10 10:55:01 +00:00
Bart Van Assche
f1b811e8dc Fixed typo.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@607 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-06 14:04:29 +00:00
Vladislav Bolkhovitin
26cde4de56 Make soft IRQ context default
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@594 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-03 18:01:42 +00:00
Vladislav Bolkhovitin
e967b30f95 Small cleanup of unused code
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@566 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-11-10 17:23:23 +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
3379376993 - Fixed incorrect SCST state used on error path
- Small cleanups
 - ToDo entry added


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@557 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-10-31 11:16:47 +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
Vladislav Bolkhovitin
0b2be958e9 The patch below makes the srpt driver compile against the 2.6.27 kernel
headers.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>
Acked-by: Vu Pham <vu@mellanox.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@551 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-10-30 12:34:48 +00:00
Vladislav Bolkhovitin
2688d2b8c4 The patch below fixes the sparse warnings in ib_srpt.c about missing
declarations by inserting the keyword static where appropriate.

This patch has been verified by rereading the patch carefully, and by verifying
that SCST source code still compiles fine.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@539 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-10-24 12:14:11 +00:00
Vladislav Bolkhovitin
775ddf6f18 The patch below implements the following changes, because an
upcoming checkpatch version will complain about these:
* Make sure that a single tab is used for indenting instead of four spaces.
* Removed spaces from around the colon used for specifying field widths.
* Remove trailing whitespace in .txt files.

This patch has been tested by verifying that:
- the output of svn diff -x -w is empty, i.e. that the patch only affects
  whitespace.
- the SCST out-of-tree source code still compiles fine against the 2.6.25 kernel
  (make -s clean && make -C srpt -s clean && make -s scst iscsi-scst && make -C srpt -s).

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@525 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-10-16 17:46:37 +00:00
Vladislav Bolkhovitin
fdf6e710e1 Unused files removed as requested by Bart Van Assche <bart.vanassche@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@521 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-10-09 17:58:04 +00:00
Vladislav Bolkhovitin
2f3236e013 Until now the kernel config option to enable the SRP target was called
CONFIG_INFINIBAND_SRPT. This is a reminiscent from the time when the SRPT code
resided in the directory drivers/infiniband/ulp/srpt. Since this code has been moved
into the directory drivers/scst/srpt, the path below renames this config option
into CONFIG_SCST_SRPT. The other changes present in this patch are:
- Removed srpt/src/Makefile.infiniband.Linux-2.6.2[45].patch since these files are obsolete.
- Rewrote Kconfig help text slightly.

The patch below has been tested by verifying that the 2.6.26.5 kernel + SCST
patch still compiles cleanly with CONFIG_SCST_SRPT=m.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@518 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-10-08 13:44:27 +00:00
Vladislav Bolkhovitin
38897729bd The patch below enables compilation of the SRPT driver with the 2.6.26.x kernel.
This patch has been tested by verifying that:
- the patched Linux 2.6.25.17 and 2.6.26.5 kernel trees still compile when
  CONFIG_INFINIBAND_SRPT=m is present in .config (verified that
  make -k modules only complains about a missing qla2xxx-target directory).
- the SCST out-of-tree source code still compiles fine against the 2.6.25 kernel
  (make -s clean && make -C srpt -s clean && make -s scst iscsi-scst && make -C srpt -s).
- checkpatch output is identical for the output of scripts/generate-kernel-patch 2.6.25
  and scripts/generate-kernel-patch 2.6.26.

Based on patch from Vu Pham <vu@mellanox.com>

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@516 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-10-07 08:57:46 +00:00
Vladislav Bolkhovitin
a6be4c1abe The patch below fixes the following checkpatch error:
ERROR: return is not a function, parentheses are not required

This patch has been tested by verifying that the newly generated patch still
applies without warnings to the 2.6.25.17 kernel and that the patched kernel
still compiles.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@513 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-10-06 17:19:48 +00:00
Vladislav Bolkhovitin
aab4e1d1ff Polishing for in-tree
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@486 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-08-01 17:59:05 +00:00
Vu Pham
44f54e2625 srpt: converting makefile back to compile in scst tree
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@457 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-07-11 16:32:48 +00:00
Vladislav Bolkhovitin
cc28ddcdf2 Apparently the SCST code with debugging and/or tracing enabled compiles fine as
an external module. When applying the SCST kernel patch to the mainstream 
kernel tree with debugging and/or tracing enabled however, the resulting code
triggers a compiler error. This is because the symbols DEBUG and TRACING
conflict with symbols with the same named defined in unrelated kernel headers.
The patch below resolves these conflicts by renaming the following preprocessor 
symbols:
- DEBUG into CONFIG_SCST_DEBUG.
- DEBUG_DIGEST_FAILURES into CONFIG_SCST_ISCSI_DEBUG_DIGEST_FAILURES.
- DEBUG_OOM into CONFIG_SCST_DEBUG_OOM.
- DEBUG_RETRY into CONFIG_SCST_DEBUG_RETRY.
- DEBUG_SN into CONFIG_SCST_DEBUG_SN.
- DEBUG_TM into CONFIG_SCST_DEBUG_TM.
- EXTRACHECKS into CONFIG_SCST_EXTRACHECKS.
- SCST_HIGHMEM into CONFIG_SCST_HIGHMEM.
- STRICT_SERIALIZING into CONFIG_SCST_STRICT_SERIALIZING.
- TM_DBG_GO_OFFLINE into CONFIG_SCST_TM_DBG_GO_OFFLINE. Mapped 0/1 values
  into macro undefined / macro defined.
- TRACING into CONFIG_SCST_TRACING.
- USE_EXPECTED_VALUES into CONFIG_SCST_USE_EXPECTED_VALUES.
- In qla_isp/linux/isp_scst.c, renamed DEBUG into DEBUG_ISP_SCST.
- In qla_isp/..., renamed SCSI_TARGET in SCST_SCSI_TARGET.
- In qla_isp/..., renamed SCSI_TARGET_DEV in SCST_SCSI_TARGET_DEV.
Additionally, all CONFIG_SCSI_TARGET* macro's are renamed into CONFIG_SCST* in
order to avoid confusion between the STGT CONFIG-symbols and the SCST CONFIG-
symbols.

The following additional options are now configurable through Kconfig:
- CONFIG_SCST_ISCSI_DEBUG_DIGEST_FAILURES
- CONFIG_SCST_STRICT_SERIALIZING
- CONFIG_SCST_STRICT_SECURITY
- CONFIG_SCST_ALLOW_PASSTHROUGH_IO_SUBMIT_IN_SIRQ
- CONFIG_SCST_ABORT_CONSIDER_FINISHED_TASKS_AS_NOT_EXISTING
- CONFIG_SCST_USE_EXPECTED_VALUES
- CONFIG_SCST_DEBUG_OOM
- CONFIG_SCST_DEBUG_RETRY
- CONFIG_SCST_DEBUG_SN
- CONFIG_SCST_DEBUG_TM
- CONFIG_SCST_TM_DBG_GO_OFFLINE

The patch below has been verified as follows:
- Verified that the following command does not print any new warning messages:
  make -s clean && make -C srpt -s clean && make -s scst iscsi-scst && make -C srpt -s
- Verified as follows that the internal SCST patches still apply cleanly:
  for p in *patch; do patch -p0 --dry-run -f -s <$p; done
- Checked that the patch generated by generate-kernel-patch still applies
  cleanly to the 2.6.25.7 kernel, and that the patched kernel tree still
  compiles, installs and boots fine, that the iscsi-scst, ib_srpt,
  scst_disk and scst_vdisk modules still load, and that iSCSI communication
  still works fine. All SCST kernel configuration options that could be
  enabled have been enabled during this test.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@453 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-07-10 10:49:06 +00:00
Vu Pham
0019c43728 srpt:
- changing Makefile to compile srpt out-of scst tree and in release mode
 - fixing checkpath warnings for kernel inclusion


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@450 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-07-10 00:04:49 +00:00
Vladislav Bolkhovitin
0cfbfa801c Patch from Bart Van Assche <bart.vanassche@gmail.com>:
The patch below fixes the following checkpatch warning:
__func__ should be used instead of gcc specific __FUNCTION__

This patch has been tested as follows:
- Checked that make -C ib_srpt still works.
- Checked that the patch generated by generate-kernel-patch still applies
  cleanly to the 2.6.25.4 kernel, that the patched kernel still compiles,
  installs and boots and that the scst, iscsi-scst and ib_srpt modules still
  load (I performed rm -rf /lib/modules/2.6.25.4* before starting kernel
  compilation).

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@409 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-06-12 14:59:48 +00:00
Vladislav Bolkhovitin
ecb27e7444 Patch from Bart Van Assche <bart.vanassche@gmail.com>:
The patch below fixes the checkpatch complaints on kfree():
WARNING: kfree(NULL) is safe this check is probabally not required

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

Note: I'm not sure any of the above verifications did trigger the code paths
changed by this patch.

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


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@402 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-29 17:24:18 +00:00
Vladislav Bolkhovitin
73ea36593d Patch from Bart Van Assche <bart.vanassche@gmail.com>:
The patch below fixes the following categories of checkpatch complaints:
- ERROR: switch and case should be at the same indent
- ERROR: do not initialise statics to 0 or NULL
- ERROR: use tabs not spaces

I have verified that the SCST source code still compiles.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@398 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-27 14:26:15 +00:00
Vladislav Bolkhovitin
21cc5df121 Patch from Bart Van Assche <bart.vanassche@gmail.com>:
The patch below fixes the following class of checkpatch.pl errors:
  ERROR("(foo*)" should be "(foo *)".
Or: another whitespace-only change.

I have verified that the output of svn diff -w -x is empty for this patch.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@383 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-21 15:43:54 +00:00