Commit Graph
96 Commits
Author SHA1 Message Date
Bart Van Assche 6ace2a37bc Avoid that sparse complains on the scst_local source code.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2288 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-27 15:27:33 +00:00
Vladislav Bolkhovitin 27ba7c24d8 Docs updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2232 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-24 12:22:02 +00:00
Vladislav Bolkhovitin 2d9473d073 Scstadmin now can create sessions, so update README
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2224 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-23 18:57:13 +00:00
Richard Sharpe 56e6f52c54 remove an unneeded include file
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2182 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-23 04:47:43 +00:00
Richard Sharpe 2fc8c5ea79 Fix the AEN code, particularly the work function stuff to work with older
versions of the kernel. Also, use correct specifiers in some places, ie %zd 
where a negative number could be printed.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2149 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-20 14:30:00 +00:00
Richard Sharpe 25520184a4 A small coding style fix, plus a specifier fix in an ifdef block. The coding
style fix conforms to the kernel coding standard and uses if (!xxx) rather
than if (NULL == xxx).


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2138 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-17 04:00:15 +00:00
Richard Sharpe 3d41efd784 Add an #ifndef CONFIG_SCST_PROC around the checking for add_default_tgt so that
we use the old PROC behavior.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2122 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-14 02:43:33 +00:00
Vladislav Bolkhovitin 11fade176a Scan host only if it has LUNs
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2117 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-13 21:15:02 +00:00
Vladislav Bolkhovitin f6a2a6b4db CDB splitting added
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2115 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-13 21:02:35 +00:00
Vladislav Bolkhovitin 98b09a7a26 SG chaining implemented
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2113 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-13 20:47:44 +00:00
Richard Sharpe d4d9b4c5ed I think this fixes the problem Vlad had after he reworked scst_local.c but he
seems to have removed the setting of hpnt->max_id, so it seems the default is
7. Set it to 0 because we only want one ID on the device, and we don't do
any checking ...



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2110 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-12 20:28:47 +00:00
Richard Sharpe 118900953e Fix the module parm description so that the name matches the correct name.
Also, this approach changes the default behavior for people who are using
CONFIG_SCST_PROC because the default was that a single host/tgt was added,
but now they have to change their /etc/modules.d/scst.conf or whatever to 
add add_default_tgt=1.

I am not sure that is a good thing.

With the last few commits and this one, I have tested on 2.6.34.1 and 2.6.28
and things seem to work. I am now looking at the problem Vlad reported with
CONFIG_SCST_PROC where local devices show up under SCSI bus or device from 0
to 7.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2108 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-12 18:11:42 +00:00
Richard Sharpe bad63dc691 Fix a bug where is we load without specifying add_default_tgt=1 we cause an
oops when we try to unload scst_local. This is because we were unregistering 
the driver if we did not add a default target, but we try to do that again
when we try to unload the driver.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2101 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-12 05:48:27 +00:00
Richard Sharpe 2be149adb3 Add more damn ifdefs to allow us to use root_device_register to create the
root device rather than using a statically allocated structure in the driver.

Tested with 2.6.24 ... now testing with an earlier version.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2100 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-11 23:22:00 +00:00
Bart Van Assche 45f9175449 Fix for r2082: declaring bool kernel module parameters as bool is allowed since
kernel 2.6.31, not since kernel 2.6.28. See also commit fddd520122953550ec2c8b60e7ca0d0f0d115d97.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2094 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-11 11:30:29 +00:00
Bart Van Assche 2db5211667 scst_local compiles again without triggering a compiler warning on kernels
2.6.27 and before.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2082 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-10 06:54:23 +00:00
Bart Van Assche b94b10332d scst_local, in-tree: excluded scst_local from kernel build when HIGHMEM4G or
HIGHMEM64G is enabled.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2081 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-10 06:46:14 +00:00
Bart Van Assche 749929467a Fixed a recently introduced checkpatch complaint.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2079 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-10 06:21:42 +00:00
Bart Van Assche 5b33692678 More upstream include path conversions.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2076 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-09 15:27:54 +00:00
Vladislav Bolkhovitin e72226e60b Minor cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2075 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-09 15:04:24 +00:00
Vladislav Bolkhovitin 9c935fdd21 More work on scst_local:
- Add sessions (SCSI hosts) creation/delete commands as well as fixes and cleanups
 - Docs updated



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2073 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-09 14:52:42 +00:00
Bart Van Assche 077bd7a761 Fixed a recently introduced checkpatch complaint about whitespace.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2068 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-09 09:10:14 +00:00
Vladislav Bolkhovitin 130f5f6b05 Let's make scst_local mainline ready
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2067 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-08 20:59:13 +00:00
Bart Van Assche 65c4745892 Builds again in release mode.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2064 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-07 07:08:16 +00:00
Vladislav Bolkhovitin c66ae1850e - get_transport_version() function changed to get target on entry
- transport versions propageted to user space handlers



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2061 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-06 21:45:48 +00:00
Vladislav Bolkhovitin 961d59ff40 - Version descriptors added
- Multi-transport support added to scst_local
 - Sysfs attributes "version" and "trace_level" added to scst_local



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2060 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-06 21:21:49 +00:00
Vladislav Bolkhovitin 8536db4580 Docs update
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2059 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-06 14:07:09 +00:00
Richard Sharpe 3532bd33df Add support for make debug2release, release2debug debug2perf and perf2debug.
This now only needs to be switched on in the master makefile.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2055 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-04 19:14:29 +00:00
Vladislav Bolkhovitin 19a25e5825 Minor cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2053 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-04 17:26:17 +00:00
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