Commit Graph

606 Commits

Author SHA1 Message Date
Bart Van Assche
7faa68e8ce ib_srpt/README: Simplify the instructions for logging in to an SRP target
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5073 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-18 08:36:47 +00:00
Bart Van Assche
cdf784a6ad ib_srpt: Simplify the code for waking up the srpt thread after login
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5054 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 12:53:59 +00:00
Bart Van Assche
dad77aead4 nightly build: Add kernel 3.11 build infrastructure
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5006 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-28 16:04:47 +00:00
Bart Van Assche
858d02e558 [PATCH] ib_srpt: Always set RSPVALID flag in task management replies
The SRP spec requires not only to set the RSPVALID flag and the RSP_CODE
field if a task management function failed but also if it succeeded. This
patch avoids that the SRP initiator interprets task managment functions
that succeeded as failed.

Reported-by: Jack Wang <jinpu.wang@profitbricks.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5002 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-27 13:40:58 +00:00
Bart Van Assche
47c84d3ec8 ib_srpt: Build fix for r4984
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4992 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-09 05:46:22 +00:00
Bart Van Assche
08bfd4c19a ib_srpt: Rework r4984 (skip Ethernet ports)
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4991 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-08 10:20:54 +00:00
Bart Van Assche
523e2b3e59 ib_srpt: Skip Ethernet ports
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4984 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-02 07:31:12 +00:00
Bart Van Assche
85e9255f37 ib_srpt: Add P_Key support
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4980 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-08-27 06:39:45 +00:00
Bart Van Assche
9642081700 ib_srpt: Clean up srpt_handle_send_comp()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4979 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-08-27 06:36:52 +00:00
Bart Van Assche
70017e3883 ib_srpt: Remove two statements that became superfluous from srpt_abort_cmd()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4978 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-08-27 06:35:39 +00:00
Bart Van Assche
8b0230b152 ib_srpt: Introduce srpt_init_tgt()
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4925 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-07-29 07:08:14 +00:00
Bart Van Assche
89e96c6495 nightly build: Add kernel 3.10 support infrastructure
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4919 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-07-22 18:35:37 +00:00
Bart Van Assche
339aa1b90d ib_srpt/README: Update initiator-side performance notes section
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4915 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-07-11 11:41:06 +00:00
Vladislav Bolkhovitin
6e31fd8306 Relax and cleanup HARDWARE ERROR sense usage
HARDWARE ERROR sense is very strong considered be "internal failure", so
might lead to serios initiator side issues up to disconnect from device. In
many cases WRITE or READ ERROR sense can be used instead. All remaining
usages must be logged.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4911 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-07-04 02:46:49 +00:00
Bart Van Assche
11fdb1bf29 nightly build: Add kernel 3.9 build infrastructure
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4855 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-18 16:04:24 +00:00
Vladislav Bolkhovitin
2093dd7561 Make it possible to forcibly close SRP and FC sessions via sysfs
That patch contains the following changes:
* Move the code for creating a "close_sess" sysfs attribute from iscsi-scst to
  the SCST core such that it becomes available for other target drivers. This
  does not change the functionality of iscsi-scst.
* Add code in ib_srpt and qla2x00t to allow a session to be forcibly closed from
  user space.

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




git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4852 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-18 00:52:46 +00:00
Bart Van Assche
63bbba8b50 ib_srpt: Source code cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4846 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-04-28 19:48:50 +00:00
Bart Van Assche
c927e1dd73 ib_srpt: Fix another bug that was introduced in r4784
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4845 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-04-28 19:48:06 +00:00
Bart Van Assche
1a4aa10db8 ib_srpt: Fix a bug that was introduced in r4784
Reported by: Matteo Tescione <matteo@rmnet.it>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4844 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-04-27 19:05:22 +00:00
Bart Van Assche
210b5d466e ib_srpt: Restore the "connecting" channel state
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4827 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-28 15:17:13 +00:00
Bart Van Assche
0763baaad6 ib_srpt: Process cmd_wait_list immediately after QP RTS transition
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4826 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-27 15:32:31 +00:00
Bart Van Assche
546073cfb4 ib_srpt: Process cmd_wait_list after QP RTS transition
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4825 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-27 15:31:42 +00:00
Bart Van Assche
a6a71c8248 ib_srpt: Candidate fix for QLogic HCAs
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4824 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-27 15:29:47 +00:00
Vladislav Bolkhovitin
ef5fe3dcd0 Correct sg_next_inline() misuse.
Previously sg_next_inline() didn't check if this sg is last.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4822 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-27 01:12:02 +00:00
Bart Van Assche
9fe9158574 ib_srpt: Include state in unexpected command state messages
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4815 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-26 06:59:08 +00:00
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
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
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
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
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
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
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
Bart Van Assche
9dcf4d3036 ib_srpt: Move functionality for creating a release archive into scripts/generate-release-archive
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4676 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-01-03 17:46:01 +00:00
Bart Van Assche
3c7920b48e ib_srpt: Defer reenabling interrupts until after completion processing finished
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4675 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-01-03 09:19:09 +00:00
Bart Van Assche
4963e2a4c9 ib_srpt: Avoid that max_compl_time_ms is zero due to an integer overflow
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4662 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-12-21 12:04:19 +00:00
Bart Van Assche
0121fc8a55 ib_srpt: Update Testing.txt
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4661 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-12-21 12:02:53 +00:00
Bart Van Assche
0fd03d44b1 srpt/Testing.txt: Limit to 80 columns
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4652 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-12-18 09:51:08 +00:00
Bart Van Assche
12313bf114 nightly build: Add kernel 3.7 patches
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4647 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-12-18 08:54:50 +00:00
Bart Van Assche
dc816a4a16 srpt/Testing.txt: Minor updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4618 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-14 08:25:53 +00:00
Bart Van Assche
edadea8fd0 ib_srpt: RHEL 5.3 build fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4603 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-05 08:53:35 +00:00
Bart Van Assche
9e1b02afa8 ib_srpt: Remove an unused variable
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4554 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-10-08 14:09:27 +00:00
Bart Van Assche
8801f5babf ib_srpt: Convert 'sizeof e' into 'sizeof(e)'
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4540 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-10-02 08:29:45 +00:00
Bart Van Assche
b2567396f8 nightly build: Add kernel 3.6 support patches
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4539 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-10-02 08:17:58 +00:00
Bart Van Assche
3d1468cfac ib_srpt: Convert two functions two single-exit style
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4516 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-09-13 08:15:23 +00:00
Vladislav Bolkhovitin
8ce28aaba2 Avoid that enabling a target too quickly triggers a crash
The sysfs attributes of a target can be accessed before scst_tgt.tgt_priv
has been set. Avoid that such an access triggers a crash.

Symptom:
BUG: unable to handle kernel NULL pointer dereference at 000000000000004c
IP: [<ffffffffa1345848>] iscsi_is_target_enabled+0x8/0x20 [iscsi_scst]
PGD 150a4c067 PUD 13cacb067 PMD 0
Oops: 0000 [#1] SMP
CPU 1
Modules linked in: zfs(P) iscsi_scst(O) scst_vdisk(O) scst(O) zcommon(P) znvpair(P) zavl(P) zunicode(P) spl(O) [last unloaded: zfs]
Pid: 3974, comm: scst_uid1864 Tainted: P           O 3.2.23-zfsiscsi-std-ipv6-64 #3 Supermicro X6DVA/X6DVA
RIP: 0010:[<ffffffffa1345848>]  [<ffffffffa1345848>] iscsi_is_target_enabled+0x8/0x20 [iscsi_scst]
RSP: 0018:ffff88015071ddc0  EFLAGS: 00010282
RAX: 0000000000000000 RBX: ffff880181fdaa00 RCX: ffff88012d41f380
RDX: ffff88015071c010 RSI: 0000000000000000 RDI: ffff880181fdaa00
RBP: ffff88015071ddc0 R08: 0000000000000000 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000001 R12: ffffffffa134a608
R13: 0000000000000000 R14: 0000000000000129 R15: ffffffffa134a4c0
FS:  0000000000000000(0000) GS:ffff88019fc80000(0000)
knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 000000000000004c CR3: 0000000151927000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process scst_uid1864 (pid: 3974, threadinfo ffff88015071c000, task ffff880194d57500)
Stack:
 ffff88015071de10 ffffffffa12ee89a 00000000fffffffc 01ff88015071de98
 ffff88015071de80 ffff8801932a48d8 00000000fffffffc ffff88015071de98
 ffff88015071de80 ffff880194d57500 ffff88015071de30 ffffffffa12f582e
Call Trace:
 [<ffffffffa12ee89a>] __scst_is_relative_target_port_id_unique+0x6a/0xc0 [scst]
 [<ffffffffa12f582e>] gen_relative_target_port_id+0x6e/0xd0 [scst]
 [<ffffffffa12fdb8a>] scst_tgt_enable_store_work_fn+0x3a/0xe0 [scst]
 [<ffffffffa12f9397>] sysfs_work_thread_fn+0xc7/0x2e0 [scst]
 [<ffffffffa12f92d0>] ? scst_tgtt_release+0x20/0x20 [scst]
 [<ffffffffa12f92d0>] ? scst_tgtt_release+0x20/0x20 [scst]
 [<ffffffff810b44f6>] kthread+0x96/0xa0
 [<ffffffff81b8ed74>] kernel_thread_helper+0x4/0x10
 [<ffffffff810b4460>] ? kthread_worker_fn+0x180/0x180
 [<ffffffff81b8ed70>] ? gs_change+0xb/0xb
Code: 42 c8 74 0f 39 78 48 75 ea c9 c3 0f 1f 84 00 00 00 00 00 31 c0 c9 c3 66 66 66 2e 0f 1f 84 00 00 00 00 00 48 8b 47 48 55 48 89 e5 <0f> b6 40 4c c9 83 e0 01 c3 66 66 66 66 66 66 2e 0f 1f 84 00 00
RIP  [<ffffffffa1345848>] iscsi_is_target_enabled+0x8/0x20 [iscsi_scst]
 RSP <ffff88015071ddc0>
CR2: 000000000000004c
---[ end trace 6311d4069703be07 ]---

Reported-by: Etienne Dechamps <e-t172@akegroup.org>
Signed-off-by: Bart Van Assche <bvanassche@acm.org> with some modifications



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4515 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-09-12 22:13:43 +00:00
Bart Van Assche
14e29d815e ib_srpt README: Add more performance notes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4514 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-09-12 14:06:47 +00:00
Bart Van Assche
d8b5dd28b4 ib_srpt README: Add more performance notes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4511 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-09-11 15:58:29 +00:00
Bart Van Assche
1b9567a1cd srpt/README: Recommend to use SLAB instead of SLUB
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4508 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-09-07 12:36:15 +00:00
Bart Van Assche
ab28f2aaa3 srpt/README: Recommend to disable CONFIG_SCHED_DEBUG and CONFIG_SCHEDSTATS
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4507 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-09-07 12:20:05 +00:00