8786 Commits

Author SHA1 Message Date
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
e289587783 Merge branch 'svn-trunk' 2021-10-31 18:34:51 -07: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
a374d5afac Merge branch 'svn-trunk' 2021-10-30 18:46:30 -07: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
3700777c42 Merge branch 'svn-trunk' 2021-10-27 20:43:04 -07: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
7d2004cb27 Merge branch 'svn-trunk' 2021-10-23 19:40:10 -07: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
589555f548 Merge branch 'svn-trunk' 2021-10-20 20:56:34 -07: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
82aab7304c Merge branch 'svn-trunk' 2021-10-11 13:22:56 -07: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
fa9690fe4b Merge branch 'svn-trunk' 2021-10-07 20:52:49 -07: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
7084119757 Merge branch 'svn-trunk' 2021-09-28 20:32:16 -07: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
c521fbb33d Merge branch 'svn-trunk' 2021-09-18 19:52:44 -07: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
259dfae2d2 Merge branch 'svn-trunk' 2021-09-14 21:15:04 -07: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
8a341fe593 Merge pull request #46 from ArianWeber/fix_calc_block_shift
Reenable block_shift calculation for tapes
2021-09-14 21:12:21 -07:00
Bart Van Assche
0723b46dd9 Merge branch 'svn-trunk' 2021-09-14 20:11:05 -07: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
ab318992fc Merge branch 'svn-trunk' 2021-09-08 20:26:28 -07: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
d296d3f507 Merge branch 'svn-trunk' 2021-09-07 20:17:10 -07: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
b610cb1ac8 Merge branch 'svn-trunk' 2021-09-06 17:45:18 -07: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
49602f1523 Merge branch 'svn-trunk' 2021-09-05 20:29:22 -07: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
2164b456dc Merge branch 'svn-trunk' 2021-09-05 09:42:45 -07: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