8786 Commits

Author SHA1 Message Date
Vladislav Bolkhovitin
9e8b08cd40 Avoid that the compiler warns about READ_ATTRIBUTE and WRITE_ATTRIBUTE
already being defined in <scsi/scsi.h> on RHEL 6.0, 6.1 and 6.2.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4032 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-28 03:54:03 +00:00
Bart Van Assche
59da9cd84b fcst: RHEL 6 build fixes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4031 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-27 10:38:01 +00:00
Bart Van Assche
256de061ef nightly build: update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4030 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-24 10:40:32 +00:00
Bart Van Assche
c8fcd3d082 nightly build: include fcst for kernel version 2.6.37 and later
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4028 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-21 09:58:09 +00:00
Bart Van Assche
2125cb8400 fcst: Complain when refusing login
Log an error message when refusing login because a target port has not yet been enabled
such that fcst users have a way to find out what happened.

Also, make sure that ft_prli() returns a value in the range of the enumeration type
fc_els_spp_resp. Note: since the return value of ft_prli() is only compared against
FC_SPP_RESP_ACK in the current libfc implementation, this change doesn't affect the
behavior of fcst.

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


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4027 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-21 09:32:18 +00:00
Bart Van Assche
356f2339a7 fcst: add make 2debug / 2release / 2perf support
Make "make 2debug / 2release / 2perf support" work for fcst. Add -fno-inline
in debug mode. Remove unused defines. Remove a trailing tab.

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


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4026 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-21 09:30:19 +00:00
Bart Van Assche
19a0804026 fcst: Avoid that login triggers a crash
Fix the following crash triggered by FCoE initiator login:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000002
IP: [<ffffffffa04b282b>] ft_prli+0x4b/0x350 [fcst]
PGD 1a7ba4067 PUD 1a7ba3067 PMD 0
Oops: 0000 [#1] SMP
CPU 0
Modules linked in: netconsole configfs ib_srpt fcst scst_vdisk scst
crc32c libcrc32c fcoe libfcoe libfc scsi_transport_fc snd_pcm_oss
snd_mixer_oss snd_seq snd_seq_device af_packet rdma_ucm rdma_cm iw_cm
ib_addr ib_ipoib ib_cm ib_sa ib_uverbs ib_umad mlx4_ib ib_mad ib_core
microcode cpufreq_conservative cpufreq_userspace cpufreq_powersave
acpi_cpufreq mperf dm_mod snd_hda_codec_hdmi snd_hda_codec_analog
snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_timer snd intel_agp
mlx4_core sr_mod sg intel_gtt cdrom soundcore i2c_i801 agpgart
snd_page_alloc i2c_core pcspkr button uhci_hcd sd_mod crc_t10dif
ehci_hcd usbcore edd ext3 mbcache jbd fan ata_generic ata_piix
pata_marvell ahci libahci libata scsi_mod thermal processor
thermal_sys hwmon [last unloaded: scst]

Pid: 3562, comm: fcoethread/0 Not tainted 3.1.5-debug+ #1 System
manufacturer P5Q DELUXE/P5Q DELUXE
RIP: 0010:[<ffffffffa04b282b>]  [<ffffffffa04b282b>] ft_prli+0x4b/0x350 [fcst]
RSP: 0018:ffff8801a6273b70  EFLAGS: 00010282
RAX: ffff8801a6273fd8 RBX: 0000000000000000 RCX: 0000000000000006
RDX: 0000000000000001 RSI: 2222222222222222 RDI: 2222222222222222
RBP: ffff8801a6273be0 R08: 2222222222222222 R09: 2222222222222222
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000004
R13: ffff8801a6291c7c R14: ffff8801a6290800 R15: ffff8801a6290848
FS:  0000000000000000(0000) GS:ffff8801bfc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000002 CR3: 00000001a7ba1000 CR4: 00000000000406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process fcoethread/0 (pid: 3562, threadinfo ffff8801a6272000, task
ffff8801b13ecce0)
Stack:
 ffff8801a6273bc0 ffffffff812f7593 00000000000000c0 ffff8801b9002a00
 0000000000000100 000000000000002c 0000000000000000 ffff8801ae1a4a18
 ffff8801b1a1d600 ffff8801a6290800 ffff8801b1a1ce00 ffff8801ae1a4a18
Call Trace:
 [<ffffffff812f7593>] ? __alloc_skb+0x83/0x170
 [<ffffffffa03b95ec>] fc_rport_enter_prli+0xec/0x220 [libfc]
 [<ffffffffa03ba531>] fc_rport_recv_req+0x541/0x1280 [libfc]
 [<ffffffff81082e8d>] ? trace_hardirqs_on_caller+0x11d/0x1b0
 [<ffffffff813d44ad>] ? mutex_lock_nested+0x26d/0x330
 [<ffffffffa03b6c00>] ? fc_lport_recv_els_req+0x30/0x140 [libfc]
 [<ffffffffa03b6c1f>] fc_lport_recv_els_req+0x4f/0x140 [libfc]
 [<ffffffffa03b5f14>] fc_lport_recv_req+0x174/0x230 [libfc]
 [<ffffffffa03b5dd1>] ? fc_lport_recv_req+0x31/0x230 [libfc]
 [<ffffffff81082f2d>] ? trace_hardirqs_on+0xd/0x10
 [<ffffffffa03b2f6c>] fc_exch_recv+0x63c/0xe50 [libfc]
 [<ffffffffa03ce3b8>] fcoe_recv_frame+0x1d8/0x410 [fcoe]
 [<ffffffff81082e8d>] ? trace_hardirqs_on_caller+0x11d/0x1b0
 [<ffffffffa03ceaf8>] ? fcoe_percpu_receive_thread+0x68/0xf0 [fcoe]
 [<ffffffff8104caf7>] ? local_bh_enable_ip+0x87/0xf0
 [<ffffffffa03ceb00>] fcoe_percpu_receive_thread+0x70/0xf0 [fcoe]
 [<ffffffffa03cea90>] ? fcoe_rcv+0x450/0x450 [fcoe]
 [<ffffffff81069656>] kthread+0x96/0xa0
 [<ffffffff813e0b74>] kernel_thread_helper+0x4/0x10
 [<ffffffff813d6d9d>] ? retint_restore_args+0xe/0xe
 [<ffffffff810695c0>] ? __init_kthread_worker+0x70/0x70
 [<ffffffff813e0b70>] ? gs_change+0xb/0xb
Code: 90 f6 05 e8 2c 00 00 02 49 89 fe 48 89 d3 49 89 cd 0f 85 8e 02
00 00 31 f6 48 c7 c7 00 50 4b a0 41 bc 04 00 00 00 e8 15 1a f2 e0 <0f>
b6 43 02 a8 c0 75 65 8b 4b 0c 41 b4 08 0f c9 f6 c1 30 74 58
RIP  [<ffffffffa04b282b>] ft_prli+0x4b/0x350 [fcst]
 RSP <ffff8801a6273b70>
CR2: 0000000000000002
---[ end trace c06e7c64e9c18831 ]---

BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Yi Zou <yi.zou@intel.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4025 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-21 09:28:50 +00:00
Bart Van Assche
393fed29d2 ib_srpt: Log a message when closing a channel because of relogin
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4024 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-21 09:24:45 +00:00
Vladislav Bolkhovitin
6d8ca195f7 openSUSE 12.1 automatically transforms commands like
"/etc/init.d/scst start" into a systemd start command. Since that doesn't
work for the SCST init script, disable systemd wrapping.

See also bug #738281 "Upgrading from openSUSE 11.4 to openSUSE 12.1 breaks third-party
LSB-compliant System V style init scripts" in the Novell bugzilla database
(https://bugzilla.novell.com/show_bug.cgi?id=738281).

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4023 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-21 03:02:13 +00:00
Bart Van Assche
31403966b6 ib_srpt: Avoid that very rapidly successive logins from the same initiator cause a crash
Fixes this bug report:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000518
IP: [<ffffffff81080112>] __lock_acquire+0x62/0x1d40
PGD 1b226f067 PUD 1b2241067 PMD 0
Oops: 0000 [#1] SMP
CPU 0
Modules linked in: ib_srpt scst_vdisk crc32c libcrc32c scst netconsole configfs snd_pcm_oss snd_mixer_oss snd_seq snd_seq_device af_packet rdma_ucm rdma_cm iw_cm ib_addr ib_ipoib ib_cm ib_sa ib_uverbs ib_umad mlx4_ib ib_mad ib_core microcode cpufreq_co
nservative cpufreq_userspace cpufreq_powersave acpi_cpufreq mperf dm_mod snd_hda_codec_hdmi snd_hda_codec_analog snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_timer snd intel_agp sr_mod mlx4_core sg intel_gtt cdrom i2c_i801 agpgart soundcore i2c_co
re snd_page_alloc pcspkr button uhci_hcd ehci_hcd sd_mod crc_t10dif usbcore edd ext3 mbcache jbd fan ata_generic ata_piix pata_marvell ahci libahci libata scsi_mod thermal processor thermal_sys hwmon

Pid: 4, comm: kworker/0:0 Not tainted 3.1.5-debug+ #1 System manufacturer P5Q DELUXE/P5Q DELUXE
RIP: 0010:[<ffffffff81080112>]  [<ffffffff81080112>] __lock_acquire+0x62/0x1d40
RSP: 0018:ffff8801b50c9950  EFLAGS: 00010046
RAX: 0000000000000046 RBX: 0000000000000518 RCX: 0000000000000001
RDX: 0000000000000001 RSI: 0000000000000000 RDI: 0000000000000518
RBP: ffff8801b50c9a40 R08: 0000000000000002 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000000 R12: ffff8801b50aae20
R13: 0000000000000000 R14: 0000000000000002 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8801bfc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000518 CR3: 00000001b1a4d000 CR4: 00000000000406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process kworker/0:0 (pid: 4, threadinfo ffff8801b50c8000, task ffff8801b50aae20)
Stack:
 0000000000000006 0000000000000001 ffffffff8191ca20 ffff8801b50c99b8
 ffffffff81082cae 0000000000000003 ffff8801b50aae20 0000000000000003
 0000000000000002 0000000000000000 ffff8801b50c9aa0 0000000000000046
Call Trace:
 [<ffffffff81082cae>] ? mark_held_locks+0x6e/0x130
 [<ffffffff810823c5>] lock_acquire+0x95/0x130
 [<ffffffff8103d4ee>] ? try_to_wake_up+0x2e/0x2b0
 [<ffffffff813d618c>] ? _raw_spin_lock_irqsave+0x1c/0x60
 [<ffffffff813d61bb>] _raw_spin_lock_irqsave+0x4b/0x60
 [<ffffffff8103d4ee>] ? try_to_wake_up+0x2e/0x2b0
 [<ffffffff8103d4ee>] try_to_wake_up+0x2e/0x2b0
 [<ffffffff8103d7a5>] wake_up_process+0x15/0x20
 [<ffffffffa0463fda>] srpt_set_ch_state_to_disc+0x5a/0x80 [ib_srpt]
 [<ffffffffa0464016>] __srpt_close_ch+0x16/0xa0 [ib_srpt]
 [<ffffffffa04698e6>] srpt_cm_req_recv+0x806/0xbe0 [ib_srpt]
 [<ffffffffa046ac0d>] srpt_cm_handler+0x7d/0x160 [ib_srpt]
 [<ffffffffa0315c85>] cm_process_work+0x25/0x110 [ib_cm]
 [<ffffffffa031716c>] cm_req_handler+0x67c/0xa00 [ib_cm]
 [<ffffffffa031761d>] cm_work_handler+0x12d/0x1480 [ib_cm]
 [<ffffffff810629c8>] process_one_work+0x198/0x520
 [<ffffffff81062959>] ? process_one_work+0x129/0x520
 [<ffffffffa03174f0>] ? cm_req_handler+0xa00/0xa00 [ib_cm]
 [<ffffffff810646aa>] worker_thread+0x16a/0x350
 [<ffffffff81064540>] ? manage_workers+0x250/0x250
 [<ffffffff81069656>] kthread+0x96/0xa0
 [<ffffffff813e0b74>] kernel_thread_helper+0x4/0x10
 [<ffffffff813d6d9d>] ? retint_restore_args+0xe/0xe
 [<ffffffff810695c0>] ? __init_kthread_worker+0x70/0x70
 [<ffffffff813e0b70>] ? gs_change+0xb/0xb
Code: 25 00 b6 00 00 4c 89 7d f8 85 c9 48 89 fb 45 0f 45 f0 41 89 f5 85 d2 0f 84 44 0d 00 00 8b 05 5a 3a 6f 00 85 c0 0f 84 c6 01 00 00
 8b 03 ba 01 00 00 00 48 3d c0 75 7b 81 44 0f 44 f2 41 83 fd
RIP  [<ffffffff81080112>] __lock_acquire+0x62/0x1d40
 RSP <ffff8801b50c9950>
CR2: 0000000000000518
---[ end trace efbb413a57b805cb ]---


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4020 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-20 20:39:20 +00:00
Bart Van Assche
2f6a4f4210 ib_srpt: Make change log more detailed
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4018 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-20 15:35:55 +00:00
Vladislav Bolkhovitin
76dc7d207a Improve release mode TM logging to simplify imvestigations
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4017 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-19 21:30:18 +00:00
Bart Van Assche
60d9c93a1d ib_srpt: Add 2.2.0 release notes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4015 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-19 19:36:50 +00:00
Bart Van Assche
885fd29a6c Remove trailing spaces
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4014 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-19 17:41:56 +00:00
Bart Van Assche
c6e1c7ffdb Kernel version updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4003 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-19 14:58:15 +00:00
Bart Van Assche
da14ec2aa4 Simplify two expressions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4002 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-19 14:55:57 +00:00
Bart Van Assche
ca9799666a nightly/bin/nightly: Add command-line option -a
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4001 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-19 14:24:11 +00:00
Bart Van Assche
a5c6ff869a Make run-regression-tests work with older tar versions that do not support xz
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4000 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-19 14:23:33 +00:00
Bart Van Assche
14024e009d Nightly build: kernel version updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3999 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-16 10:27:10 +00:00
Bart Van Assche
bad8f4498d Nightly build: the directory structure on ftp.kernel.org has been modified once more. Update scripts/run-regression-tests accordingly
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3998 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-16 10:16:12 +00:00
Bart Van Assche
c8fc2dd821 /etc/init.d/scst: clarify comments
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3996 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-15 13:03:51 +00:00
Bart Van Assche
ccb249a8cd Spelling fix: change one occurrence of "ratational" into "rotational".
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3991 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-15 10:33:27 +00:00
Bart Van Assche
4dbdee210d Spelling fix: change one occurrence of "ratational" into "rotational".
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3990 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-15 10:32:24 +00:00
Bart Van Assche
64a9ec4768 Spelling fix: change one occurrence of "ritational" into "rotational".
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3989 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-15 10:31:26 +00:00
Bart Van Assche
0918f0f356 SVN_TAGS: Add 2.0/2.1/2.2 branch starting points
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3982 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-15 08:50:35 +00:00
Vladislav Bolkhovitin
5dea6c0aa6 Minor addition recommended by Daniel Fernandes <dfernandes1978@hotmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3980 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-13 02:13:56 +00:00
Vladislav Bolkhovitin
e0138684a4 QLA HOWTO update from Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3966 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-10 03:54:47 +00:00
Vladislav Bolkhovitin
7872837b6b Replace list_entry((a)->next, b, c) by list_first_entry(a, b, c).
BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3965 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-10 03:50:24 +00:00
Vladislav Bolkhovitin
fda3b6b327 Minor logging improvement
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3964 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-08 23:49:52 +00:00
Vladislav Bolkhovitin
f173a9133c 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>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3963 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-08 00:06:24 +00:00
Vladislav Bolkhovitin
cd2d549a0b Avoid converting back and forth between int and enum
BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3962 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-08 00:00:06 +00:00
Vladislav Bolkhovitin
882d414719 Makes scst_vdisk build again on RHEL 5.x.
BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3961 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-07 23:58:59 +00:00
Bart Van Assche
4250cf9446 qla2x_tgt: Remove trailing whitespace
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3960 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-07 17:31:08 +00:00
Vladislav Bolkhovitin
331cc5d28d Web updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3959 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-07 03:07:45 +00:00
Vladislav Bolkhovitin
9ea7b8b4c9 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/trunk@3958 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-07 02:56:31 +00:00
Vladislav Bolkhovitin
63a6094cad 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>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3957 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-07 02:29:14 +00:00
Mark Buechler
c866c6f4b1 - Small directory check in _issueLip(). Not sure why this is needed.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3956 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-06 19:41:33 +00:00
Bart Van Assche
3630f4ba6c ib_srpt: Send a reject message with non-zero reason code if session creation fails
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3955 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-06 19:30:21 +00:00
Bart Van Assche
f9f163fd3e Kernel version updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3954 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-06 19:11:50 +00:00
Bart Van Assche
c9f9f6d9b8 ib_srpt: Avoid that session registration failure causes trouble / send a reject if the transition to RTR fails.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3953 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-06 19:08:14 +00:00
Vladislav Bolkhovitin
69d8c2fbd7 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>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3952 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-06 03:02:13 +00:00
Mark Buechler
1bbf50a530 - Warn only in issueLip() when -issue_lip is an argument.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3951 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-05 19:39:59 +00:00
Vladislav Bolkhovitin
5cc78efff5 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>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3950 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-02 02:46:33 +00:00
Vladislav Bolkhovitin
ae55aa9e36 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>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3949 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-02 02:42:21 +00:00
Vladislav Bolkhovitin
0af423256f Micro-optimize the code for CDB parsing in several device handlers.
BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3948 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-02 02:41:15 +00:00
Vladislav Bolkhovitin
4a3988e274 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>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3947 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-02 02:39:43 +00:00
Vladislav Bolkhovitin
2dd1d93762 Remove a superfluous pair of braces since checkpatch complains about these.
BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3946 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-02 02:26:29 +00:00
Vladislav Bolkhovitin
f8c3b26620 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>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3945 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-02 02:24:41 +00:00
Vladislav Bolkhovitin
152a2ad8c1 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>




git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3944 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-02 02:14:59 +00:00
Vladislav Bolkhovitin
59019ae405 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>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3943 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-01 03:36:15 +00:00