Commit Graph

3569 Commits

Author SHA1 Message Date
Vladislav Bolkhovitin
369863f015 Allow install SCST in any location
Currently the install location of SCST is pretty much hard coded into 
the Makefiles to be /usr/local.

I am custom building a system for ZFS & SCST and I want to install in 
/usr instead of /usr/local.

Currently I am doing a “find . -name Makefile -exec sed -i 's:/usr/local:/usr:g'
{} \;” to accommodate this.

This patch fixes it.

From Sietse van Zanen <sietse@wizdom.nu>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4791 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-08 21:25:45 +00:00
Vladislav Bolkhovitin
9ea9eec4ef Cleanups and minor fixes
Suggested by Manfred_Knick <Manfred.Knick@T-Online.de>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4790 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-08 21:00:09 +00:00
Vladislav Bolkhovitin
eb4d0f3cb9 Fix compilation breakage on older kernels
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4789 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-07 20:12:25 +00:00
Vladislav Bolkhovitin
41ec60e529 Cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4788 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-05 21:36:25 +00:00
Vladislav Bolkhovitin
c7f6a46905 Better to have those conditional defines in the head of the file, because #include's depend on them
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4787 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-05 21:25:54 +00:00
Vladislav Bolkhovitin
60cd734aef More micro-optimizations
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4786 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-05 01:23:48 +00:00
Vladislav Bolkhovitin
b9c0b9d92d Another micro-optimization: cache align all fast path structures
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4785 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-04 23:51:16 +00:00
Bart Van Assche
74eba54940 ib_srpt: Micro-optimize SCSI command processing
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4784 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-04 13:40:56 +00:00
Bart Van Assche
20b20c2769 ib_srpt: Minor source code cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4783 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-04 13:40:15 +00:00
Bart Van Assche
80ad5be94d nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4782 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-02 10:50:01 +00:00
Vladislav Bolkhovitin
d5d2065eca Post r4779 safety measure to ensure that SCST core and target drivers see the same size of SCST structures.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4781 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-02 04:36:53 +00:00
Vladislav Bolkhovitin
7e844f7dc0 Fix copy-paste error reported by julian freed <j321112@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4780 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-02 04:22:00 +00:00
Vladislav Bolkhovitin
ae8e9ef049 Micro-optimization: allow target drivers to prealloc scst_cmd + update qla2x00t to use this facility
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4779 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-02 00:52:26 +00:00
Vladislav Bolkhovitin
a0ee2a2396 qla2x00t: Clean up DMA address computation code
The expression "sg_dma_address(prm->sg)" occurs several times in several
pieces of code that compute a DMA address. Make these pieces of code
somewhat easier to read by storing the DMA address in a temporary variable
called "dma_addr".

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4778 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-28 20:29:11 +00:00
Vladislav Bolkhovitin
f86ee4d788 Minimize logging
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4777 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-28 20:20:56 +00:00
Bart Van Assche
1864d41919 scst_sysfs: Change one space into a tab because checkpatch complained about it
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4775 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-28 07:16:51 +00:00
Vladislav Bolkhovitin
0cc1cd07b9 Microoptimizations
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4774 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-27 21:53:46 +00:00
Vladislav Bolkhovitin
f5ed343084 trace_level help updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4773 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-27 02:56:32 +00:00
Vladislav Bolkhovitin
2c13f6b7e0 Logging cleanup: hide most verbose logs by default
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4772 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-27 02:50:14 +00:00
Bart Van Assche
58a9802366 nightly build: Add kernel 3.8
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4771 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-24 07:21:22 +00:00
Bart Van Assche
bf4e52170f scripts/run-regression-tests: Summarize 3.8+ CamelCase warnings
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4770 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-23 13:56:11 +00:00
Bart Van Assche
52f0d63ee6 nightly build: Add kernel 3.8 support files
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4769 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-23 13:47:51 +00:00
Vladislav Bolkhovitin
79bf4e77c6 Update for 3.8 kernels
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4768 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-23 00:44:56 +00:00
Vladislav Bolkhovitin
10ca1d2f20 Copyrights updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4767 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-20 02:05:29 +00:00
Vladislav Bolkhovitin
7e691681eb More Emulex resurrect + some iSCSI fixes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4766 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-20 01:47:32 +00:00
Vladislav Bolkhovitin
d3813d3e1b Cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4765 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-20 01:20:56 +00:00
Vladislav Bolkhovitin
0252d5f9c9 Limit FirstBurstLength to improve TASK QUEUE FULL handling
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4764 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-19 01:17:33 +00:00
Vladislav Bolkhovitin
6eadaff9cb Cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4763 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-18 23:50:29 +00:00
Vladislav Bolkhovitin
5a6024c859 Follow-up for the previous commit
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4762 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-16 04:09:11 +00:00
Vladislav Bolkhovitin
8d32ad63a1 Performance micro-optimization: use sg_next_inline() instead of sg_next()
Now we have sg_next_inline(), so let's use it everywhere.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4761 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-16 04:03:58 +00:00
Vladislav Bolkhovitin
a98e10a13f Make qla2x00t support sg-chaining
Suggested by Nikolai Kopanygin <nikolai.kopanygin@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4760 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-16 03:55:11 +00:00
Vladislav Bolkhovitin
cd32115d6c Patch from Lukasz Jurewicz <lukasz.jurewicz@gmail.com> updating URL to QLogic firmware
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4759 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-16 03:23:32 +00:00
Vladislav Bolkhovitin
a327b6e700 scst: Avoid that INQUIRY of a non-existing LUN can trigger a NULL pointer dereference
This patch fixes the following kernel oops:

[7781]: scst: scst_translate_lun:3935:tgt_dev for LUN 1 not found, command to unexisting LU (initiator local3, target local3)?
BUG: unable to handle kernel NULL pointer dereference at 0000000000000500
IP: [<ffffffffa027662e>] scst_set_resp_data_len+0x17e/0x1c0 [scst]
PGD 2de7a067 PUD 2dd4d067 PMD 0
Oops: 0000 [#1] SMP
Modules linked in: scst_local(O) iscsi_scst(O) scst_vdisk(O) scst(O) brd netconsole configfs ib_iser rdma_cm ib_cm iw_cm ib_sa ib_mad ib_core ib_addr iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi joydev aesni_intel ablk_helper hid_generic cryptd lrw aes_x86_64 xts usbhid hid gf128mul intel_agp i2c_piix4 intel_gtt agpgart processor psmouse microcode button binfmt_misc lp parport ext4 mbcache jbd2 floppy ata_piix zlib_deflate libcrc32c [last unloaded: scst]
CPU 3
Pid: 7781, comm: kworker/u:5 Tainted: G           O 3.8.0-rc7-debug+ #1 Bochs Bochs
RIP: 0010:[<ffffffffa027662e>]  [<ffffffffa027662e>] scst_set_resp_data_len+0x17e/0x1c0 [scst]
Process kworker/u:5 (pid: 7781, threadinfo ffff88002dc18000, task ffff88003d306450)
Call Trace:
 [<ffffffffa027aa10>] scst_set_lun_not_supported_inquiry+0x140/0x400 [scst]
 [<ffffffffa027adbf>] scst_set_cmd_error+0xef/0x210 [scst]
 [<ffffffffa026aaa1>] __scst_init_cmd+0x1c1/0x250 [scst]
 [<ffffffffa026aefb>] scst_init_cmd+0x6b/0x320 [scst]
 [<ffffffffa026e914>] scst_cmd_init_done+0x124/0x5b0 [scst]
 [<ffffffffa0340a9e>] scst_local_queuecommand+0x1ae/0x3c0 [scst_local]
 [<ffffffff81323cd0>] scsi_dispatch_cmd+0x150/0x4b0
 [<ffffffff8132b091>] scsi_request_fn+0x361/0x530
 [<ffffffff812157b7>] __blk_run_queue+0x37/0x50
 [<ffffffff81221e01>] blk_execute_rq_nowait+0x81/0x100
 [<ffffffff81221fd2>] blk_execute_rq+0x152/0x200
 [<ffffffff8132a75e>] scsi_execute+0xee/0x180
 [<ffffffff8132b92d>] scsi_execute_req+0xbd/0x130
 [<ffffffff8132d647>] scsi_probe_and_add_lun+0x257/0xe10
 [<ffffffff8132ea73>] __scsi_scan_target+0x2a3/0x790
 [<ffffffff8132f0ee>] scsi_scan_target+0xfe/0x110
 [<ffffffffa033f81c>] scst_process_aens+0xcc/0x210 [scst_local]
 [<ffffffffa033fb39>] scst_aen_work_fn+0x79/0x140 [scst_local]
 [<ffffffff810630c8>] process_one_work+0x1a8/0x6e0
 [<ffffffff81063a3f>] worker_thread+0x15f/0x3e0
 [<ffffffff8106a17d>] kthread+0xed/0x100
 [<ffffffff815252ac>] ret_from_fork+0x7c/0xb0
---[ end trace b2eb71a8ecb7acf3 ]---

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4758 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-14 02:42:35 +00:00
Bart Van Assche
1ea650c508 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4757 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-12 14:07:57 +00:00
Vladislav Bolkhovitin
cb39459fa8 sgv_pool_create(): Return NULL if sgv_pool_init() fails
The current implementation of sgv_pool_create() returns a dangling
pointer if pool allocation succeeds but sgv_pool_init() fails. Modify
sgv_pool_create() such that a NULL pointer is returned if that happens.
This was detected by Coverity.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4756 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-06 21:41:41 +00:00
Vladislav Bolkhovitin
991158998d Make new MS test happy
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4755 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-05 21:50:08 +00:00
Vladislav Bolkhovitin
ebc43696ff Backport mainline commit a55aac79de0ea6fc52d35f535867b6573a5ff0f8:
[SCSI] qla2xxx: Propagate up abort failures



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4754 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-05 00:05:54 +00:00
Vladislav Bolkhovitin
b3908d7447 Wrong task attribute isn't error, so warning message should be issued instead
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4753 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-04 23:55:34 +00:00
Bart Van Assche
e24fb7a166 ib_srpt README: Document cmd_sg_entries
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4750 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-01-31 14:05:25 +00:00
Bart Van Assche
bdca4a2011 SVN_TAGS: Add 2.2.1 release revision number
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4749 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-01-31 14:04:42 +00:00
Bart Van Assche
59f466e5c6 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4748 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-01-30 17:01:02 +00:00
Vladislav Bolkhovitin
92a296b9e5 qla2x00t: Avoid that an SRR for a command without data triggers a kernel oops
Avoid that the following kernel oops is triggered as the result of
cable pulling:

------------[ cut here ]------------
kernel BUG at /usr/src/linux-3.0.51-0.7.9/include/asm-generic/dma-mapping-common.h:51!
invalid opcode: 0000 [#1] SMP
CPU 0

Pid: 5791, comm: kworker/0:1 Tainted: P           N
3.0.51-0.7.9-default #1 HP ProLiant DL380p Gen8
RIP: 0010:[<ffffffffa03312a7>]  [<ffffffffa03312a7>]
q2t_pci_map_calc_cnt+0x87/0x120 [qla2x00tgt]
RSP: 0018:ffff8807ad879cf0  EFLAGS: 00010202
RAX: ffff880fbfa00960 RBX: 0000000000000009 RCX: ffff880fbfa00960
RDX: 0000000000000000 RSI: 0000000000000009 RDI: ffff880fbfa00960
RBP: ffff8807ad879d40 R08: 0000000000000000 R09: dead000000200200
R10: dead000000100100 R11: ffffffff81020000 R12: ffffffff81a13880
R13: 0000000000000009 R14: ffff88100f172090 R15: ffff880fbfa00840
FS:  0000000000000000(0000) GS:ffff88083fa00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 00007f74cf266020 CR3: 0000000001a03000 CR4: 00000000000406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process kworker/0:1 (pid: 5791, threadinfo ffff8807ad878000, task
ffff88074ae801c0)
Stack:
 0000000300000000 ffff88100eb18670 00000000ffffffff ffff88100eb18670
 ffff8807ad879d40 ffff880744b331c8 ffff88080673ca00 ffffffffa03348bc
 0000000000000000 0000000000000000 ffff880744b331c8 ffff88080673ca00
Call Trace:
 [<ffffffffa03348bc>] __q2t_rdy_to_xfer+0x8c/0x1c0 [qla2x00tgt]
 [<ffffffffa033672d>] q2t_handle_srr_work+0x1ed/0x210 [qla2x00tgt]
 [<ffffffff810743cc>] process_one_work+0x16c/0x350
 [<ffffffff81076eba>] worker_thread+0x17a/0x410
 [<ffffffff8107b1e6>] kthread+0x96/0xa0
 [<ffffffff8144db44>] kernel_thread_helper+0x4/0x10
Code: 4d 85 e4 0f 84 a8 00 00 00 45 85 ed 7e 16 4c 89 ff 31 db 90 83
c3 01 e8 58 2b f2 e0 41 39 dd 48 89 c7 7f f0 83 7c 24 04 02 76 04 <0f>
0b eb fe 45 31 c0 8b 4c 24 04 44 89 ea 4c 89 fe 4c 89 f7 41
RIP  [<ffffffffa03312a7>] q2t_pci_map_calc_cnt+0x87/0x120 [qla2x00tgt]
 RSP <ffff8807ad879cf0>
---[ end trace e93624bd6aa42d19 ]---

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4747 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-01-25 01:20:37 +00:00
Vladislav Bolkhovitin
f0e65cb9d1 Eliminate another compiler warning in some build modes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4746 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-01-25 00:28:50 +00:00
Vladislav Bolkhovitin
c87f16b41e Eliminate compiler warning in some build modes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4745 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-01-25 00:02:28 +00:00
Vladislav Bolkhovitin
04b790e43a Orig offset should also be saved during SG entries manipulations
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4744 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-01-19 01:59:01 +00:00
Vladislav Bolkhovitin
5dcbbc5aaa Cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4743 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-01-17 21:13:12 +00:00
Vladislav Bolkhovitin
61f58f5792 Minor logging fixes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4742 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-01-16 02:04:05 +00:00
Vladislav Bolkhovitin
f5beb91d8b Version updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4741 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-01-16 00:55:38 +00:00
Vladislav Bolkhovitin
bd7c893f04 Multiple makefiles: autodetect SCST include directory
It is cumbersome to change SCST_INC_DIR and SCST_DIR in each Makefile
before and after a release. Hence modify the Makefiles such that these
paths are detected automatically.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4740 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-01-16 00:12:38 +00:00
Vladislav Bolkhovitin
c6d247254c scst_local: Remove a superfluous include path
Target drivers must not include header files from the SCST source
code directory. Hence remove -I$(SCST_DIR) from the compiler flags.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4739 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-01-16 00:08:44 +00:00