Bart Van Assche
e675bc7b0a
qla2x00t-32gbit: SAN congestion management implementation
...
* Firmware Initialization with SCM enabled based on NVRAM setting and
firmware support (About Firmware).
* Enable PUREX and add support for fabric performance impact
notification (FPIN) handling.
* Allocate a default PUREX item for each vha to handle memory allocation
failures in ISR.
Link: https://lore.kernel.org/r/20200630102229.29660-3-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Reviewed-by: James Smart <james.smart@broadcom.com >
Signed-off-by: Shyam Sundar <ssundar@marvell.com >
Signed-off-by: Arun Easi <aeasi@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
See also commit 9f2475fe7406b8ef5f97099c4980021344872d9f upstream.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9072 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-25 14:37:22 +00:00
Bart Van Assche
786c8d6fd3
qla2x00t-32gbit: Change in PUREX to handle FPIN ELS requests
...
SAN Congestion Management generates ELS pkts whose size can vary and be >
64 bytes. Change the PUREX handling code to support non-standard ELS pkt
size.
Link: https://lore.kernel.org/r/20200630102229.29660-2-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Shyam Sundar <ssundar@marvell.com >
Signed-off-by: Arun Easi <aeasi@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
See also commit 62e9dd177732843ae6c5b9d2ed61e7c9538fa276 upstream.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9071 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-25 14:35:24 +00:00
Bart Van Assche
977661eb0e
qla2x00t-32gbit: Introduce a function for computing the debug message prefix
...
Instead of repeating the code for generating a debug message prefix six
times, introduce a function for computing the debug message prefix.
Link: https://lore.kernel.org/r/20200629225454.22863-10-bvanassche@acm.org
Cc: Nilesh Javali <njavali@marvell.com >
Cc: Quinn Tran <qutran@marvell.com >
Cc: Himanshu Madhani <himanshu.madhani@oracle.com >
Cc: Martin Wilck <mwilck@suse.com >
Cc: Roman Bolshakov <r.bolshakov@yadro.com >
Reviewed-by: Daniel Wagner <dwagner@suse.de >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
See also upstream commit e7019c95c40daf8e8a9fa1d5f36eabce2eb8ef6b.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9070 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-25 14:29:24 +00:00
Bart Van Assche
38ed627b73
qla2x00t-32gbit: Make qla2x00_restart_isp() easier to read
...
Instead of using complicated control flow to only have one return statement
at the end of qla2x00_restart_isp(), return an error status as soon as it
is known that this function will fail.
Link: https://lore.kernel.org/r/20200629225454.22863-9-bvanassche@acm.org
Cc: Nilesh Javali <njavali@marvell.com >
Cc: Quinn Tran <qutran@marvell.com >
Cc: Himanshu Madhani <himanshu.madhani@oracle.com >
Cc: Martin Wilck <mwilck@suse.com >
Cc: Roman Bolshakov <r.bolshakov@yadro.com >
Reviewed-by: Daniel Wagner <dwagner@suse.de >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
See also commit f85a299f5ec55c82403cd2bc4aeaaedebfcf5ef6 upstream.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9069 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-25 14:22:07 +00:00
Bart Van Assche
b7f0ee3cde
qla2x00t-32gbit: Fix a Coverity complaint in qla2100_fw_dump()
...
'cnt' can exceed the size of the risc_ram[] array. Prevent that Coverity
complains by rewriting an address calculation expression. This patch fixes
the following Coverity complaint:
CID 337803 (#1 of 1): Out-of-bounds read (OVERRUN)
109. overrun-local: Overrunning array of 122880 bytes at byte offset 122880
by dereferencing pointer &fw->risc_ram[cnt].
Link: https://lore.kernel.org/r/20200629225454.22863-8-bvanassche@acm.org
Cc: Nilesh Javali <njavali@marvell.com >
Cc: Quinn Tran <qutran@marvell.com >
Cc: Himanshu Madhani <himanshu.madhani@oracle.com >
Cc: Martin Wilck <mwilck@suse.com >
Cc: Roman Bolshakov <r.bolshakov@yadro.com >
Reviewed-by: Daniel Wagner <dwagner@suse.de >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
See also commit 57fec9f24e580d8fe4219ee89572f49758e62c75 upstream.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9068 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-25 14:21:25 +00:00
Bart Van Assche
41d7c4e1fd
qla2x00t-32gbit: Make __qla2x00_alloc_iocbs() initialize 32 bits of request_t.handle
...
The request_t 'handle' member is 32-bits wide, hence use wrt_reg_dword().
Change the cast in the wrt_reg_byte() call to make it clear that a regular
pointer is casted to an __iomem pointer.
Note: 'pkt' points to I/O memory for the qlafx00 adapter family and to
coherent memory for all other adapter families.
This patch fixes the following Coverity complaint:
CID 358864 (#1 of 1): Reliance on integer endianness (INCOMPATIBLE_CAST)
incompatible_cast: Pointer &pkt->handle points to an object whose effective
type is unsigned int (32 bits, unsigned) but is dereferenced as a narrower
unsigned short (16 bits, unsigned). This may lead to unexpected results
depending on machine endianness.
Link: https://lore.kernel.org/r/20200629225454.22863-7-bvanassche@acm.org
Fixes: 8ae6d9c7eb10 ("[SCSI] qla2xxx: Enhancements to support ISPFx00.")
Cc: Nilesh Javali <njavali@marvell.com >
Cc: Quinn Tran <qutran@marvell.com >
Cc: Himanshu Madhani <himanshu.madhani@oracle.com >
Cc: Martin Wilck <mwilck@suse.com >
Cc: Roman Bolshakov <r.bolshakov@yadro.com >
Reviewed-by: Daniel Wagner <dwagner@suse.de >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
See also commit f8f12bda53eae87ca2dea42b36d19e48c9851b9f upstream.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9067 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-25 14:20:47 +00:00
Bart Van Assche
82ae3e17f4
qla2x00t-32gbit: Remove a superfluous cast
...
Remove an unnecessary cast because it prevents the compiler to perform type
checking.
Link: https://lore.kernel.org/r/20200629225454.22863-6-bvanassche@acm.org
Cc: Nilesh Javali <njavali@marvell.com >
Cc: Quinn Tran <qutran@marvell.com >
Cc: Himanshu Madhani <himanshu.madhani@oracle.com >
Cc: Martin Wilck <mwilck@suse.com >
Cc: Roman Bolshakov <r.bolshakov@yadro.com >
Reviewed-by: Daniel Wagner <dwagner@suse.de >
Reviewed-by: Shyam Sundar <ssundar@marvell.com >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
See also commit 9bb013584a5ea18dfae89e33ded130cae08eb135 upstream.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9066 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-25 14:19:55 +00:00
Bart Van Assche
6c298568e9
qla2x00t-32gbit: Initialize 'n' before using it
...
The following code:
qla82xx_rom_fast_read(ha, 0, &n)
only initializes 'n' if it succeeds. Since 'n' may be reported in a debug
message even if no ROM reads succeeded, initialize 'n' to zero.
This patch fixes the following sparse warning:
qla_nx.c:1218: qla82xx_pinit_from_rom() error: uninitialized symbol 'n'.
Link: https://lore.kernel.org/r/20200629225454.22863-5-bvanassche@acm.org
Cc: Nilesh Javali <njavali@marvell.com >
Cc: Quinn Tran <qutran@marvell.com >
Cc: Himanshu Madhani <himanshu.madhani@oracle.com >
Cc: Martin Wilck <mwilck@suse.com >
Cc: Roman Bolshakov <r.bolshakov@yadro.com >
Reviewed-by: Daniel Wagner <dwagner@suse.de >
Reviewed-by: Shyam Sundar <ssundar@marvell.com >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
See also commit 67668b5b13c7ba12f212d4b9067e54354ce5360b upstream.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9065 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-25 14:19:14 +00:00
Bart Van Assche
247d6d88b6
qla2x00t-32gbit: Make qla82xx_flash_wait_write_finish() easier to read
...
Return early instead of having a single return statement at the end of this
function. This patch fixes the following sparse warning:
qla_nx.c:1018: qla82xx_flash_wait_write_finish() error: uninitialized symbol 'val'.
Link: https://lore.kernel.org/r/20200629225454.22863-4-bvanassche@acm.org
Cc: Nilesh Javali <njavali@marvell.com >
Cc: Quinn Tran <qutran@marvell.com >
Cc: Himanshu Madhani <himanshu.madhani@oracle.com >
Cc: Martin Wilck <mwilck@suse.com >
Cc: Roman Bolshakov <r.bolshakov@yadro.com >
Reviewed-by: Daniel Wagner <dwagner@suse.de >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
See also commit 2f91a0a03c2da5140994d7b3d53469d07df9943c upstream.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9064 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-25 14:18:32 +00:00
Bart Van Assche
9c1c5315fa
qla2x00t-32gbit: Remove the __packed annotation from struct fcp_hdr and fcp_hdr_le
...
Remove the __packed annotation from struct fcp_hdr* because that annotation
is not necessary for these data structures.
Link: https://lore.kernel.org/r/20200629225454.22863-3-bvanassche@acm.org
Cc: Nilesh Javali <njavali@marvell.com >
Cc: Quinn Tran <qutran@marvell.com >
Cc: Himanshu Madhani <himanshu.madhani@oracle.com >
Cc: Martin Wilck <mwilck@suse.com >
Cc: Roman Bolshakov <r.bolshakov@yadro.com >
Reviewed-by: Daniel Wagner <dwagner@suse.de >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
See also commit f1e12bee55e6eb28a53662765d5d2d96fa0247b1 upstream.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9063 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-25 14:17:48 +00:00
Bart Van Assche
acb9ee4f23
qla2x00t-32gbit: replace '---help---' in Kconfig files with 'help'
...
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org >
See also commit a7f7f6248d9740d710fd6bd190293fe5e16410ac upstream.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9062 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-25 14:16:38 +00:00
Bart Van Assche
34ca359894
qla2x00t-32gbit: Fix spelling of the word 'descriptor'
...
Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
See also commit 0a19a725c0ede422e8510283c0c08e1a8f5b3486 upstream.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9061 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-25 14:15:50 +00:00
Bart Van Assche
8a22ef6289
ib_srpt, iscsi-scst: Port to Linux kernel v5.8
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9060 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-25 14:09:23 +00:00
Bart Van Assche
64276e3dfb
Rename the iSCSI kernel module Makefiles into Kbuild
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9059 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-25 14:04:21 +00:00
Bart Van Assche
502355bc8d
srpt/Makefile: Revert a change that has been checked in accidentally
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9058 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-19 02:58:08 +00:00
Bart Van Assche
0a0a1bebe1
Ignore */conftest/*/build-output*.txt files
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9057 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-19 02:55:33 +00:00
Bart Van Assche
65d05a86d5
ib_srpt: Fix ARM compilation
...
The first argument of do_div() must have type uint64_t on the ARM architecture.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9056 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-19 01:26:37 +00:00
Bart Van Assche
a7446766c5
isert-scst Makefile: Add the SCST Module.symvers file
...
This patch fixes a linker error when cross-compiling for ARM on x86_64.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9055 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-19 01:19:49 +00:00
Bart Van Assche
7569ddaf2e
Makefiles: Remove -Wextra
...
Since not all kernel header files are compatible with -Wextra, remove -Wextra.
To enable -Wextra, build SCST with W=1.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9054 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-19 01:18:24 +00:00
Bart Van Assche
f3cbdcea03
scst.spec.in: Set ${KDIR} and ${KVER} correctly
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9053 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-19 01:16:24 +00:00
Bart Van Assche
cf909e3e16
Makefiles: If both KDIR and KVER have been set, preserve KDIR
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9052 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-19 00:00:49 +00:00
Bart Van Assche
52ee6089f5
Document how to cross-compile SCST
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9051 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-18 23:59:34 +00:00
Bart Van Assche
c5ff6adeae
Fix unloading of scst_vdisk while I/O is ongoing
...
Call scst_free_device() directly instead of when the final dev->refcnt
put happens. Call scst_assign_dev_handler(dev, &scst_null_devtype) after
processing of I/O commands for 'dev' has finished. Hold the RCU read lock
while invoking percpu_ref_get(&dev->refcnt) in the LUN translation code.
This patch fixes the following crash when scst_vdisk is unloaded while I/O
is ongoing:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000368
IP: [<ffffffffc09a80b3>] blockio_exec+0x43/0x250 [scst_vdisk]
[<ffffffffc14fea1b>] scst_do_real_exec+0x5b/0x240 [scst]
[<ffffffffc150172f>] scst_exec_check_blocking+0x12f/0x250 [scst]
[<ffffffffc1503791>] scst_process_active_cmd+0x91/0x1640 [scst]
Fixes: 3f2d50b589 ("scst: Do not suspend command processing when deleting a device")
Reported-by: Rongqing Tu <rongqing.tu@hpe.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9048 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-12 23:35:03 +00:00
Bart Van Assche
34de8cd104
scst: Introduce a local variable
...
This patch does not change any functionality.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9047 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-12 23:32:00 +00:00
Bart Van Assche
c7788ee7ac
/etc/init.d/scst: Unload target modules first
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9046 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-12 23:31:34 +00:00
Bart Van Assche
fd059b135f
Fix handling of MODE SENSE commands in scst_pre_dev_done()
...
Report the "write protect" flag correctly for read-only devices.
Reported-by: Krzysztof Rusek <rusek@9livesdata.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9043 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-08 14:15:20 +00:00
Bart Van Assche
4b5d66239e
scst/include/backport.h: Improve the percpu-refcount backport further
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9042 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-05 02:26:59 +00:00
Bart Van Assche
30b8e13581
fcst/Makefile_in-tree: Remove this file since it has been renamed into fcst/Kbuild
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9041 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-05 02:23:45 +00:00
Bart Van Assche
6f49179491
Makefiles: Use -Wextra instead of -W
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9040 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-05 02:14:28 +00:00
Bart Van Assche
d6fd03107f
Split Makefiles: move kernel build rules into Kbuild files
...
This patch makes the Makefiles easier to read.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9039 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-05 02:13:40 +00:00
Bart Van Assche
47403656ee
Make 'make clean' remove all build files
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9038 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-05 02:08:55 +00:00
Bart Van Assche
212fd12cba
iscsi-scst, srpt: Improve run_conftest
...
Add -Wno-deprecated-declarations to the compiler flags for RHEL and CentOS.
Save the output of the build process such that it can be inspected easily.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9037 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-05 02:06:21 +00:00
Bart Van Assche
2650ab25f9
scst/include/backport.h: Fix the network namespace backport
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9036 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-05 02:02:38 +00:00
Bart Van Assche
8383e47f25
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9035 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-29 15:25:07 +00:00
Bart Van Assche
ffabb52e9b
scripts/specialize-patch: Strip trailing whitespace
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9034 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-29 15:15:55 +00:00
Bart Van Assche
bb43fbc468
scst/src/Makefile: Run /usr/sbin/weak-modules --remove-kernel before install
...
Apparently RHEL 8 / CentOS 8 create soft links in the weak-modules to SCST
directory but do not update these links correctly after having upgraded to
a newer kernel version and after having reinstalled SCST. Hence remove all
weak module links before installing SCST.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9033 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-21 16:31:59 +00:00
Bart Van Assche
a79655c1eb
scst/include/backport.h: Improve kobj_ns_grab_current() backport
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9032 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-21 16:28:01 +00:00
Bart Van Assche
f8ea030ee1
scst/include/backport.h: Backport more percpu_ref functionality
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9031 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-21 16:27:28 +00:00
Bart Van Assche
7ecad01e71
scst, percpu_ref backport: For older kernels, use atomic instead of atomic_long
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9030 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-21 16:27:05 +00:00
Bart Van Assche
bfbc3ac6e7
scripts/specialize-patch: Improve RHEL / CentOS support
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9029 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-21 16:08:48 +00:00
Bart Van Assche
09d4e1e443
scripts/kernel-functions: Improve gcc 10 support
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9028 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-21 16:08:22 +00:00
Bart Van Assche
8174bad3da
scripts/kernel-functions: Make it possible to build older kernels with gcc 10
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9027 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-21 16:07:16 +00:00
Bart Van Assche
f7b704ee99
scst, iscsi-scst: Port to RHEL / CentOS 8.2
...
Apparently the Linux kernel v4.20 iov_iter_kvec() function has been
backported to RHEL / CentOS 8.2. This patch fixes the following kernel
warning:
WARNING: CPU: 26 PID: 21141 at lib/iov_iter.c:1083 iov_iter_kvec+0x25/0x30
Call Trace:
fileio_exec_async+0x216/0x3a0 [scst_vdisk]
fileio_exec_write+0x3b9/0x450 [scst_vdisk]
vdev_do_job+0x34/0xc0 [scst_vdisk]
scst_do_real_exec+0x54/0x100 [scst]
scst_exec_check_blocking+0xbb/0x210 [scst]
scst_process_active_cmd+0x64d/0x1550 [scst]
scst_cmd_thread+0x170/0x5a0 [scst]
kthread+0x112/0x130
ret_from_fork+0x35/0x40
See also https://github.com/bvanassche/scst/issues/26 .
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9026 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-17 01:35:53 +00:00
Bart Van Assche
39735956c7
nightly build: Add RHEL / CentOS 8.2 kernel
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9025 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-17 01:33:18 +00:00
Bart Van Assche
de023fe1fe
scst/include/backport.h: Fix the build against CentOS 8.2
...
See also https://github.com/bvanassche/scst/issues/25 .
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9024 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-16 17:39:35 +00:00
Bart Van Assche
6327055e26
INSTALL.md: Remove trailing whitespace
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9023 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-16 17:39:09 +00:00
Bart Van Assche
3a957d352a
qla2xxx: Do not log message when reading port speed via sysfs
...
Calling ql_log() inside qla2x00_port_speed_show() is causing messages to be
output to the console for no particularly good reason. The sysfs read
routine should just return the information to userspace. The only reason
to log a message is when the port speed actually changes, and this already
occurs elsewhere.
Link: https://lore.kernel.org/r/20200504175416.15417-1-emilne@redhat.com
Fixes: 4910b524ac9e ("scsi: qla2xxx: Add support for setting port speed")
Cc: <stable@vger.kernel.org > # v5.1+
Reviewed-by: Lee Duncan <lduncan@suse.com >
Reviewed-by: Laurence Oberman <loberman@redhat.com >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Ewan D. Milne <emilne@redhat.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit fb9024b0646939e59d8a0b6799b317070619795a upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9022 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-13 17:42:10 +00:00
Bart Van Assche
703b35fcbe
qla2xxx: Delete all sessions before unregister local nvme port
...
Delete all sessions before unregistering local nvme port. This allows nvme
layer to decrement all active rport count down to zero. Once the count is
down to zero, nvme would call qla to continue with the npiv port deletion.
PID: 27448 TASK: ffff9e34b777c1c0 CPU: 0 COMMAND: "qaucli"
0 [ffff9e25e84abbd8] __schedule at ffffffff977858ca
1 [ffff9e25e84abc68] schedule at ffffffff97785d79
2 [ffff9e25e84abc78] schedule_timeout at ffffffff97783881
3 [ffff9e25e84abd28] wait_for_completion at ffffffff9778612d
4 [ffff9e25e84abd88] qla_nvme_delete at ffffffffc0e3024e [qla2xxx]
5 [ffff9e25e84abda8] qla24xx_vport_delete at ffffffffc0e024b9 [qla2xxx]
6 [ffff9e25e84abdf0] fc_vport_terminate at ffffffffc011c247 [scsi_transport_fc]
7 [ffff9e25e84abe28] store_fc_host_vport_delete at ffffffffc011cd94 [scsi_transport_fc]
8 [ffff9e25e84abe70] dev_attr_store at ffffffff974b376b
9 [ffff9e25e84abe80] sysfs_kf_write at ffffffff972d9a92
10 [ffff9e25e84abe90] kernfs_fop_write at ffffffff972d907b
11 [ffff9e25e84abec8] vfs_write at ffffffff9724c790
12 [ffff9e25e84abf08] sys_write at ffffffff9724d55f
13 [ffff9e25e84abf50] system_call_fastpath at ffffffff97792ed2
RIP: 00007fc0bd81a6fd RSP: 00007ffff78d9648 RFLAGS: 00010202
RAX: 0000000000000001 RBX: 0000000000000022 RCX: 00007ffff78d96e0
RDX: 0000000000000022 RSI: 00007ffff78d94e0 RDI: 0000000000000008
RBP: 00007ffff78d9440 R8: 0000000000000000 R9: 00007fc0bd48b2cd
R10: 0000000000000017 R11: 0000000000000293 R12: 0000000000000000
R13: 00005624e4dac840 R14: 00005624e4da9a10 R15: 0000000000000000
ORIG_RAX: 0000000000000001 CS: 0033 SS: 002b
Link: https://lore.kernel.org/r/20200331104015.24868-4-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Quinn Tran <qutran@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit c48f849d3f7a4ec1025105f446e29d395c4dcc2f upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9021 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-13 17:41:34 +00:00
Bart Van Assche
6bbee1b222
qla2xxx: Fix hang when issuing nvme disconnect-all in NPIV
...
In NPIV environment, a NPIV host may use a queue pair created by base host
or other NPIVs, so the check for a queue pair created by this NPIV is not
correct, and can cause an abort to fail, which in turn means the NVME
command not returned. This leads to hang in nvme_fc layer in
nvme_fc_delete_association() which waits for all I/Os to be returned, which
is seen as hang in the application.
Link: https://lore.kernel.org/r/20200331104015.24868-3-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Arun Easi <aeasi@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit 45a76264c26fd8cfd0c9746196892d9b7e2657ee upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9020 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-13 17:40:49 +00:00
Bart Van Assche
985a661701
qla2xxx: check UNLOADING before posting async work
...
qlt_free_session_done() tries to post async PRLO / LOGO, and waits for the
completion of these async commands. If UNLOADING is set, this is doomed to
timeout, because the async logout command will never complete.
The only way to avoid waiting pointlessly is to fail posting these commands
in the first place if the driver is in UNLOADING state. In general,
posting any command should be avoided when the driver is UNLOADING.
With this patch, "rmmod qla2xxx" completes without noticeable delay.
Link: https://lore.kernel.org/r/20200421204621.19228-3-mwilck@suse.com
Fixes: 45235022da99 ("scsi: qla2xxx: Fix driver unload by shutting down chip")
Acked-by: Arun Easi <aeasi@marvell.com >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Martin Wilck <mwilck@suse.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit 5a263892d7d0b4fe351363f8d1a14c6a75955475 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9019 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-13 17:40:19 +00:00