Commit Graph

7036 Commits

Author SHA1 Message Date
Bart Van Assche
3922313aa5 qla2x00t-32gbit: Fix I/O failures during remote port toggle testing
Driver was using a lower value for dev_loss_tmo making it more prone to I/O
failures during remote port toggle testing. Set dev_loss_tmo to zero during
remote port registration to allow nvme-fc default dev_loss_tmo to be used,
which is higher than what driver was using.

Link: https://lore.kernel.org/r/20200904045128.23631-2-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Arun Easi <aeasi@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit dd8d0bf6fb72bc73dc534d0d222e769e71d2202c.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9255 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 19:17:45 +00:00
Bart Van Assche
f7e687cf28 qla2x00t-32gbit: Convert to SPDX license identifiers
All files in this driver directory contain the following notice:

  See LICENSE.qla2xxx for copyright and licensing details.

LICENSE.qla2xxx can be found in Documentation/scsi/. The file contains:

  - A copyright notice

    This copyright notice is redundant as all files contain the same
    copyright notice already

  - A license notice

    You may modify and redistribute the device driver code under the
    GNU General Public License (a copy of which is attached hereto as
    Exhibit A) published by the Free Software Foundation (version 2).

    This can be replaced with the corresponding SPDX license identifier
    (GPL-2.0-only) in the source files which reference this license
    file.

  - The full GPLv2 license text

    A redundant copy of LICENSES/preferred/GPL-2.0

Remove the notices and add the SPDX license identifier GPL-2.0-only to the
source files.

Finally remove the now redundant LICENSE.qla2xxx file.

Reviewed-by: Richard Fontana <rfontana@redhat.com>
Reviewed-by: Jilayne Lovejoy <opensource@jilayne.com>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Acked-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Acked-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

See also upstream commit 77adf3f01bf7a48eb27a466ac4d14f410b80afc1.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9254 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 19:14:28 +00:00
Bart Van Assche
faccc547b8 qla2x00t-32gbit: Remove unneeded variable 'rval'
This addresses the following coccinelle warning:

drivers/scsi/qla2xxx/qla_init.c:7112:5-9: Unneeded variable: "rval".
Return "QLA_SUCCESS" on line 7115

Link: https://lore.kernel.org/r/20200911091021.2937708-1-yanaijie@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit 34eb5ccf35daea082b6bc3857f82f23155fb266f.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9253 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 19:12:14 +00:00
Bart Van Assche
5d0620470c qla2x00t-32gbit: Handle incorrect entry_type entries
It was observed on an ISP8324 16Gb HBA with fw=8.08.203 (d0d5) in a
PowerPC64 machine that pkt->entry_type was MBX_IOCB_TYPE/0x39 with an
sp->type SRB_SCSI_CMD which is invalid and should not be possible.

Reading the entry_type from the crash dump shows the expected value of
STATUS_TYPE/0x03 but the call trace shows that qla24xx_mbx_iocb_entry() is
used.

Add a check to verify for consistency and reset the HBA if an invalid state
is reached. Obviously, this is only a workaround until the real problem is
solved.

Link: https://lore.kernel.org/r/20200908081516.8561-5-dwagner@suse.de
Reviewed-by: Arun Easi <aeasi@marvell.com>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit 31a3271ff11badc50d6dc0efb4da393e4c3bf388.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9252 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 19:11:15 +00:00
Bart Van Assche
6fdda1cbc8 qla2x00t-32gbit: Log calling function name in qla2x00_get_sp_from_handle()
Commit 7c3df1320e5e ("[SCSI] qla2xxx: Code changes to support new dynamic
logging infrastructure.") removed the use of the func argument. Let's add
it back.

Link: https://lore.kernel.org/r/20200908081516.8561-4-dwagner@suse.de
Reviewed-by: Arun Easi <aeasi@marvell.com>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit 7d88d5dff95f929e94b9d6425f699eba22e47444.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9251 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 19:10:35 +00:00
Bart Van Assche
6c052abd82 qla2x00t-32gbit: Simplify return value logic in qla2x00_get_sp_from_handle()
Refactor qla2x00_get_sp_from_handle() to avoid the unnecessary goto if
early returns are used. With this we can also avoid preinitialzing the sp
pointer.

Link: https://lore.kernel.org/r/20200908081516.8561-3-dwagner@suse.de
Reviewed-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Arun Easi <aeasi@marvell.com>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit 622299f16f33852baddf94b32bc80e2c1e24c39a.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9250 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 19:09:41 +00:00
Bart Van Assche
9f3d3f4cad qla2xxx-32gbit: Warn if done() or free() are called on an already freed srb
Emit a warning when ->done or ->free are called on an already freed
srb. There is a hidden use-after-free bug in the driver which corrupts
the srb memory pool which originates from the cleanup callbacks.

An extensive search didn't bring any lights on the real problem. The
initial fix was to set both pointers to NULL and try to catch invalid
accesses. But instead the memory corruption was gone and the driver
didn't crash. Since not all calling places check for NULL pointer, add
explicitly default handlers. With this we workaround the memory
corruption and add a debug help.
    
Link: https://lore.kernel.org/r/20200908081516.8561-2-dwagner@suse.de
Reviewed-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Arun Easi <aeasi@marvell.com>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit c0014f94218ea3a312f6235febea0d626c5f2154.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9249 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 19:08:48 +00:00
Bart Van Assche
93474d5f29 qla2x00t-32gbit: Fix the return value
A negative error code should be returned.

Link: https://lore.kernel.org/r/20200829075746.19166-1-tian.xianting@h3c.com
Acked-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Xianting Tian <tian.xianting@h3c.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit e5f48ac42cc9 ("scsi: qla2xxx: Fix the return value").



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9248 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 17:59:51 +00:00
Bart Van Assche
7e12fdac01 qla2x00t-32gbit: Minimize diffs with the upstream code
See also upstream commit 62e9dd177732 ("scsi: qla2xxx: Change in PUREX to
handle FPIN ELS requests").



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9247 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 17:54:03 +00:00
Bart Van Assche
f55541409c www: Fix HTML syntax
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9246 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-23 03:29:58 +00:00
Bart Van Assche
ba5d3e94b9 www: Add more information about the SRP target driver
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9245 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-23 03:22:21 +00:00
Bart Van Assche
53cbbb2c94 www: Update the information about the SRP target driver
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9244 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-23 03:01:52 +00:00
Bart Van Assche
3b5f4e54da www: Remove information about target drivers that have been removed
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9243 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-23 02:55:47 +00:00
Bart Van Assche
ad3c9e0071 www/downloads.html: Update latest release information
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9242 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-23 02:48:12 +00:00
Bart Van Assche
20e1827d54 Makefile: Add a target for building a single release archive
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9241 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-23 02:36:20 +00:00
Bart Van Assche
ead177f479 SVN_TAGS: Add information about the 3.5.0 release
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9240 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-22 23:57:45 +00:00
Bart Van Assche
7c294b7648 scst/ChangeLog: Mention the qla2x00t-32gbit driver
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9238 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-22 23:53:40 +00:00
Bart Van Assche
21ea12d0de scstadmin: Fix the release-archive Makefile target
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9237 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-22 23:50:48 +00:00
Bart Van Assche
6ee007cb6e qla2x00t-32gbit: Fix the release-archive Makefile target
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9236 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-22 23:50:27 +00:00
Bart Van Assche
3885ef5ef7 qla2x00t-32gbit: Add a version number
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9235 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-22 23:48:48 +00:00
Bart Van Assche
71e25520ee scst/Makefile: Remove a superfluous backslash
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9234 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-22 23:46:25 +00:00
Bart Van Assche
0b3aad05f5 scripts/update-version: Also update the qla2x00t-32gbit version number
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9233 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-22 23:45:42 +00:00
Bart Van Assche
ed38dccfb4 scst/ChangeLog: Document that RHEL / CentOS 8.3 is supported
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9232 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-22 22:47:05 +00:00
Bart Van Assche
d3c92ea7aa Bump the version number to 3.5.0
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9231 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-22 03:38:21 +00:00
Bart Van Assche
e3c8aedb2c scst_event: Fix the code that copies the CDB of the command to be aborted
I came across this accidentally while looking up the users of the
cmd_to_abort pointer.

Fixes: 297d268a7a ("SCST events infrastructure"; r6574)



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9230 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-21 23:58:29 +00:00
Bart Van Assche
5826f2c8de scst: Fix two bugs in error paths
Wait for percpu_ref_kill() to finish before calling percpu_ref_exit().
This patch fixes the following complaint:

WARNING: CPU: 7 PID: 56710 at lib/percpu-refcount.c:110 percpu_ref_exit+0x28/0x30
RIP: 0010:percpu_ref_exit+0x28/0x30
Call Trace:
 scst_free_device+0x89/0x120 [scst]
 scst_register_virtual_device_node+0x27a/0x4f0 [scst]
 vdisk_add_blockio_device+0x1fa/0x3d0 [scst_vdisk]
 scst_devt_mgmt_store_work_fn+0x21b/0x2d0 [scst]
 sysfs_work_thread_fn+0xef/0x400 [scst]
 kthread+0x112/0x130

Fixes: c5ff6adeae ("Fix unloading of scst_vdisk while I/O is ongoing"; r9048)



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9229 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-21 22:06:06 +00:00
Bart Van Assche
e3d187f6af scripts/kernel-functions: Apply kernel patches more selectively
Only try to apply kernel patches that should apply such that 'patch' does
not report any error messages that some patches fail to apply.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9228 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-21 20:56:58 +00:00
Bart Van Assche
cf4a11725a scst: Unbreak the non-RHEL build
This patch is a fix for r9221.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9227 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-21 19:54:08 +00:00
Bart Van Assche
ff294b83e7 qla2x00t: Build fix for RHEL / CentOS 8.3
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9226 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-21 19:21:28 +00:00
Bart Van Assche
8ddd93ee2a scripts/kernel-functions: Remove an UEK R4 patch
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9225 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-20 22:16:51 +00:00
Bart Van Assche
22952ce0a2 nightly build: Remove UEK R4
SCST does not build against UEK R4.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9224 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-20 21:51:19 +00:00
Bart Van Assche
21c519918d regression tests: Disable branch profiling in the kernel configuration
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9223 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-20 21:41:19 +00:00
Bart Van Assche
245920e759 nightly build: Add the CentOS 8.3 kernel
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9222 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-20 04:26:58 +00:00
Bart Van Assche
5f2e23c23b scst, scst_local: Port to RHEL / CentOS 8.3
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9221 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-20 04:26:40 +00:00
Bart Van Assche
ab65209f50 scripts/run-regression-tests: Improve support for UEK kernels
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9220 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-20 02:40:29 +00:00
Bart Van Assche
81ecb3bd6a scripts: Remove all references to the mpt driver
Additionally, make scripts/run-regression-tests build the qla2x00t-32gbit
driver.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9219 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-20 02:39:11 +00:00
Bart Van Assche
5e2e7bca82 scripts/run-regression-tests: More Linux kernel v5.10 fixes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9218 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-20 02:22:47 +00:00
Bart Van Assche
6c37ea9023 scripts/run-regression-tests: Fix the build against Linux kernel v5.10
From the Linux kernel help text:

  modules_prepare - Set up for building external modules


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9217 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-20 02:16:20 +00:00
Bart Van Assche
e1f9a517c8 Port Kconfig files to kernel v5.9
Change '---help---' into 'help'. See also Linux kernel commit f70f74d15ca8
("kconfig: remove '---help---' support") # v5.9.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9216 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-20 02:07:40 +00:00
Bart Van Assche
7657f17bf5 scripts/kernel-functions: Source code cleanup
Fix a few shellcheck warnings, swap two if-statements and add a few comments.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9215 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-20 00:59:42 +00:00
Bart Van Assche
5a1f212ce6 nightly build: Include the Oracle UEK kernel
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9214 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-19 17:51:00 +00:00
Bart Van Assche
6c47d7332d scst_pres: Revert r9114
In contrast with the description of that commit, commit r9114 changes the
functionality of the scst_pres code. Hence revert that commit.

Reported-by: Chesnokov Gleb <Chesnokov.G@raidix.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9213 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-17 19:53:46 +00:00
Bart Van Assche
a7cf961c4a scst/ChangeLog: Document supported kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9212 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-15 05:01:00 +00:00
Bart Van Assche
9a7f099e14 ChangeLog: Summarize v3.5 changes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9211 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-14 04:07:56 +00:00
Vladislav Bolkhovitin
dc1e3d786a Problem statement: Applications that are capable of running as Fibre
Transport Target mode server need to able to function when running in
containerized form factor in a secure and multi-tenant platform.

Solution: Such applications when containerized can run in any container
based platform such as Kubernetes/OpenShift or a custom one. These
applications are generic in nature and all they need is access  to SCST
user storage device driver (/dev/scst_user). The security policy of the
platform may not allow these applications to manage Fibre Channel (FC)
port and /sys file-system. The platform, however, can manage the FC ports
on behalf of these applications. The containerized applications can
remain generic in nature and run on any containerized platforms. The
sequence of operations would be 1. The platform converts the desired FC
ports to target mode prior to starting the containerized application 2.
The application does device registration using exported the SCST user
storage device driver 3. The platform, at this point, asynchronously adds
FC port LUNs to the user device registered by the application. As the
application inside the container can auto or manual restart
asynchronously, the platform would add the LUNs every time the
application does device registration.
 
Patch description: The SCST event mechanism is leveraged to achieve the
asynchronous LUN additions when application does device registration. The
current set of SCST events is extended to send a new event whenever there
is a virtual user device registration happens. The platform can watch for
the specific event and make business logic decisions to allow target mode
applications function securely. By extending the set of event, the SCST
module will be friendly to containerized applications and platforms.

Signed-off-by: Vikas Goel <vikas.goel@veritas.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9210 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-08 17:06:40 +00:00
Bart Van Assche
d10a7bf5d5 Restore support for building with clang
The previous commit removed support for building with clang. Restore support
for building with clang without breaking cross-compilation support.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9209 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-05 21:23:17 +00:00
Bart Van Assche
8eb850acce Revert "Make it possible to build SCST with clang"
Since commit ecea60a694 breaks cross-compilation, revert it.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9208 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-05 18:39:38 +00:00
Bart Van Assche
f9ea2bdc4d nightly build: Add the CentOS 8.2 baseline kernel
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9198 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-02 18:00:22 +00:00
Bart Van Assche
a673470ce3 scst, iscsi-scst: Use struct kvec instead of struct iovec for kernel data
This patch does not change any functionality but removes multiple __force
__user casts.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9197 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-11-27 03:45:16 +00:00
Bart Van Assche
02f350c8a7 scst_vdisk: Rename vdisk_alloc_iv() into vdisk_alloc_sync_kvec()
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9196 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-11-27 03:26:50 +00:00