Bart Van Assche
e98bc30e42
debian/scst.dkms: Switch to the qla2x00t-32gbit driver
...
Fixes: 1cfa1e7f87 ("Makefile: switch to qla-32gbit by default")
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9448 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-06-22 22:53:55 +00:00
Bart Van Assche
ce4afb414a
Makefile: Fix the scst-dkms-rpm build
...
Fixes: 1cfa1e7f87 ("Makefile: switch to qla-32gbit by default")
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9447 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-06-21 03:28:58 +00:00
Bart Van Assche
b7fc83cbdd
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9446 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-06-21 03:26:58 +00:00
Bart Van Assche
f3c567b4ce
nightly build: Improve support for CentOS 8.4
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9445 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-06-21 03:26:20 +00:00
Bart Van Assche
124edd624f
nightly build: Add support for CentOS 8.4
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9444 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-06-21 03:25:39 +00:00
Bart Van Assche
393c65fbf1
scst: Port to CentOS 8.4
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9443 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-06-21 03:23:02 +00:00
Bart Van Assche
caf127e37e
debian/scst.dkms: Switch to the qla2x00t-32gbit driver
...
Fixes: 1cfa1e7f87 ("Makefile: switch to qla-32gbit by default")
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9442 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-06-21 03:05:47 +00:00
Bart Van Assche
ba27441096
debian/rules: Fail the build if $(QLA_INI_DIR) has not been set
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9441 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-06-21 03:04:27 +00:00
Bart Van Assche
05afc999f1
scstadmin: Fix a bug in the code for forcibly applying a configuration
...
Pass the -force option from ... to removeGroup().
Signed-off-by: YuFan Chen <wiz.chen@gmail.com >
[ bvanassche: added commit message ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9440 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-06-18 04:45:40 +00:00
Bart Van Assche
b3aabb0b8e
debian/rules: Use $(KVER) instead of $(uname -r)
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9439 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-31 03:01:15 +00:00
Bart Van Assche
7aade0a109
Makefile: Make the qla2x00t-32gbit driver the default QLogic FC driver
...
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9438 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-31 02:59:52 +00:00
Bart Van Assche
27a6c65bf3
Temporarily revert r9436
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9437 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-31 02:58:28 +00:00
Bart Van Assche
8f792b0abd
debian/rules: Use $(KVER) instead of $(uname -r)
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9436 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-31 02:53:12 +00:00
Bart Van Assche
b7ed3f8e77
Makefile: switch to qla-32gbit by default
...
Bart Van Assche noted that currently there are more people using the
32gbit driver than there are people using the older one. So it might
make sense to finally make switch and default to the 32gbit driver.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9435 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-31 02:52:04 +00:00
Bart Van Assche
6787c12e95
Makefile: add ability to enable qla-32gbit target
...
Although qla-32gbit is mentioned in the README, but there wasn't really a
way to enable it sans editing the code.
This commit adds an ability to enable the driver by passing
`QLA_32GBIT=y` variable at build time.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9434 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-31 02:51:45 +00:00
Bart Van Assche
3d957ec708
Temporarily revert r9432
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9433 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-31 02:50:01 +00:00
Bart Van Assche
50f78c67ea
debian/rules: Use $(KVER) instead of $(uname -r)
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9432 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-31 02:45:26 +00:00
Bart Van Assche
7381de4fb9
Add a github action for building SCST upon push and upon a pull request
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9431 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-29 01:17:50 +00:00
Bart Van Assche
af9504a0f5
iscsi-scst/usr/Makefile: Use -Werror when testing a compiler option
...
This is necessary for clang.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9430 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-29 01:16:42 +00:00
Bart Van Assche
237910043b
debian/rules: Only build fcst if libfc has been enabled in the kernel
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9429 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-29 01:15:57 +00:00
Bart Van Assche
aa3f402314
Makefile: Conditionally regenerate the source code archives
...
Only regenerate the source code archives if one of the included source files
has been modified.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9428 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-23 20:41:30 +00:00
Bart Van Assche
bbbeb7ebf4
debian: Follow-up for the previous 5 commits
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9427 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-20 04:04:12 +00:00
Bart Van Assche
bbc5c25445
debian: make sure CC variable is passed through to the build
...
See also https://github.com/bvanassche/scst/pull/37 .
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9426 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-20 04:02:37 +00:00
Bart Van Assche
2de5765c9c
debian: make sure depmod uses the correct version
...
By default it uses the currently running kernel, which is not necessary
the kernel the package was built for. Fix this by generating the path on
package creation stage.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9425 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-20 04:02:06 +00:00
Bart Van Assche
fc2135c345
debian: fix wrong kernel version used in preinst
...
This script is used in the non-dkms scst package. The purpose of package
is to determine kernel location at compile-time, as opposed to the
package installation time. However, calling `uname -r` in package
installation time violates that idea because it would get some random
kernel that was running on the machine. This problem is particularly
seen in containers, because in those `uname` shows the kernel running on
the host, rather than the one running inside container.
Fix this by determining the kernel location in `preinst` script at
compile time as well.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9424 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-20 04:01:46 +00:00
Bart Van Assche
143ea7b546
debian: make sure KVER and KDIR are visible to dpkg build
...
The debuild clears up the environment, thus the essential SCST variables
KVER and KDIR are cleared out. This patch fixes it.
Note: technically, `debild` supports `--preserve-env` option. But in
reality making use of it makes no difference, variables still do not
appear. Work around it by using DEB_foo_SET from `man dpkg-buildflags`
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9423 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-20 04:01:24 +00:00
Bart Van Assche
ffad8bd07a
Makefile: remove an always false condition
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9422 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-20 04:01:00 +00:00
Bart Van Assche
ccdb440ae4
qla2x00t: Always check the qla2x00_wait_for_hba_online() return value
...
This patch suppresses the following Coverity complaint:
CID 364334 (#1 of 1): Unchecked return value (CHECKED_RETURN)
6. check_return: Calling qla2x00_wait_for_hba_online without checking return
value (as is done elsewhere 8 out of 10 times).
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9421 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-19 14:12:39 +00:00
Bart Van Assche
f94a74fc14
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9420 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-19 14:10:52 +00:00
Bart Van Assche
2be2a4701a
scripts/specialize-patch: Evaluate 0 && defined(...) as 0
...
Fixes: 7b375842e9 ("qla2x00t-32gbit: Fix two recently introduced build errors")
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9419 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-19 14:10:26 +00:00
Bart Van Assche
21e987fa8e
qla2x00t-32gbit: Compilation fix for kernel versions before v5.12
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9418 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-18 05:06:30 +00:00
Bart Van Assche
9a9fdf179f
qla2x00t-32gbit: Prevent PRLI in target mode
...
In a case when the initiator in P2P mode by some circumstances does not
send PRLI, the target, in a case when the target port's WWPN is less than
initiator's, changes the discovery state in DSC_GNL. When gnl completes it
sends PRLI to the initiator.
Usually the initiator in P2P mode always sends PRLI. We caught this issue
on Linux stable v5.4.6 https://www.spinics.net/lists/stable/msg458515.html .
Fix this particular corner case in the behaviour of the P2P mod target
login state machine.
Link: https://lore.kernel.org/r/20210422153414.4022-1-a.kovaleva@yadro.com
Fixes: a9ed06d4e640 ("scsi: qla2xxx: Allow PLOGI in target mode")
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Anastasia Kovaleva <a.kovaleva@yadro.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit fcb16d9a8ecf1e9bfced0fc654ea4e2caa7517f4 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9417 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-15 22:59:36 +00:00
Bart Van Assche
6ddd2170c9
qla2x00t-32gbit: Add marginal path handling support
...
Add support for eh_should_retry_cmd callback in qla2xxx host template.
Link: https://lore.kernel.org/r/20210427050914.7270-1-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bikash Hazarika <bhazarika@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit 000e68faefe6240ea2e4c98b606c594b20974fb7 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9416 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-15 22:58:36 +00:00
Bart Van Assche
143ea24dc7
qla2x00t-32gbit: Reserve extra IRQ vectors
...
Commit a6dcfe08487e ("scsi: qla2xxx: Limit interrupt vectors to number of
CPUs") lowers the number of allocated MSI-X vectors to the number of CPUs.
That breaks vector allocation assumptions in qla83xx_iospace_config(),
qla24xx_enable_msix() and qla2x00_iospace_config(). Either of the functions
computes maximum number of qpairs as:
ha->max_qpairs = ha->msix_count - 1 (MB interrupt) - 1 (default
response queue) - 1 (ATIO, in dual or pure target mode)
max_qpairs is set to zero in case of two CPUs and initiator mode. The
number is then used to allocate ha->queue_pair_map inside
qla2x00_alloc_queues(). No allocation happens and ha->queue_pair_map is
left NULL but the driver thinks there are queue pairs available.
qla2xxx_queuecommand() tries to find a qpair in the map and crashes:
if (ha->mqenable) {
uint32_t tag;
uint16_t hwq;
struct qla_qpair *qpair = NULL;
tag = blk_mq_unique_tag(cmd->request);
hwq = blk_mq_unique_tag_to_hwq(tag);
qpair = ha->queue_pair_map[hwq]; # <- HERE
if (qpair)
return qla2xxx_mqueuecommand(host, cmd, qpair);
}
BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 0 P4D 0
Oops: 0000 [#1 ] SMP PTI
CPU: 0 PID: 72 Comm: kworker/u4:3 Tainted: G W 5.10.0-rc1+ #25
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.0.0-prebuilt.qemu-project.org 04/01/2014
Workqueue: scsi_wq_7 fc_scsi_scan_rport [scsi_transport_fc]
RIP: 0010:qla2xxx_queuecommand+0x16b/0x3f0 [qla2xxx]
Call Trace:
scsi_queue_rq+0x58c/0xa60
blk_mq_dispatch_rq_list+0x2b7/0x6f0
? __sbitmap_get_word+0x2a/0x80
__blk_mq_sched_dispatch_requests+0xb8/0x170
blk_mq_sched_dispatch_requests+0x2b/0x50
__blk_mq_run_hw_queue+0x49/0xb0
__blk_mq_delay_run_hw_queue+0xfb/0x150
blk_mq_sched_insert_request+0xbe/0x110
blk_execute_rq+0x45/0x70
__scsi_execute+0x10e/0x250
scsi_probe_and_add_lun+0x228/0xda0
__scsi_scan_target+0xf4/0x620
? __pm_runtime_resume+0x4f/0x70
scsi_scan_target+0x100/0x110
fc_scsi_scan_rport+0xa1/0xb0 [scsi_transport_fc]
process_one_work+0x1ea/0x3b0
worker_thread+0x28/0x3b0
? process_one_work+0x3b0/0x3b0
kthread+0x112/0x130
? kthread_park+0x80/0x80
ret_from_fork+0x22/0x30
The driver should allocate enough vectors to provide every CPU it's own HW
queue and still handle reserved (MB, RSP, ATIO) interrupts.
The change fixes the crash on dual core VM and prevents unbalanced QP
allocation where nr_hw_queues is two less than the number of CPUs.
Link: https://lore.kernel.org/r/20210412165740.39318-1-r.bolshakov@yadro.com
Fixes: a6dcfe08487e ("scsi: qla2xxx: Limit interrupt vectors to number of CPUs")
Cc: Daniel Wagner <daniel.wagner@suse.com >
Cc: Himanshu Madhani <himanshu.madhani@oracle.com >
Cc: Quinn Tran <qutran@marvell.com >
Cc: Nilesh Javali <njavali@marvell.com >
Cc: Martin K. Petersen <martin.petersen@oracle.com >
Cc: stable@vger.kernel.org # 5.11+
Reported-by: Aleksandr Volkov <a.y.volkov@yadro.com >
Reported-by: Aleksandr Miloserdov <a.miloserdov@yadro.com >
Reviewed-by: Daniel Wagner <dwagner@suse.de >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit f02d4086a8f36a0e1aaebf559b54cf24a177a486 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9415 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-15 22:57:50 +00:00
Bart Van Assche
db187fc604
qla2x00t-32gbit: Reuse existing error handling path
...
There is no need to duplicate code, use the existing error handling path to
free resources. This is more future-proof.
Link: https://lore.kernel.org/r/6973844a1532ec2dc8e86f3533362e79d78ed774.1618132821.git.christophe.jaillet@wanadoo.fr
Reviewed-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit 5dc3468888f8ba54c3a2fdd38b13288f6b8daed2 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9414 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-15 22:52:16 +00:00
Bart Van Assche
e91874d860
qla2x00t-32gbit: Remove unneeded if-null-free check
...
Eliminate the following coccicheck warning:
drivers/scsi/qla2xxx/qla_os.c:4622:2-7:
WARNING: NULL check before some freeing functions is not needed.
drivers/scsi/qla2xxx/qla_os.c:4637:3-8:
WARNING: NULL check before some freeing functions is not needed.
Link: https://lore.kernel.org/r/20210409120925.7122-1-linqiheng@huawei.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Qiheng Lin <linqiheng@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit efd2617100d9c6a49c8cd27160a2353b04844d78 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9413 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-15 22:51:21 +00:00
Bart Van Assche
bd0814b79b
qla2x00t-32gbit: Update version to 10.02.00.106-k
...
Link: https://lore.kernel.org/r/20210329085229.4367-13-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ subject 10d91a15f26e76aec9e6fed31df7e8065f40770f upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9412 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-15 22:50:35 +00:00
Bart Van Assche
9bebb84e54
qla2x00t-32gbit: Do logout even if fabric scan retries got exhausted
...
Perform logout of all remote ports so that all I/Os with driver are
requeued with midlayer for retry.
Link: https://lore.kernel.org/r/20210329085229.4367-12-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Quinn Tran <qutran@marvell.com >
Signed-off-by: Saurav Kashyap <skashyap@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit 022a2d211ce0eb410a2f4d0d0903a5ddf7687b55 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9411 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-15 22:49:53 +00:00
Bart Van Assche
9c93b66427
qla2x00t-32gbit: Update default AER debug mask
...
Use PCIe AER debug mask as default.
Link: https://lore.kernel.org/r/20210329085229.4367-11-njavali@marvell.com
Tested-by: Laurence Oberman <loberman@redhat.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 1cbcc531d01f813e6a93cefdc7476f858ff2b301 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9410 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-15 22:48:58 +00:00
Bart Van Assche
a1459dfdf6
qla2x00t-32gbit: Fix mailbox recovery during PCIe error
...
For the mailbox thread that encounters a PCIe error, pause that thread
until PCIe link reset/recovery has completed to prevent the thread from
possibly unmapping any type of DMA resource that might be in progress.
Link: https://lore.kernel.org/r/20210329085229.4367-10-njavali@marvell.com
Tested-by: Laurence Oberman <loberman@redhat.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 daafc8d33ff62009e52225106f1a6c20fe1b6ccd upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9409 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-15 22:46:24 +00:00
Bart Van Assche
32cf6b2406
qla2x00t-32gbit: Fix crash in PCIe error handling
...
BUG: unable to handle kernel NULL pointer dereference at (null)
IP: qla2x00_abort_isp+0x21/0x6b0 [qla2xxx] PGD 0 P4D 0
Oops: 0000 [#1 ] SMP PTI
CPU: 0 PID: 1715 Comm: kworker/0:2
Tainted: GOE 4.12.14-122.37-default #1 SLE12-SP5
Hardware name: HPE Superdome Flex/Superdome Flex, BIOS
Bundle:3.30.100 SFW:IP147.007.004.017.000.2009211957 09/21/2020
Workqueue: events aer_recover_work_func
task: ffff9e399c14ca80 task.stack: ffffc1c58e4ac000
RIP: 0010:qla2x00_abort_isp+0x21/0x6b0 [qla2xxx]
RSP: 0018:ffffc1c58e4afd50 EFLAGS: 00010282
RAX: 0000000000000000 RBX: ffff9e419cdef480 RCX: 0000000000000000
RDX: ffff9e399c14ca80 RSI: 0000000000000246 RDI: ffff9e419bbc27b8
RBP: ffff9e419bbc27b8 R08: 0000000000000004 R09: 00000000a0440000
R10: 0000000000000000 R11: ffff9e399416d1a0 R12: ffff9e419cdef000
R13: ffff9e3a7cfae800 R14: ffff9e3a7cfae800 R15: 00000000000000c0
FS: 0000000000000000(0000) GS:ffff9e39a0000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 00000006cd00a005 CR4: 00000000007606f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
PKRU: 55555554
Call Trace:
qla2xxx_pci_slot_reset+0x141/0x160 [qla2xxx]
report_slot_reset+0x41/0x80
? merge_result.part.4+0x30/0x30
pci_walk_bus+0x70/0x90
pcie_do_recovery+0x1db/0x2e0
aer_recover_work_func+0xc2/0xf0
process_one_work+0x14c/0x390
Disable board_disable logic where driver resources are freed while OS is in
the process of recovering the adapter.
Link: https://lore.kernel.org/r/20210329085229.4367-9-njavali@marvell.com
Tested-by: Laurence Oberman <loberman@redhat.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 f7a0ed479e66ab177801301a1a72c37775c40450 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9408 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-15 22:35:09 +00:00
Bart Van Assche
75c235a15e
qla2x00t-32gbit: Fix RISC RESET completion polling
...
After RISC RESET, the poll time for completion is too short. Fix the
completion polling time.
Link: https://lore.kernel.org/r/20210329085229.4367-8-njavali@marvell.com
Tested-by: Laurence Oberman <loberman@redhat.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 610d027b1e6372ffe3e85e8e095a562e920fd5cd upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9407 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-15 22:34:11 +00:00
Bart Van Assche
c13f491f2c
qla2x00t-32gbit: Fix crash in qla2xxx_mqueuecommand()
...
RIP: 0010:kmem_cache_free+0xfa/0x1b0
Call Trace:
qla2xxx_mqueuecommand+0x2b5/0x2c0 [qla2xxx]
scsi_queue_rq+0x5e2/0xa40
__blk_mq_try_issue_directly+0x128/0x1d0
blk_mq_request_issue_directly+0x4e/0xb0
Fix incorrect call to free srb in qla2xxx_mqueuecommand(), as srb is now
allocated by upper layers. This fixes smatch warning of srb unintended
free.
Link: https://lore.kernel.org/r/20210329085229.4367-7-njavali@marvell.com
Fixes: af2a0c51b120 ("scsi: qla2xxx: Fix SRB leak on switch command timeout")
Cc: stable@vger.kernel.org # 5.5
Reported-by: Laurence Oberman <loberman@redhat.com >
Reported-by: Dan Carpenter <dan.carpenter@oracle.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 6641df81ab799f28a5d564f860233dd26cca0d93 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9406 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-15 22:33:21 +00:00
Bart Van Assche
01d7128916
qla2x00t-32gbit: Fix use after free in bsg
...
On bsg command completion, bsg_job_done() was called while qla driver
continued to access the bsg_job buffer. bsg_job_done() would free up
resources that ended up being reused by other task while the driver
continued to access the buffers. As a result, driver was reading garbage
data.
localhost kernel: BUG: KASAN: use-after-free in sg_next+0x64/0x80
localhost kernel: Read of size 8 at addr ffff8883228a3330 by task swapper/26/0
localhost kernel:
localhost kernel: CPU: 26 PID: 0 Comm: swapper/26 Kdump:
loaded Tainted: G OE --------- - - 4.18.0-193.el8.x86_64+debug #1
localhost kernel: Hardware name: HP ProLiant DL360
Gen9/ProLiant DL360 Gen9, BIOS P89 08/12/2016
localhost kernel: Call Trace:
localhost kernel: <IRQ>
localhost kernel: dump_stack+0x9a/0xf0
localhost kernel: print_address_description.cold.3+0x9/0x23b
localhost kernel: kasan_report.cold.4+0x65/0x95
localhost kernel: debug_dma_unmap_sg.part.12+0x10d/0x2d0
localhost kernel: qla2x00_bsg_sp_free+0xaf6/0x1010 [qla2xxx]
Link: https://lore.kernel.org/r/20210329085229.4367-6-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Quinn Tran <qutran@marvell.com >
Signed-off-by: Saurav Kashyap <skashyap@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit 2ce35c0821afc2acd5ee1c3f60d149f8b2520ce8 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9405 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-15 22:32:07 +00:00
Bart Van Assche
186b41114c
qla2x00t-32gbit: Consolidate zio threshold setting for both FCP & NVMe
...
Consolidate zio threshold setting for both FCP & NVMe to prevent one
protocol from clobbering the setting of the other protocol.
Link: https://lore.kernel.org/r/20210329085229.4367-5-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 5777fef788a59f5ac9ab6661988a95a045fc0574 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9404 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-15 22:30:53 +00:00
Bart Van Assche
9ef0447910
qla2x00t-32gbit: Fix stuck session
...
Session was stuck due to explicit logout to target timing out. The target
was in an unresponsive state. This timeout induced an error to the GNL
command from moving forward.
Link: https://lore.kernel.org/r/20210329085229.4367-4-njavali@marvell.com
Tested-by: Laurence Oberman <loberman@redhat.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 c358a3d92b32be89ea1c44fe75721448c0a0fec1 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9403 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-15 22:29:59 +00:00
Bart Van Assche
19aa46c0db
qla2x00t-32gbit: Add H:C:T info in the log message for fc ports
...
The host:channel:scsi_target_id information is helpful in matching an FC
port with a SCSI device, so add it. For initiator FC ports, a -1 would be
displayed for "target" part.
Link: https://lore.kernel.org/r/20210329085229.4367-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 a63f4c45414951ad4fbaeb5b744e37ffd137b689 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9402 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-15 22:29:11 +00:00
Bart Van Assche
69743a4fda
qla2x00t-32gbit: Fix IOPS drop seen in some adapters
...
Removing the response queue processing in the send path is showing IOPS
drop. Add back the process_response_queue() call in the send path.
Link: https://lore.kernel.org/r/20210329085229.4367-2-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 bcafad6c2d520df42c86f28357d639deac15bad7 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9401 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-15 22:28:25 +00:00
Bart Van Assche
a5b92ce245
qla2x00t-32gbit: Check kzalloc() return value
...
Instead of crashing if kzalloc() fails, make qla2x00_get_host_stats()
return -ENOMEM.
Link: https://lore.kernel.org/r/20210320232359.941-8-bvanassche@acm.org
Fixes: dbf1f53cfd23 ("scsi: qla2xxx: Implementation to get and manage host, target stats and initiator port")
Cc: Himanshu Madhani <himanshu.madhani@oracle.com >
Cc: Saurav Kashyap <skashyap@marvell.com >
Cc: Nilesh Javali <njavali@marvell.com >
Cc: Quinn Tran <qutran@marvell.com >
Cc: Mike Christie <michael.christie@oracle.com >
Cc: Daniel Wagner <dwagner@suse.de >
Cc: Lee Duncan <lduncan@suse.com >
Reviewed-by: Daniel Wagner <dwagner@suse.de >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Acked-by: Saurav Kashyap <skashyap@marvell.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit e5406d8ad4a1659f4d4d1b39fe203855c4eaef2d upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9400 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-15 22:27:13 +00:00
Bart Van Assche
0b7340af60
qla2x00t-32gbit: Simplify qla8044_minidump_process_control()
...
This patch fixes the following Coverity complaint:
CID 177490 (#1 of 1): Unused value (UNUSED_VALUE)
assigned_value: Assigning value from opcode & 0xffffff7fU to opcode
here, but that stored value is overwritten before it can be used.
Link: https://lore.kernel.org/r/20210320232359.941-6-bvanassche@acm.org
Cc: Quinn Tran <qutran@marvell.com >
Cc: Mike Christie <michael.christie@oracle.com >
Reviewed-by: Daniel Wagner <dwagner@suse.de >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Reviewed-by: Lee Duncan <lduncan@suse.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
[ commit a20821e3f4719458a888af634c10c286365ecd6f upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9399 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-15 22:26:10 +00:00