Bart Van Assche
1c71df72ea
qla2x00t-32gbit: Remove redundant assignment to rval
...
Variable rval is set to QLA_SUCCESS but this value is never read as it is
overwritten later on. Hence it is a redundant assignment and can be
removed.
Clean up the following clang-analyzer warning:
drivers/scsi/qla2xxx/qla_init.c:4359:2: warning: Value stored to 'rval'
is never read [clang-analyzer-deadcode.DeadStores].
Link: https://lore.kernel.org/r/1620643206-127930-1-git-send-email-jiapeng.chong@linux.alibaba.com
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit cb9eb11fd57215020c6649bbe884232fb0f80bdd upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9516 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-05 15:41:29 +00:00
Bart Van Assche
d3fa7881a9
qla2x00t-32gbit: Fix error return code in qla82xx_write_flash_dword()
...
Fix to return a negative error code from the error handling case instead of
0 as done elsewhere in this function.
Link: https://lore.kernel.org/r/20210514090952.6715-1-thunder.leizhen@huawei.com
Fixes: a9083016a531 ("[SCSI] qla2xxx: Add ISP82XX support.")
Reported-by: Hulk Robot <hulkci@huawei.com >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit 5cb289bf2d7c34ca1abd794ce116c4f19185a1d4 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9515 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-05 15:41:24 +00:00
Bart Van Assche
12fc79c804
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9514 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-05 15:34:07 +00:00
Bart Van Assche
a59b6f297c
Merge branch 'svn-trunk'
2021-09-04 20:29:38 -07:00
Bart Van Assche
a891d6e9ba
scst/include/backport.h: Backport more kernel functions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9513 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-05 03:29:32 +00:00
Bart Van Assche
c251d963cd
Merge branch 'svn-trunk'
2021-09-04 20:14:27 -07:00
Bart Van Assche
db29b3330d
qla2x00t-32gbit: Bump the minimum kernel version to v3.18
...
Patches that will be applied later for this driver require kernel version
v3.18.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9512 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-05 03:14:00 +00:00
Bart Van Assche
34b4ac48ed
qla2x00t: Fix three kernel-doc headers
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9511 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-05 03:11:34 +00:00
Bart Van Assche
f217e9387c
Merge branch 'svn-trunk'
2021-09-04 20:08:45 -07:00
Bart Van Assche
13def89b5f
qla2x00t-32gbit: Simplify the backwards compatibility code
...
This patch does not change any functionality.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9510 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-05 03:08:34 +00:00
Bart Van Assche
bd5b6fad83
qla2x00t: Simplify the backwards compatibility code
...
This patch does not change any functionality.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9509 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-05 03:08:01 +00:00
Bart Van Assche
a0e65bb9c9
scst/include/backport.h: Improve the kernel backports that add support for v5.14
...
Unbreak the build against kernels v4.10 and older.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9508 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-05 02:57:50 +00:00
Bart Van Assche
a32cbdfdf4
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9507 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-04 02:33:39 +00:00
Bart Van Assche
21733ac5e9
Merge branch 'svn-trunk'
2021-09-02 22:10:06 -07:00
Bart Van Assche
a88053adf5
scst: Port to Linux kernel v5.14
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9506 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-03 05:09:57 +00:00
Bart Van Assche
6483cd8c86
Merge branch 'svn-trunk'
2021-09-02 22:05:56 -07:00
Bart Van Assche
3624c1baaf
scst: Open-code the status_byte() macro
...
The status_byte() macro and also the SAM_STAT_* macros shifted right by one
bit have been removed from kernel v5.14. Hence open-code status_byte() and
change GOOD into SAM_STAT_GOOD etc.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9505 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-03 05:05:13 +00:00
Bart Van Assche
6edaec0d40
scst: Make msg_byte() and driver_byte() available when building against v5.14
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9504 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-03 05:01:43 +00:00
Bart Van Assche
bcd6b7fe2a
Merge branch 'svn-trunk'
2021-09-02 21:59:36 -07:00
Bart Van Assche
cb74f66766
scst_local: Port to Linux kernel v5.15
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9503 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-03 04:59:06 +00:00
Bart Van Assche
bdf56c04b6
qla2x00t: Use scsi_build_sense()
...
This patch fixes a bug by changing SAM_STAT_CHECK_CONDITION << 1 into
SAM_STAT_CHECK_CONDITION in the SCSI result code.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9502 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-03 04:57:38 +00:00
Bart Van Assche
16f0eb9177
scst: Backport the SCSI functions that are new in kernels v5.14 and v5.15
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9501 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-03 04:56:13 +00:00
Bart Van Assche
309d11589a
qla2x00t: Use the fallthrough keyword to annotate switch/case fallthrough
...
This patch prevents that a compiler warning is reported when building this
driver against kernel v5.14.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9500 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-03 02:35:53 +00:00
Bart Van Assche
078e1b774c
qla2x00t/qla_bsg: Fix error codes
...
Use the proper error codes when reporting a BSG error. The DID_* codes are
the codes that are shifted left 16 bits while the DRIVER_* codes must be
shifted left 24 bits.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9499 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-03 02:34:47 +00:00
Arian Weber
dcfa2cf4ca
Reenable block_shift calculation for tapes
...
The calculation of block_shift was disabled for tape devices.
Enabling it again, as it is now being used in scst_tape_generic_parse.
Fixes: 0043f510cb ("block shift cleanups and fixes")
2021-09-01 20:19:30 +02:00
Bart Van Assche
50a448d54a
Merge branch 'svn-trunk'
2021-08-31 21:36:09 -07:00
Bart Van Assche
5e90abb64a
scst_copy_mgr: Implement a workaround for non-compliant initiator systems
...
Reported-by: Eitan Cohen <eitancohen456@gmail.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9498 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-01 04:33:22 +00:00
Bart Van Assche
5e3e389060
Merge branch 'svn-trunk'
2021-08-30 19:00:49 -07:00
Bart Van Assche
3a1763bc73
isert-scst: Fix typo in the PRINT_INFO statement for sockaddr output
...
Fixes: 5d808c54 ("isert-scst: Introduce the function isert_setup_id()")
Signed-off-by: Chesnokov Gleb <Chesnokov.G@raidix.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9497 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-08-31 02:00:40 +00:00
Bart Van Assche
6aa46747e2
Merge branch 'svn-trunk'
2021-08-27 10:58:36 -07:00
Bart Van Assche
d5cee6ebf4
Makefile: Make sure that $(KVER) and $(KDIR) are set
...
These variables are needed for building Debian packages.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9496 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-08-27 17:58:27 +00:00
Bart Van Assche
27a74601a5
Makefile, dpkg: Show $(KVER) and $(KDIR) while building a Debian package
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9495 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-08-27 17:57:47 +00:00
Bart Van Assche
8042466117
scstadmin/init.d/scst: Remove the 'which' invocation
...
Remove the invocation of the 'which' command since that command has been
deprecated in Debian 11 and since I am not aware of any other portable
approach for querying the path of a command.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9494 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-08-27 17:56:28 +00:00
Bart Van Assche
78a12a523f
Merge branch 'svn-trunk'
2021-08-19 20:36:28 -07:00
Bart Van Assche
5dd069d3d6
scst: Do not affect weak updates during installation
...
The code for removing weak updates did not fix the reported issue.
Additionally, that code can remove weak updates that are not related to
SCST. Hence remove the code again that removes weak updates.
Reported-by: Tu, Rongqing <rongqing.tu@hpe.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9493 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-08-20 03:36:16 +00:00
Bart Van Assche
878f4fa45e
Merge branch 'svn-trunk'
2021-08-18 21:15:23 -07:00
Bart Van Assche
c11f216fed
scst_copy_mgr: Fix support for auto_cm_assignment=0
...
Only check whether a LUN has already been registered with the copy manager
for the auto_cm_assignment=1 case since with auto CM assignment disabled
scst_cm_dev_register() is called after the LUN has been registered.
Reported-by: Eitan Cohen <eitancohen456@gmail.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9492 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-08-19 04:15:16 +00:00
Bart Van Assche
6691b60c39
scst: Fix copy manager LUN assignment for auto_cm_assignment=0
...
The INQUIRY command sent by the copy manager can only succeed if the LUN it
is submitted to exists before the INQUIRY command is sent. Hence this patch
that swaps the order of the scst_cm_on_add_lun() and scst_alloc_add_tgt_dev()
calls in scst_acg_add_lun(). This patch prevents that the INQUIRY commands
submitted by the copy manager fail as follows:
Not supported dev type 7f, ignoring
Reported-by: Eitan Cohen <eitancohen456@gmail.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9491 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-08-19 04:12:36 +00:00
Bart Van Assche
df8d3d223a
Debian: Fix Makefile syntax for 'make dpkg'
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9490 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-08-19 04:11:11 +00:00
Bart Van Assche and GitHub
19ed0903d8
Merge pull request #45 from yocalebo/fix-debian-rules
...
Fix debian/rules syntax error
2021-08-18 16:05:14 -07:00
caleb
34a1a2e90e
fix debian/rules syntax error
2021-08-17 09:40:21 -04:00
Bart Van Assche
549c58e784
Merge branch 'svn-trunk'
2021-08-15 11:35:18 -07:00
Bart Van Assche
0e43a7eb8f
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9489 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-08-15 18:35:08 +00:00
Bart Van Assche
c0b7ce6985
Merge branch 'svn-trunk'
2021-08-13 20:24:50 -07:00
Bart Van Assche
84d335f131
scst_local: Make the SCSI host number available in sysfs
...
An example for the following SCST configuration:
TARGET_DRIVER scst_local {
TARGET scst_local_tgt {
session_name scst_local_host
LUN 0 dummy
LUN 1 test1
LUN 2 test2
}
}
$ cat /sys/kernel/scst_tgt/targets/scst_local/scst_local_tgt/sessions/scst_local_host/host_no
9
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9488 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-08-14 03:24:11 +00:00
Bart Van Assche
0281c79e8d
Merge branch 'svn-trunk'
2021-07-13 07:03:57 -07:00
Bart Van Assche
d6a342b373
isert-scst: Call isert_portal_list_add() after portal initialization
...
This patch fixes the following hang:
SysRq : Show Blocked State
task PC stack pid father
iscsi-scstd D 0000000000000007 0 7981 1 0x00000084
ffff88007ad87ae8 0000000000000046 0000000000000000 0000000000000010
0000000000000246 ffff88007ad87a48 0000002483e71851 0000000000000246
00000000fffdd081 0000000000000c83 ffff880078e8b068 ffff88007ad87fd8
Call Trace:
[<ffffffffa050667d>] isert_wait_for_portal_release+0x6d/0xc0 [isert_scst]
[<ffffffffa04fd5cd>] isert_close_all_portals+0x3d/0x50 [isert_scst]
[<ffffffffa04deeca>] target_del_all+0x9a/0x2b0 [iscsi_scst]
[<ffffffffa04d7688>] iscsi_release+0x48/0xe0 [iscsi_scst]
[<ffffffff811a46c8>] __fput+0xf8/0x220
[<ffffffff811a4815>] fput+0x25/0x30
[<ffffffff8119f8d0>] filp_close+0x60/0x90
[<ffffffff81084ccf>] put_files_struct+0x7f/0xf0
[<ffffffff81084d93>] exit_files+0x53/0x70
[<ffffffff81086ecd>] do_exit+0x18d/0x860
[<ffffffff810875f8>] do_group_exit+0x58/0xd0
[<ffffffff8109d576>] get_signal_to_deliver+0x1f6/0x470
[<ffffffff8100a375>] do_signal+0x75/0x8d0
[<ffffffff8100ac60>] do_notify_resume+0x90/0xc0
[<ffffffff8156672f>] int_signal+0x12/0x17
Fixes: 5d808c54 ("isert-scst: Introduce the function isert_setup_id()")
Signed-off-by: Chesnokov Gleb <Chesnokov.G@raidix.com >
[ bvanassche: added call stack ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9487 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-07-13 14:03:15 +00:00
Bart Van Assche
ba294a12ba
Merge branch 'svn-trunk'
2021-07-12 21:52:29 -07:00
Bart Van Assche
53559bae31
isert-scst: Move a statement that reports an error message
...
Move PRINT_ERROR to the body of RDMA_CM_EVENT_CONNECT_REQUET because only
it can return an error and not log information about it.
Signed-off-by: Chesnokov Gleb <Chesnokov.G@raidix.com >
[bvanassche: modified patch title]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9486 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-07-13 04:52:18 +00:00
Bart Van Assche
7fc6af2934
Merge branch 'svn-trunk'
2021-07-11 20:45:53 -07:00