Commit Graph

67 Commits

Author SHA1 Message Date
Bart Van Assche
272adb5363 Fixes for recently introduced minor checkpatch and sparse complaints.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2042 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-03 16:53:31 +00:00
Vladislav Bolkhovitin
e1ec75f089 Add enabled_attr_not_needed removed by the previous patch
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2038 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-03 14:50:58 +00:00
Richard Sharpe
0c825d11b1 Avoid creating the second kmem_cache and allocating from it if we do not
actually need it. This should improve performance on those versions of Linux
that do not need this.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2036 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-03 04:10:41 +00:00
Vladislav Bolkhovitin
95f713444e Some scst_local cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2024 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-30 20:58:20 +00:00
Vladislav Bolkhovitin
e38cc66c2b Change SCSI_MAX_SG_SEGMENTS to more correct SG_MAX_SINGLE_ALLOC
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1956 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-18 12:59:28 +00:00
Richard Sharpe
8ad464eae7 One the advice of Vlad, reworked the change a little ... use spinlocks now and
don't hold the lock across the rescan.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1950 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-14 06:03:46 +00:00
Richard Sharpe
c06fb90d75 Process AEN requests. We queue them to a work function. This works, however,
there seems to be a problem with the Linux SCSI stack because when we delete a
LUN on the target, it does not get deleted from Linux. Still investigating.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1947 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-13 04:28:25 +00:00
Bart Van Assche
2afc2cc6cf Removed trailing whitespace.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1945 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-09 17:55:10 +00:00
Richard Sharpe
f9eda93575 More correctly handle residuals according to the guidelines.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1944 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-09 14:48:20 +00:00
Bart Van Assche
94cf387057 Removed trailing whitespace.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1938 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-06 07:05:36 +00:00
Richard Sharpe
825be22f79 Improve a debugging statement so that it shows the SAS address allocated.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1936 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-05 13:57:32 +00:00
Richard Sharpe
b0a7281646 Remove a bunch of unneeded printk lines. Also, this line:
TRACE_DBG("Created tid '%08lX'", (unsigned long)&tr_id[4]);

is wrong. All it will do is print the address of the fifth byte in the tr_id.

It should cast to an unsigned long * and deref it, at least. However, I have
anothe change that prints out the tr_id as a SAS address.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1934 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-04 14:22:54 +00:00
Vladislav Bolkhovitin
c70529a807 Fix minor compiler warning
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1932 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-04 13:30:45 +00:00
Bart Van Assche
3d65fe38ee Fixed checkpatch complaints about trailing whitespace.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1930 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-04 09:54:24 +00:00
Richard Sharpe
359cdf786a Include support for PR in scst_local.c. We return a SAS-style Protocol ID. I
use an OUI that I think is not currently in use, so it seems unlikely that we
will clash with anyone else, but you never know. I might have to change it
later. 


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1928 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-04 04:03:44 +00:00
Bart Van Assche
7b839ceaf7 Added to repository.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1916 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-03 15:33:45 +00:00
Vladislav Bolkhovitin
05d080488e Small improvements
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1907 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-02 17:58:03 +00:00
Richard Sharpe
5737910fb4 Put in a clearer work-around for the problem with the size of the max_cmd_size
field. The size changed at 2.6.26 from unsigned char to unsigned short.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1859 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-22 09:40:14 +00:00
Richard Sharpe
8668b22ae8 Set max_cmd_len correctly depending on the size of the field. In earlier
versions of Linux it was an unsigned char, and a value of 260 means 4 after a compiler warning. Added a comment to describe what is going on as well. Since 
this is done very infequently it should not cause performance problems and 
means that it will not silently fail to work if people try to use it on kernels
earlier than 2.6.26. If I figure out what kernel version the change was made
in we could use an ifdef.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1852 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-21 16:08:34 +00:00
Vladislav Bolkhovitin
78edc5afb9 Various cleanups and fixes after some errors injection tests. Particularly:
- ISCSI preliminary completed commands handling fixes
 - Write residuals cleanups and fixes
 - Interface to handle residuals and received from initiators data changed
 - BIDI cleanups and fixes.
 - All BIDI IN fields and functions renamed to OUT to be in line with the in-kernel convention

+ 

Docs updated



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1780 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-06-23 13:57:35 +00:00
Bart Van Assche
e4a0b97871 Fixed recently introduced whitespace-complaints reported by checkpatch.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1718 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-05-26 18:47:11 +00:00
Bart Van Assche
d3ed16cc1e Added to repository.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1716 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-05-26 18:20:26 +00:00
Vladislav Bolkhovitin
b53e4cb4c1 Merge of the pr branch with additional fixes for problems found during extra testing
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1714 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-05-26 17:46:46 +00:00
Vladislav Bolkhovitin
4d5aaf047b Copyrights updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1585 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-04-06 08:57:48 +00:00
Vladislav Bolkhovitin
cbaab260f1 Add new scst_cmd_get_queue_type()/scst_cmd_set_queue_type() accessors and use them in target drivers instead of direct access to SCST's cmd->queue_type.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1553 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-03-17 19:11:18 +00:00
Bart Van Assche
5dc06c26de scripts/run-regression-tests works now for the 2.6.33 kernel too.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1525 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-03-01 17:32:38 +00:00
Vladislav Bolkhovitin
4a2fcb870b - Logging cleanups. Particularly, TRACE_MGMT_MINOR level was removed
- Docs updates
 - Other minor fixes and cleanups



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1452 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-01-12 13:29:01 +00:00
Vladislav Bolkhovitin
23accb2e12 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
command:
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: http://svn.code.sf.net/p/scst/svn/trunk@1447 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-01-11 19:16:38 +00:00
Vladislav Bolkhovitin
3c93276d8f Cosmetics.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1301 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-10-29 19:27:14 +00:00
Vladislav Bolkhovitin
29feda5143 Let's don't check if data should be copied between dev handler's and target driver's buffers on the fast path and make it a duty of a target driver who might need it.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1244 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-10-22 15:40:42 +00:00
Vladislav Bolkhovitin
173e97d2bd Set max_cmd_len correcty.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1242 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-10-22 15:17:38 +00:00
Bart Van Assche
9e18cc659e Whitespace-only changes. Fixed the following categories of checkpatch
complaints:
- code indent should use tabs where possible.
- trailing whitespace.
- else should follow close brace '}'.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1074 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-09-03 18:31:22 +00:00
Vladislav Bolkhovitin
7bdc38faf2 The most recent version of the sparse static source code checking tool does
now report functions that are called with a lock held but that are missing
__acquires() and __releases() annotations. The patch below adds such
annotations and makes the following sparse warnings disappear:

drivers/scst/iscsi-scst/iscsi.c:2861:9: warning: context imbalance in 'iscsi_check_send_delayed_tm_resp' - unexpected unlock
drivers/scst/iscsi-scst/nthread.c:1614:17: warning: context imbalance in 'scst_do_job_wr' - unexpected unlock
drivers/scst/iscsi-scst/iscsi.c:2861:9: warning: context imbalance in 'iscsi_check_send_delayed_tm_resp' - unexpected unlock
drivers/scst/iscsi-scst/nthread.c:1614:17: warning: context imbalance in 'scst_do_job_wr' - unexpected unlock
drivers/scst/scst_local/scst_local.c:554:30: warning: context imbalance in 'scst_local_queuecommand' - unexpected unlock

The patch below has been tested by comparing the output of
"scripts/run-regression-tests 2.6.30.3" before and after the patch was applied.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@982 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-27 17:52:19 +00:00
Vladislav Bolkhovitin
37ba91d275 Update for 2.6.30
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@938 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-08 17:27:30 +00:00
Bart Van Assche
41958a0723 Removed trailing whitespace.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@929 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-07-01 10:47:33 +00:00
Richard Sharpe
dc78e8a39c Add some conditional code to handle kernel versions less that 2.6.25 that
can send a request as a non scatterlist. If we get one, we create a single
element scatterlist and hand that on to SCST. 

This costs some extra space in the structure I use to keep track of requests
and the done function, but only on those versions for which it is possible.
For real kernels it is scatterlists all the way down young man.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@922 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-06-26 00:54:57 +00:00
Richard Sharpe
6f5bc12172 Remove an ugly hack that was left in just in case. It has been confirmed to
be not needed.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@921 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-06-24 23:10:53 +00:00
Richard Sharpe
8187f28719 Make scst_local compile cleanly on a range of versions of Linux. I have tested
2.6.24, 2.6.25.4, 2.6.27.x and 2.6.29. I have also tested under 2.6.18 on a
CentOS 5.3 system. 

There might still be problems with some 2.6.18 systems, and I will commit more
changes as the need arises.

I have only tested that scst_local builds and loads with these changes. I have
not tested any devices as yet.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@899 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-06-14 21:00:52 +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
Vladislav Bolkhovitin
e62b39196b Bidirectional data transfers added
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@744 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-04-03 17:49:26 +00:00
Vladislav Bolkhovitin
4bc15527d2 Version number increased
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@729 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-04-01 11:09:44 +00:00
Vladislav Bolkhovitin
00b094c7fa Patch from Ruben Laban <r.laban@ism.nl>:
While writing DKMS support for the SCST and iSCST-SCST kernel modules, I ran 
into a (common) problem with regard to out-of-tree build detection. A common 
method to detect out-of-tree building is by using the KERNELRELEASE variable. 
The usage of this variable poses a problem when using DKMS. DKMS itself uses 
the KERNELRELEASE variable to specify the kernel for which the driver to 
build. A suggested alternative would to use the PATCHLEVEL variable as part 
of the detection mechanism instead. I attached a patch reflecting this 
suggested change.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@720 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-25 19:42:03 +00:00
Vladislav Bolkhovitin
2f9f473cde - Fixes broken build if io_context patch not applied
- #warning's cleanup



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@715 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-24 10:43:55 +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
45fd88076c - Fix typo in scst_rx_mgmt_fn_tag() call for task abort
- Cosmetics



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@664 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-05 18:23:28 +00:00
Vladislav Bolkhovitin
a34ec0f7ff A bunch of pending fixes/cleanups:
- Docs about limitation of having initiator and target on the same host updated + cleanups
 - Minor local thread storage improvements
 - TRACE_MGMT_MINOR excluded from the default set of trace flags to not confuse people
 - Dedicated kmem_cache for blockio created



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@662 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-04 18:45:32 +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
ae7345340c A bunch of minor fixes/improvements, cleanups and updates:
- In scst_local new experimental compile-time option to force direct processing added
 - Attempt in SCST structures to separate read-mostly from read-write data to decrease cache ping-pong between CPUs
 - In scst_vdisk new module parameter num_threads added to specify a number of threads for each vdisk/vcdrom. Default is 5.
 - Debug logging for failed digests in iSCSI-SCST improved
 - Docs updates/cleanups



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@635 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-16 20:56:06 +00:00
Bart Van Assche
e5caaf4548 Removed trailing whitespace. While the checkpatch script included with the 2.6.27 kernel did not complain on trailing whitespace in documentation and kbuild files, the checkpatch script included with the 2.6.28 kernel does.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@631 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-10 17:21:57 +00:00
Vladislav Bolkhovitin
e7429fd16e Minor fixes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@628 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-04 16:12:56 +00:00