Commit Graph

7362 Commits

Author SHA1 Message Date
Bart Van Assche
5e313fddf4 fcst: Rework the fc_fill_fc_hdr() compatibility check
Decide which SCSI header file to include based on a compile time check instead
of trying to derive that choice from the UEK kernel version.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9606 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-25 00:39:17 +00:00
Bart Van Assche
49870b2348 scst_lib: Remove dead code
Since block_shift is unsigned, it can never be negative. See also commit
1e95312e49 ("Reenable block_shift calculation for tapes").


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9605 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-25 00:37:08 +00:00
Bart Van Assche
20076add1b nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9604 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-24 04:45:22 +00:00
Bart Van Assche
b5fb6add87 fcst: Port to the latest UEK 7 kernel
Apparently the UEK 8 FC patches have been ported to UEK 7. Make fcst build
against the latest UEK7 and UEK 8 kernels. This patch breaks compatibility
with older UEK 7 5.4.17 kernels.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9603 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-24 04:35:10 +00:00
Bart Van Assche
0d025a2e1e scripts: Add support for the UEK_RELEASE macro
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9602 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-23 04:53:45 +00:00
Bart Van Assche
3a39e5a124 fcst: Support both UEK 7 and UEK 8
r9586+r9587 added support for UEK 8 but broke support for UEK 7. Since as
far as I know no compile-time constants are available in UEK that allow to
tell the difference between the UEK 7 and UEK 8 5.4.17 kernels, extract the
UEK release number from the name of the directory with the kernel build
infrastructure.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9601 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-23 04:28:40 +00:00
Bart Van Assche
6b8b4a8004 qla2x00t: Port to Linux kernel v5.16
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9600 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-22 03:49:47 +00:00
Bart Van Assche
af579d68c3 scst_local: Port to Linux kernel v5.16
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9599 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-22 03:48:38 +00:00
Bart Van Assche
0f9f9eeb3a scst: Port to Linux kernel v5.16
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9598 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-22 03:48:08 +00:00
Bart Van Assche
c8b3b06b2b scst: Backport the scsi_done() function
The scsi_done() function is new in kernel v5.16. Backport it to older
kernel versions.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9597 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-22 03:47:29 +00:00
Bart Van Assche
47ba05f2a7 scst_vdisk: Rework the most recent fix
Instead of making vdev_open_fd() check the dev_active flag, let the callers
of this function check that flag. This patch does not change the behavior of
the scst_vdisk driver.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9596 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-22 03:44:44 +00:00
Bart Van Assche
171b1d54e8 scst_vdisk: Restore support for adding a block device with non-existent filename
This patch is a fix for commit df4c250b8d ("scst_vdisk: Port to Linux
kernel v5.11").


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9595 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-22 03:43:47 +00:00
Bart Van Assche
09168f5186 scst_dlm: Warn if kernel_read() can't read from configfs files
See also upstream commit 7fe1e79b59ba ("configfs: implement the .read_iter
and .write_iter methods"; v5.14).



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9594 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-04 00:42:39 +00:00
Bart Van Assche
193e63d118 qla2x00t: Port to Linux kernel v5.15
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9593 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-03 14:29:35 +00:00
Bart Van Assche
8a2352239b scst_local: Port to Linux kernel v5.15
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9592 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-03 14:29:16 +00:00
Bart Van Assche
5b9aca3f03 scst: Port to Linux kernel v5.15
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9591 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-03 14:28:56 +00:00
Bart Van Assche
567a1d5a35 qla2x00t*: Fix a 'make' invocation
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9590 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-03 14:27:57 +00:00
Bart Van Assche
0c4f769c0e scst: Enable copying to user space from an SGV cache
This patch should fix the following kernel warning:

usercopy: Kernel memory exposure attempt detected from SLUB object 'sgv-clust-64K' (offset 200, size 48)!
 ------------[ cut here ]------------
kernel BUG at mm/usercopy.c:99!
invalid opcode: 0000 [#1] SMP PTI
CPU: 0 PID: 2645 Comm: iscsi-scstd Tainted: P          IOE     5.13.0-20-generic #20-Ubuntu
Hardware name: Dell Inc. PowerEdge R740xd/07X9K0, BIOS 2.12.2 07/09/2021
RIP: 0010:usercopy_abort+0x7b/0x7d
Call Trace:
 __check_heap_object+0xdf/0x110
 __check_object_size.part.0+0x128/0x150
 __check_object_size+0x1c/0x20
 isert_read+0x10b/0x380 [isert_scst]
 vfs_read+0x9f/0x190
 ksys_read+0x67/0xe0
 __x64_sys_read+0x19/0x20
 do_syscall_64+0x61/0xb0
 entry_SYSCALL_64_after_hwframe+0x44/0xae



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9589 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-01 01:28:33 +00:00
Bart Van Assche
2a4412e6c5 qla2x00t: Fix the build for UEK kernel 5.4.17-2136.300.7.el8uek
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9588 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-10-28 05:43:57 +00:00
Bart Van Assche
034badd9c8 fcst: Really fix the build against the latest UEK kernel
This patch fixes r9586.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9587 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-10-28 03:42:51 +00:00
Bart Van Assche
a8711755b5 fcst: Fix the build against the latest UEK kernel
This patch fixes the build against UEK kernel 5.4.17-2136.300.7.el8uek and
breaks the build for older 5.4.17 UEK kernels, e.g.
5.4.17-2102.200.13.el8uek.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9586 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-10-24 02:37:31 +00:00
Bart Van Assche
6d4d2d9d3d nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9585 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-10-24 02:35:10 +00:00
Bart Van Assche
10e57d6cef scst: Port to Ubuntu kernel 5.13.x (Ubuntu 21.10)
Reported-by: Grant Albitz <GAlbitz@Albitz.biz>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9584 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-10-21 03:50:29 +00:00
Bart Van Assche
545ae845f4 scst_copy_mgr: Do not suspend activity when adding a LUN to the copy manager
scst_cm_update_dev() calls
- scst_cm_dev_unregister(dev, false)
- scst_block_dev()
- scst_cm_get_lun()
- scst_cm_send_init_inquiry()

Due to commit 3e64094b ("scst_sysfs: Do not suspend I/O for LUN management")
scst_cm_dev_unregister() and scst_cm_get_lun() can be performed safely
without suspending SCSI command processing.

scst_block_dev() and scst_cm_send_init_inquiry() doesn't need SCST
to be suspended since scst_cm_dev_register(), which similarly calls
them, doesn't need to.

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@9583 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-10-11 20:22:27 +00:00
Bart Van Assche
da0e90f5e3 scst: Improve scst_acg_add_lun()
Remove a superfluous INIT_LIST_HEAD() call, add a lockdep_assert_held()
statement and fix an outdated comment.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9582 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-10-11 20:20:38 +00:00
Bart Van Assche
7e328da616 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9581 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-10-08 02:57:39 +00:00
Bart Van Assche
3881544890 qla2x00t-32gbit: Change the default mode back to FCP
Commit 6432df87e6 ("qla2x00t-32gbit: initialize fc4_type_priority") sets
the port mode to FCP or NVMe according to the NVRAM configuration. That results
in the following logs on my test setup:

  qla2xxx [0000:00:09.0]-ffff:9: FC4 priority set to NVMe
  qla2xxx [0000:00:0a.0]-ffff:10: FC4 priority set to NVMe

Since only FCP is supported in the SCST project, ignore the NVRAM configuration.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9580 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-29 03:23:38 +00:00
Bart Van Assche
67b174e0f6 nightly/conf/nightly.conf: Remove kernel versions before 3.10
As far as I know all SCST users are using kernel version 3.10 or later. Hence
stop testing kernel versions before 3.10, the kernel version used by RHEL 7.
This means dropping support for RHEL 6.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9579 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-19 02:49:57 +00:00
Bart Van Assche
1e95312e49 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")

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9578 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-15 04:13:49 +00:00
Bart Van Assche
3d527cb0b5 fcst: Use BUILD_BUG_ON() instead of static_assert()
BUILD_BUG_ON() works with older gcc versions but static_assert() not.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9577 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-15 03:10:32 +00:00
Bart Van Assche
13c6449016 scst_vdisk: Fix bio_integrity_alloc() error checking
In 2015 bio_integrity_alloc() was modified such that it returns an error
pointer instead of NULL upon failure. Hence this patch.

See also upstream commit 06c1e3902aa7 ("blk-integrity: empty implementation
when disabled"; v4.5).



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9576 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-09 03:22:31 +00:00
Bart Van Assche
c536f01094 qla2x00t-32gbit/Makefile_in-tree: Add qla_edif.o
Reported-by: Sietse van Zanen <sietse@wizdom.nu>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9575 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-09 02:57:47 +00:00
Bart Van Assche
573e4f21f3 isert-scst: Enclose complex values in parentheses
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9574 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-08 02:47:22 +00:00
Bart Van Assche
0f817a40ef fcst: Remove one occurrence of __attribute__((packed))
Remove this occurrence because it is not necessary and because checkpatch
complains about it.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9573 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-07 15:51:56 +00:00
Bart Van Assche
ee72166494 qla2x00t-32gbit: Unbreak the RHEL 7 and RHEL 8 builds
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9572 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-07 00:45:11 +00:00
Bart Van Assche
3364429a0f scst/include/backport.h: Unbreak the RHEL 7 and RHEL 8 builds
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9571 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-07 00:44:03 +00:00
Bart Van Assche
dfd45e735c scst_copy_mgr: Improve standards compliance
Instead of considering designators as equivalent if one is the prefix of
another, only accept an exact match of the designator length as required
by the SCSI standard.

Fixes: 5e90abb64a ("scst_copy_mgr: Implement a workaround for non-compliant initiator systems")
Fixes: 3fc775c75a ("EXTENDED COPY support")


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9570 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-06 03:04:38 +00:00
Bart Van Assche
8c19a57583 qla2x00t-32gbit: Backport the EDIF BSG code
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9569 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-05 15:45:50 +00:00
Bart Van Assche
3c36167585 qla2x00t-32gbit: Open-code qla2xxx_eh_device_reset()
Device reset and target reset will be using different calling sequences, so
open-code __qla2xxx_eh_generic_reset() in qla2xxx_eh_device_reset(), and
remove the now obsolete function __qla2xxx_eh_generic_reset().  No
functional changes.

Link: https://lore.kernel.org/r/20210819091913.94436-4-hare@suse.de
Cc: Nilesh Javali <njavali@marvell.com>
Reviewed-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
[ commit cbe1f0d70072cbdb28c8687f3fca79d07e8d1860 upstream ]

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9568 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-05 15:45:46 +00:00
Bart Van Assche
c6c70f504d qla2x00t-32gbit: Open-code qla2xxx_eh_target_reset()
Device reset and target reset will be using different calling sequences, so
open-code __qla2xxx_eh_generic_reset() in qla2xxx_eh_target_reset().  No
functional changes.

Link: https://lore.kernel.org/r/20210819091913.94436-3-hare@suse.de
Cc: Nilesh Javali <njavali@marvell.com>
Reviewed-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
[ commit e56b2234ab64f92486ea246f1322ff236e87e229 upstream ]

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9567 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-05 15:45:42 +00:00
Bart Van Assche
700bbd7eb2 qla2x00t-32gbit: Do not call fc_block_scsi_eh() during bus reset
When calling bus reset the driver will be doing a full SAN resync, so there
is no need to wait for any pending RSCNs; they'll be re-issued during
resync anyway.

Link: https://lore.kernel.org/r/20210819091913.94436-2-hare@suse.de
Cc: Nilesh Javali <njavali@marvell.com>
Reviewed-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
[ commit c74ce061f8983bcb048b895bc127447909321fe8 upstream ]

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9566 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-05 15:45:38 +00:00
Bart Van Assche
b2f977c791 qla2x00t-32gbit: Update version to 10.02.06.200-k
Link: https://lore.kernel.org/r/20210817051315.2477-13-njavali@marvell.com
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
[ commit 34f69ec703559f0a43ec3307795c28514861b511 upstream ]

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9565 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-05 15:45:34 +00:00
Bart Van Assche
bd8956724c qla2x00t-32gbit: edif: Fix returnvar.cocci warnings
drivers/scsi/qla2xxx/qla_edif.c:213:25-29: Unneeded variable: "rval". Return "0"
on line 264

Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Link: https://lore.kernel.org/r/20210817051315.2477-12-njavali@marvell.com
Fixes: 7ebb336e45ef ("scsi: qla2xxx: edif: Add start + stop bsgs")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
[ commit 17f3df8fd718fb229ae3453ae59b3f2349464d06 upstream ]

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9564 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-05 15:45:30 +00:00
Bart Van Assche
da7cfbb899 qla2x00t-32gbit: Fix NVMe session down detection
When Target port transitions personality from one to another (NVMe <-->
FCP), there could be some overlap of the two where one layer is going down
while the other layer is coming up. This overlap can cause temporary I/O
error. Detect those errors/transitions and recover from them. Triggers
session tear down and allow relogin to re-drive the connection under the
following conditions:

- NVMe command error

- On PRLO + N2N (rida format 2)

Link: https://lore.kernel.org/r/20210817051315.2477-11-njavali@marvell.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 7a8ff7d9854a1727435557184c8255bbbca60920 upstream ]

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9563 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-05 15:45:25 +00:00
Bart Van Assche
5fc2357c68 qla2x00t-32gbit: Fix NVMe retry
For target port that register itself as both FCP + NVMe, initiator driver
will try to login one mode at a time. If the last mode did not succeed,
then driver will try the other mode.

When error is encountered, current code only flip to other mode one time
(NVMe->FCP) and remain on the last mode.  Driver wrongly assumed target
port does not support PRLI NVMe, instead it was not ready to receive PRLI.

This patch will alternate back and forth on every PRLI failure until login
retry count has depleted or it is succeeded.

Link: https://lore.kernel.org/r/20210817051315.2477-10-njavali@marvell.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 f88444570072a6863f3e2bd67878560a51b187f2 upstream ]

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9562 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-05 15:45:20 +00:00
Bart Van Assche
e011c72863 qla2x00t-32gbit: Fix hang on NVMe command timeouts
The abort callback gets called only when it gets posted to firmware. The
refcounting is done properly in the callback. On internal errors, the
callback is not invoked leading to a hung I/O. Fix this by having separate
error code when command gets returned from firmware.

Link: https://lore.kernel.org/r/20210817051315.2477-9-njavali@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>
[ commit 2cabf10dbbe380e2ef27a69ce2059bcab7c8b419 upstream ]

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9561 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-05 15:45:16 +00:00
Bart Van Assche
cb5acb2323 qla2x00t-32gbit: Fix NVMe | FCP personality change
Currently driver saves the personality type (FCP|NVMe) at the start of
first discovery of the remote device. If the remote device personality do
change over time, then qla driver needs to present that to user to decide.

Link: https://lore.kernel.org/r/20210817051315.2477-8-njavali@marvell.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 f6e327fc09e48271c103efb3b69fc4ccda3f408b upstream ]

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9560 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-05 15:45:12 +00:00
Bart Van Assche
d2312b6268 qla2x00t-32gbit: edif: Do secure PLOGI when auth app is present
For initiator mode, always do secure login when authentication app started.
Also remove redundant flags to indicate secure connection.

Link: https://lore.kernel.org/r/20210817051315.2477-7-njavali@marvell.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 1dc64a360bda55d632202e3fef266cef7d4f6f00 upstream ]

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9559 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-05 15:45:07 +00:00
Bart Van Assche
6e3fa20e65 qla2x00t-32gbit: edif: Add N2N support for EDIF
For EDIF + N2N to work, firmware 9.8 or later is required. The driver will
pause after PLOGI to allow app to authenticate. Once authentication
completes, app will tell driver to do PRLI.

Link: https://lore.kernel.org/r/20210817051315.2477-6-njavali@marvell.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 4de067e5df12c4db4d3d930ba58354d23674f67c upstream ]

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9558 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-05 15:45:02 +00:00
Bart Van Assche
88876f3f32 qla2x00t-32gbit: Fix hang during NVMe session tear down
The following hung task call trace was seen:

[ 1230.183294] INFO: task qla2xxx_wq:523 blocked for more than 120 seconds.
[ 1230.197749] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 1230.205585] qla2xxx_wq      D    0   523      2 0x80004000
[ 1230.205636] Workqueue: qla2xxx_wq qlt_free_session_done [qla2xxx]
[ 1230.205639] Call Trace:
[ 1230.208100]  __schedule+0x2c4/0x700
[ 1230.211607]  schedule+0x38/0xa0
[ 1230.214769]  schedule_timeout+0x246/0x2f0
[ 1230.222651]  wait_for_completion+0x97/0x100
[ 1230.226921]  qlt_free_session_done+0x6a0/0x6f0 [qla2xxx]
[ 1230.232254]  process_one_work+0x1a7/0x360

...when device side port resets were done.

Abort threads were getting out without processing due to the "deleted"
flag check. The delete thread, meanwhile, could not proceed with a
logout (that would have cleared out pending requests) as the logout IOCB
work was not progressing. It appears like the hung qlt_free_session_done()
thread is causing the ha->wq works on hold. The qlt_free_session_done()
was hung waiting for nvme_fc_unregister_remoteport() + localport_delete cb
to be complete, which would only happen when all I/Os are released.

Fix this by allowing abort to progress until device delete is completely
done. This should make the qlt_free_session_done() proceed without hang and
thus clear up the deadlock.

Link: https://lore.kernel.org/r/20210817051315.2477-5-njavali@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>
[ commit 310e69edfbd57995868a428eeddea09a7b5d2749 upstream ]

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9557 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-05 15:44:58 +00:00