Bart Van Assche
e05b550817
scst/include/backport.h: Improve the FC_PORTSPEED_64GBIT backport
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8996 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-01 02:06:05 +00:00
Bart Van Assche
5aeb06e3a8
scst/include/backport.h: Improve the cpu_to_be32_array() backport
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8995 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-01 02:05:35 +00:00
Bart Van Assche
7e12731282
scst/include/backport.h: Improve the MIN_NICE backport
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8994 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-01 02:04:44 +00:00
Bart Van Assche
08ab4d2e36
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8993 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-31 21:45:47 +00:00
Bart Van Assche
062f781e87
Merge branch 'svn-trunk'
2020-05-30 20:41:30 -07:00
Bart Van Assche
fda71c077d
Include <poll.h> instead of <sys/poll.h>
...
According to the Single Unix Specification, the poll() function has been
declared in the <poll.h> header file. This makes the SCST code compatible
with the musl C library. See also https://en.wikipedia.org/wiki/Musl . See
also https://github.com/bvanassche/scst/issues/23 .
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8992 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-31 03:41:17 +00:00
Bart Van Assche
1adaafdab1
qla2x00t-32gbit: Unbreak the 32-bit build
...
Note: this is not an attempt to port this driver to 32-bit systems.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8991 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-31 03:29:53 +00:00
Bart Van Assche
c6ff35fdee
qla2x00t: Fix a 32-bit compiler warning
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8990 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-31 03:29:06 +00:00
Bart Van Assche
4458868846
scst_user: Fix a 32-bit compiler warning
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8989 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-31 03:28:33 +00:00
Vladislav Bolkhovitin
e25650f872
web: users page updates
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8988 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-29 07:34:24 +00:00
Bart Van Assche
a93243c31d
Merge branch 'svn-trunk'
2020-05-28 13:53:13 -07:00
Vladislav Bolkhovitin
66316e323d
www: Update copyright footer
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8987 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-28 19:10:11 +00:00
Bart Van Assche
d5997e830e
Merge branch 'svn-trunk'
2020-05-27 19:29:22 -07:00
Bart Van Assche
630573ed19
scripts/generate-kernel-patch: Parse the kernel version properly
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8986 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-26 20:14:20 +00:00
Bart Van Assche
3612dfb616
scst: Remove an unused macro
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8985 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-26 18:24:32 +00:00
Bart Van Assche
4b9e849cef
scst: Adjust indentation to keep checkpatch happy
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8984 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-26 18:18:30 +00:00
Bart Van Assche
1cbce8a701
Merge branch 'svn-trunk'
2020-05-25 11:20:14 -07:00
Bart Van Assche
ac0de9d485
ib_srpt: Limit the number of scatter/gather elements in RDMA READs to max_sge_rd
...
Additionally, declare the max_sge_delta parameter obsolete.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8983 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-25 18:19:45 +00:00
Bart Van Assche
52497bb8b6
ib_srpt: Introduce a new local variable in srpt_map_sg_to_ib_sge()
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8982 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-25 18:18:02 +00:00
Bart Van Assche
af498fafdd
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8981 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-25 18:17:22 +00:00
Bart Van Assche
fa572f579a
Merge branch 'svn-trunk'
2020-05-24 08:59:46 -07:00
Bart Van Assche
51dc30f27b
ib_srpt: Fix the build for kernel versions before v5.3
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8980 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-24 15:57:29 +00:00
Bart Van Assche
c6a36c30f9
Merge branch 'svn-trunk'
2020-05-23 16:49:18 -07:00
Bart Van Assche
6077ad2b7b
scst/include/backport.h: Backport the MIN_NICE definition
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8979 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 23:48:56 +00:00
Bart Van Assche
67fad5fb7b
ib_srpt: Backport the max_sge_delta calculation to kernel versions < v4.17
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8978 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 23:48:31 +00:00
Bart Van Assche
f4eaed79d1
scripts/generate-kernel-patch: Fix the kernel version passed to specialize-patch
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8977 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 23:46:03 +00:00
Bart Van Assche
a88046be97
qla2xxx: Minimize diffs with upstream
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8976 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 22:53:52 +00:00
Bart Van Assche
ac5f86c035
qla2xxx: Fix a NULL pointer dereference in an error path
...
[ commit 17c5f65db629a3bd95ac8eb960940b6fbb39a310 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8975 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 22:52:09 +00:00
Bart Van Assche
bac6ce6350
qla2xxx: Fix endianness annotations in source files
...
[ commit 7ffa5b939751b6638e4a99518775c8503fbb46be upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8974 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 22:23:17 +00:00
Bart Van Assche
3e86d771e0
qla2xxx: Fix endianness annotations in header files
...
Annotate members of FC protocol and firmware dump data structures as big
endian. Annotate members of RISC control structures as little endian.
Annotate mailbox registers as little endian. Annotate the mb[] arrays as
CPU-endian because communication of the mb[] values with the hardware
happens through the readw() and writew() functions. readw() converts from
__le16 to u16 and writew() converts from u16 to __le16. Annotate 'handles'
as CPU-endian because for the firmware these are opaque values.
[ commit 21038b0900d1b8728ec77d9286d7b0b57ca7b585 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8973 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 22:20:52 +00:00
Bart Van Assche
e2e106d53c
qla2xxx: Use make_handle() instead of open-coding it
...
[ commit 2a4b684ab0aa2a8f8efede77ca1525042c2c0e01 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8972 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 22:20:22 +00:00
Bart Van Assche
80041b881e
qla2xxx: Cast explicitly to uint16_t / uint32_t
...
Casting a pointer to void * and relying on an implicit cast from void *
to uint16_t or uint32_t suppresses sparse warnings about endianness. Hence
cast explicitly to uint16_t and uint32_t. Additionally, remove superfluous
void * casts.
[ commit ab053c09ee2066a2fe62a755f1e64dbc8eddc17c upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8971 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 22:19:55 +00:00
Bart Van Assche
6e9f52f1d4
qla2xxx: Change {RD,WRT}_REG_*() function names from upper case into lower case
...
This was suggested by Daniel Wagner.
[ commit 04474d3a1c968119e7214c312b273dee01258cad upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8970 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 22:19:28 +00:00
Bart Van Assche
76ab4d5949
qla2xxx: Use register names instead of register offsets
...
[ commit c3888416221849ed46fd35413c7a1d00ee291cbe upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8969 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 22:18:44 +00:00
Bart Van Assche
807e5ec091
qla2xxx: Fix the code that reads from mailbox registers
...
Make the MMIO accessors strongly typed such that the compiler checks
whether the accessor function is used that matches the register width. Fix
those MMIO accesses where another number of bits was read or written than
the size of the register.
[ commit 37139da1b097e06841d40a6055db64c78755aea9 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8968 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 22:16:57 +00:00
Bart Van Assche
641a56ec5b
qla2xxx: Change two hardcoded constants into offsetof() / sizeof() expressions
...
[ commit e544b720ef3191cdb6d3ea2915f82973d6372bca upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8967 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 22:15:33 +00:00
Bart Van Assche
55bcb91c24
qla2xxx: Increase the size of struct qla_fcp_prio_cfg to FCP_PRIO_CFG_SIZE
...
[ commit d9ab5f1f05fc147682d4fd1f1f1c5af00b766e33 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8966 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 22:15:03 +00:00
Bart Van Assche
e792922328
qla2xxx: Make a gap in struct qla2xxx_offld_chain explicit
...
[ commit 66f86367771507c88a970644d13646f6b57e82e5 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8965 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 22:14:18 +00:00
Bart Van Assche
99374b5c06
qla2xxx: Add more BUILD_BUG_ON() statements
...
[ commit 8a73a0e002b318d8ad79fe0e6b48e27ca30e527a upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8964 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 22:11:00 +00:00
Bart Van Assche
9143dc55a7
qla2xxx: Simplify the functions for dumping firmware
...
[ commit 8ae178760b23e2055aecf8b8a54629cec7ccc58e upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8963 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 22:06:52 +00:00
Bart Van Assche
ab70b43b05
qla2xxx: Fix spelling of a variable name
...
[ commit 246ee22583ed4847dcdd9a2f307eeca856f42882 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8962 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 22:05:27 +00:00
Bart Van Assche
751580bcd4
qla2xxx: Make qlafx00_process_aen() return void
...
[ commit 88bfdf565cbe33524308d912777f4267981d4be0 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8961 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 22:05:02 +00:00
Bart Van Assche
4f8071b6f7
qla2xxx: Use true, false for ha->fw_dumped
...
[ commit dbe6f49259dacc073c1ae602f383c177f57b1b8a upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8960 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 22:04:29 +00:00
Bart Van Assche
db5f6bc28b
qla2xxx: Use true, false for need_mpi_reset
...
[ commit bda552a7741a23708823c6e87a39d9a956087ac0 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8959 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 22:04:02 +00:00
Bart Van Assche
630c4f49d0
qla2xxx: Make qla_set_ini_mode() return void
...
The return value is not used by the caller and the local variable 'rc' is
not needed. Make qla_set_ini_mode() return void and remove 'rc'. This also
fixes the following coccicheck warning:
drivers/scsi/qla2xxx/qla_attr.c:1906:5-7: Unneeded variable: "rc".
Return "0" on line 2180
Link: https://lore.kernel.org/r/20200429140952.8240-1-yanaijie@huawei.com
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit 1b007f96f9e063f9f0b93597a4089114a89c1854 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8958 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 22:03:28 +00:00
Bart Van Assche
a0c11c0790
scsi: qla2xxx: Fix failure message in qlt_disable_vha()
...
The following sequence of commands result in an incorrect failure message
being printed:
echo 0x7fffffff > /sys/module/qla2xxx/parameters/logging
modprobe target_core_mod
modprobe tcm_qla2xxx
mkdir /sys/kernel/config/target/qla2xxx
mkdir /sys/kernel/config/target/qla2xxx/<port-name>
mkdir /sys/kernel/config/target/qla2xxx/<port-name>/tpgt_1
echo 1 > /sys/kernel/config/target/qla2xxx/<port-name>/tpgt_1/enable
echo 0 > /sys/kernel/config/target/qla2xxx/<port-name>/tpgt_1/enable
qla2xxx [0001:00:02.0]-e881:1: qla2x00_wait_for_hba_online() failed
The reason of this message is the QLA_FUNCTION_FAILED code that
qla2x00_wait_for_hba_online() returns. However, qlt_disable_vha() expects
that adapter is offlined and QLA_FUNCTION_FAILED informs about the offline
state of the adapter.
The qla2x00_abort_isp() function finishes the execution at the point of
checking the adapter's mode (for example, qla_tgt_mode_enabled()) because
of the qlt_disable_vha() calls qlt_clear_mode() method. It means that
qla2x00_abort_isp() keeps vha->flags.online is equal to zero. Finally,
qla2x00_wait_for_hba_online() checks the state of this flag and returns
QLA_FUNCTION_FAILED error code.
This patch changes the failure message which informs about adapter's
offline state.
Link: https://lore.kernel.org/r/3cd0bbf3599c53b0c2a7184582d705d8b8052c8b.camel@yadro.com
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Viacheslav Dubeyko <v.dubeiko@yadro.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit 6b3d16f9875e181412401b8ab445dce83bd6fedc upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8957 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 22:01:04 +00:00
Bart Van Assche
0f40406997
scsi: qla2xxx: Fix warning after FC target reset
...
Currently, FC target reset finishes with the warning message:
------------[ cut here ]------------
WARNING: CPU: 238 PID: 279973 at ../drivers/scsi/qla2xxx/qla_target.c:6644 qlt_enable_vha+0x1d0/0x260 [qla2xxx]
Supported: Yes, External
CPU: 238 PID: 279973 Comm: bash Tainted: G OE 4.12.14-197.29-default #1 SLE15-SP1
task: c000000a104c0000 task.stack: c000000b52188000
NIP: d00000001ffd7f78 LR: d00000001ffd7f6c CTR: c0000000001676c0
REGS: c000000b5218b910 TRAP: 0700 Tainted: G OE (4.12.14-197.29-default)
Call Trace:
qlt_enable_vha+0x1c4/0x260 [qla2xxx] (unreliable)
tcm_qla2xxx_tpg_enable_store+0xc4/0x130 [tcm_qla2xxx]
configfs_write_file+0xd0/0x190 [configfs]
__vfs_write+0x3c/0x1e0
vfs_write+0xd8/0x220
SyS_write+0x6c/0x110
system_call+0x3c/0x130
---[ end trace e32abaf6e6fee826 ]---
Link: https://lore.kernel.org/r/1d7b21bf9f7676643239eb3d60eaca7cfa505cf0.camel@yadro.com
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com >
Signed-off-by: Viacheslav Dubeyko <v.dubeiko@yadro.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit f839544ccff60cbe534282aac68858fc3fb278ca upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8956 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 21:59:55 +00:00
Bart Van Assche
953106bb07
Merge branch 'svn-trunk'
2020-05-23 10:24:19 -07:00
Bart Van Assche
8a393a319b
scst: Port to Linux kernel v5.8
...
Flag RQF_COPY_USER has been removed from kernel v5.8. Since that flag
only controls padding that we don't need, do not set that flag. See also
Linux kernel commit f18573abcc57 ("block: move the padding adjustment to
blk_rq_map_sg") # v2.6.26.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8955 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 17:24:09 +00:00
Bart Van Assche
75d059e9f0
iscsi-scstd: Fix a gcc 10 compiler warning
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8954 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 17:14:21 +00:00