Since there is a complete_all() / wait_for_completion() pair between both
accesses the volatile keyword is not necessary here (merge r3945 from trunk).
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.0.x@4011 d57e44dd-8a1f-0410-8b47-8ef2f437770f
SCST_VERSION_STRING will be incorrect because it gets defined before
CONFIG_SCST_PROC is defined. (merge r3489 and r3490 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.0.x@3993 d57e44dd-8a1f-0410-8b47-8ef2f437770f
https://vlnb@scst.svn.sourceforge.net/svnroot/scst/trunk
........
r3950 | vlnb | 2011-12-01 21:46:33 -0500 (Thu, 01 Dec 2011) | 9 lines
According to SPC-4 in the PERSISTENT RESERVE IN full status descriptor
the format of byte 13 is defined as follows:
- The most significant four bits are SCOPE field.
- The least significant four bits are the TYPE field.
Make sure that that byte is filled in according to the specification.
BSD-Signed-off-by: Bart Van Assche <bvanassche@acm.org>
........
r3958 | vlnb | 2011-12-06 21:56:31 -0500 (Tue, 06 Dec 2011) | 21 lines
We try to build FC SAN on Sun T2 server, FC HBA cards used are
QLE2560 and QLE2562, the OS is RHEL6.0 with kernel linux-2.6.32,
scst code version from svn is 3952.
As T2 (SPARC64) is big-endian, which may not be tested sufficently,
we had to fix some endian swap to make qla2x00t work good on it.
The first fix is in q24_build_ctio_pkt(), loop_id from prm->cmd, which
was generated by CPU, should be converted to little-endian when wrapped
in pkt, which will be used by HBA ASIC.
The second fix in qla2x_tgt_def.h, reorder the bit-order of structs'
member, is an attempt in despair, cannot explain why, but it just works!
Besides the programming skills, we cannot get QLogic FC HBA databook,
and have little acknowledge about the driver, the fixes may need to
be refined, so don't hold the comments :)
Signed-off-by: Linwen Deng <linwendeng@gmail.com>
........
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.1.0.x@3974 d57e44dd-8a1f-0410-8b47-8ef2f437770f
https://vlnb@scst.svn.sourceforge.net/svnroot/scst/trunk
........
r3909 | vlnb | 2011-11-04 17:34:10 -0400 (Fri, 04 Nov 2011) | 3 lines
Fix build without CONFIG_SCSI_QLA2XXX_TARGET
........
r3917 | vlnb | 2011-11-08 21:47:23 -0500 (Tue, 08 Nov 2011) | 4 lines
task_mgmt_fn() callback now called under lock and IRQs disabled, so we
need to reschedule to thread during commands unjamming
........
r3923 | vlnb | 2011-11-15 20:53:27 -0500 (Tue, 15 Nov 2011) | 3 lines
Fix incorrect attach_tgt() errors processing in the sysfs build reported by David Pineau <dav.pineau@gmail.com>
........
r3935 | vlnb | 2011-11-22 21:14:38 -0500 (Tue, 22 Nov 2011) | 3 lines
Report target name when session assigned to security group
........
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.1.0.x@3971 d57e44dd-8a1f-0410-8b47-8ef2f437770f
........
r3930 | bvassche | 2011-11-17 05:36:03 -0500 (Thu, 17 Nov 2011) | 1 line
regtests: Fix a copy/paste bug in the #if ... partial evaluation code
........
r3931 | bvassche | 2011-11-17 12:52:29 -0500 (Thu, 17 Nov 2011) | 1 line
scst initialization: Remove kernel module parameters from /etc/default/scst
........
r3932 | bvassche | 2011-11-17 12:54:41 -0500 (Thu, 17 Nov 2011) | 1 line
regtests: Do not complain if a patch has not been found
........
r3933 | bvassche | 2011-11-17 12:55:22 -0500 (Thu, 17 Nov 2011) | 1 line
regtests: Use correct kernel.org longterm directory
........
r3934 | mgandalf | 2011-11-18 15:32:01 -0500 (Fri, 18 Nov 2011) | 1 line
- Fix -issue_lip as reported by Iain Paton.
........
r3936 | vlnb | 2011-11-22 21:32:25 -0500 (Tue, 22 Nov 2011) | 22 lines
From Bart Van Assche <bvanassche@acm.org>:
As Mikko Kortelainen <kordex@gmail.com> explained on the SCST IRC
channel, it's not necessary to replace the qla2xxx directory in the
kernel source tree in order to build the SCST qla2x00t target driver.
Also, if neither SCSI pass-through nor iSCSI will be used rebuilding
the kernel tree can be skipped entirely. The patch below updates the
qla2x00t howto accordingly, and also implements the following changes:
- Fix everything the W3C HTML validator complains about:
- Add DOCTYPE declaration.
- Add charset declaration.
- Change </br> into <br> since </br> is invalid.
- Change one occurrence of & into &.
- Use proper HTML constructs for numbered and unnumbered enumerations.
- Use a fixed-sized font and the brown color for all computer output
text (via inline CSS).
- Use hyperlinks to refer to other steps.
- Fix spelling errors.
- Merge the Debian and non-Debian howto's because the differences are
so small that it's not justified to maintain two different documents.
........
r3941 | vlnb | 2011-11-30 22:28:39 -0500 (Wed, 30 Nov 2011) | 6 lines
Use get/put_unaligned_be<n>(...) instead of
get/put_unaligned(cpu_to_be<n>(...)).
BSD-Signed-off-by: Bart Van Assche <bvanassche@acm.org>
........
r3942 | vlnb | 2011-11-30 22:31:30 -0500 (Wed, 30 Nov 2011) | 7 lines
In the function scst_mgmt_translate_lun() the variable tgt_dev is
used as a loop variable and is used inside that loop only.
Hence it is not necessary to initialize it to NULL.
BSD-Signed-off-by: Bart Van Assche <bvanassche@acm.org>
........
r3943 | vlnb | 2011-11-30 22:36:15 -0500 (Wed, 30 Nov 2011) | 17 lines
Use get/put_unaligned() instead of open coding these such that the
compiler can generate better code.
As an example, the get_unaligned_be24() function used in the
implementation of READ_6, WRITE_6 and VERIFY_6 together with
"& 0x1f0000" is inlined by the compiler and is translated as
follows on an x86_64 system (2031616 equals 0x1f0000):
movl 0(%r13), %r11d
bswapl %r11d
andl $2031616, %r11d
Also eliminate a conditional branch instruction from get_trans_len_1_256().
BSD-Signed-off-by: Bart Van Assche <bvanassche@acm.org>
........
r3944 | vlnb | 2011-12-01 21:14:59 -0500 (Thu, 01 Dec 2011) | 8 lines
Avoid that the checkpatch.pl script as included in Linux kernel 3.1
complains about min((int)(a), (int)(b)) that should be changed into
min_t(int, (a), (b)).
BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org>
........
r3945 | vlnb | 2011-12-01 21:24:41 -0500 (Thu, 01 Dec 2011) | 7 lines
disk_work.result is set by disk_cmd_done() and read by disk_exec().
Since there is a complete_all() / wait_for_completion() pair between both
accesses the volatile keyword is not necessary here.
BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org>
........
r3946 | vlnb | 2011-12-01 21:26:29 -0500 (Thu, 01 Dec 2011) | 5 lines
Remove a superfluous pair of braces since checkpatch complains about these.
BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org>
........
r3947 | vlnb | 2011-12-01 21:39:43 -0500 (Thu, 01 Dec 2011) | 6 lines
Use get_unaligned_be16() for reading the two bytes specifying the buffer length
to allow the compiler to generate better code for reading these two bytes.
BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org>
........
r3948 | vlnb | 2011-12-01 21:41:15 -0500 (Thu, 01 Dec 2011) | 5 lines
Micro-optimize the code for CDB parsing in several device handlers.
BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org>
........
r3949 | vlnb | 2011-12-01 21:42:21 -0500 (Thu, 01 Dec 2011) | 6 lines
The only two values passed into the last two arguments of blockio_exec_rw()
are 0 and 1. Change their argument type from int to bool.
BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org>
........
r3951 | mgandalf | 2011-12-05 14:39:59 -0500 (Mon, 05 Dec 2011) | 1 line
- Warn only in issueLip() when -issue_lip is an argument.
........
r3952 | vlnb | 2011-12-05 22:02:13 -0500 (Mon, 05 Dec 2011) | 7 lines
Change __attribute__((packed)) into __packed and
__attribute__((aligned(x))) into __aligned(x) in kernel code since
checkpatch complains about the former.
BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org>
........
r3953 | bvassche | 2011-12-06 14:08:14 -0500 (Tue, 06 Dec 2011) | 2 lines
ib_srpt: Avoid that session registration failure causes trouble / send a reject if the transition to RTR fails.
........
r3954 | bvassche | 2011-12-06 14:11:50 -0500 (Tue, 06 Dec 2011) | 1 line
Kernel version updates
........
r3955 | bvassche | 2011-12-06 14:30:21 -0500 (Tue, 06 Dec 2011) | 1 line
ib_srpt: Send a reject message with non-zero reason code if session creation fails
........
r3956 | mgandalf | 2011-12-06 14:41:33 -0500 (Tue, 06 Dec 2011) | 1 line
- Small directory check in _issueLip(). Not sure why this is needed.
........
r3957 | vlnb | 2011-12-06 21:29:14 -0500 (Tue, 06 Dec 2011) | 11 lines
Eliminate the blockio / fileio / nullio if-statements in
vdisk_do_job() and the READ/WRITE functions called from that
function. Convert the opcode switch in vdisk_*do_job() to an
array with function pointers.
The function vdisk_exec_verify() only works for file I/O, so
rename it into fileio_exec_verify().
BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org>
........
r3959 | vlnb | 2011-12-06 22:07:45 -0500 (Tue, 06 Dec 2011) | 3 lines
Web updates
........
r3960 | bvassche | 2011-12-07 12:31:08 -0500 (Wed, 07 Dec 2011) | 1 line
qla2x_tgt: Remove trailing whitespace
........
r3961 | vlnb | 2011-12-07 18:58:59 -0500 (Wed, 07 Dec 2011) | 5 lines
Makes scst_vdisk build again on RHEL 5.x.
BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org>
........
r3962 | vlnb | 2011-12-07 19:00:06 -0500 (Wed, 07 Dec 2011) | 5 lines
Avoid converting back and forth between int and enum
BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org>
........
r3963 | vlnb | 2011-12-07 19:06:24 -0500 (Wed, 07 Dec 2011) | 6 lines
Micro-optimize the page count computations in scst_mem.c by
rewriting these computations such that branch instructions are avoided.
BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org>
........
r3964 | vlnb | 2011-12-08 18:49:52 -0500 (Thu, 08 Dec 2011) | 3 lines
Minor logging improvement
........
r3965 | vlnb | 2011-12-09 22:50:24 -0500 (Fri, 09 Dec 2011) | 5 lines
Replace list_entry((a)->next, b, c) by list_first_entry(a, b, c).
BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org>
........
r3966 | vlnb | 2011-12-09 22:54:47 -0500 (Fri, 09 Dec 2011) | 3 lines
QLA HOWTO update from Bart Van Assche <bvanassche@acm.org>
........
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.1.0.x@3967 d57e44dd-8a1f-0410-8b47-8ef2f437770f