Commit Graph

6523 Commits

Author SHA1 Message Date
Bart Van Assche
dca8c7facd iscsi-scstd: Fix a gcc 10 compiler warning (merge r8954 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.4.x@9007 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-11 01:59:21 +00:00
Bart Van Assche
f03f51482d ib_srpt: Prevent that large RDMA transfers trigger QP termination (merge r8938 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.4.x@8945 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-20 00:34:00 +00:00
Bart Van Assche
26099e2407 scstadmin: Restore support for setting write-only attributes (merge r8915 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.4.x@8918 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-15 15:47:51 +00:00
Bart Van Assche
eb8d5f0825 Undo the changes from r8916
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.4.x@8917 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-15 15:46:47 +00:00
Bart Van Assche
94731537d6 scstadmin: Restore support for setting write-only attributes (merge r8171 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.4.x@8916 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-14 20:47:54 +00:00
Bart Van Assche
14813e79e9 nightly build: Update kernel versions (merge trunk r8672:8894)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.4.x@8898 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-10 21:12:25 +00:00
Bart Van Assche
dd91145744 scst: Port to Linux kernel v5.7 (merge trunk r8863)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.4.x@8897 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-10 21:08:27 +00:00
Bart Van Assche
42cedf87c4 iscsi-scst, srpt: Fix the build against MOFED 5 (merge r8866 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.4.x@8896 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-10 21:06:34 +00:00
Bart Van Assche
c0e541e1ad Update svn:ignore properties (merge r8874 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.4.x@8895 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-10 21:05:36 +00:00
Bart Van Assche
ce7ddb78fb scst_user: Set replies_done to zero if replies_cnt == 0 (merge r8861 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.4.x@8862 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-04-11 17:14:09 +00:00
Bart Van Assche
a7852b18ba scst/kernel/in-tree/Makefile.drivers.Linux.patch: Port to kernel v5.6 (merge r8849 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.4.x@8860 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-04-08 22:15:45 +00:00
Bart Van Assche
9c44d5889f scripts/generate-kernel-patch: Revert a change that should not have been merged
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.4.x@8859 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-04-08 21:30:34 +00:00
Bart Van Assche
c7c55d03ac scripts: Merge r7819:8857 from trunk
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.4.x@8858 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-04-08 14:50:30 +00:00
Bart Van Assche
47083945e4 scst, qla2x00t: Use pr_warn() instead of pr_warning() (backport r8697 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.4.x@8856 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-04-08 14:40:18 +00:00
Bart Van Assche
072020c022 qla2x00t-32gbit: Port to Linux kernel v5.5 (backport r8764 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.4.x@8855 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-04-08 14:39:33 +00:00
Bart Van Assche
6e37315710 Makefiles: Use KBUILD_EXTRA_SYMBOLS instead of copying Module.symvers (backport r8686 from the trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.4.x@8854 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-04-08 14:38:38 +00:00
Bart Van Assche
6d8d1eca79 scst: Use bitmap_parse() instead of __bitmap_parse() (backport r8772 from the trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.4.x@8853 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-04-08 14:33:57 +00:00
Bart Van Assche
6b8598f3d0 scst: Convert mutex_release() and rwlock_release() to the kernel v5.5 prototypes (backport r8694 from the trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.4.x@8852 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-04-08 14:33:12 +00:00
Bart Van Assche
fbbe2910da Create 3.4.x branch
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.4.x@8675 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-04 04:17:43 +00:00
Bart Van Assche
ce557f2f1c scst, fcst, iscsi-scst, srpt, ...: Bump version number to 3.4.0
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8674 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-03 04:22:16 +00:00
Bart Van Assche
f22d4bb63b scst, fcst, iscsi-scst, qla2x00t, srpt: Add module namespace support
This patch adds support for kernel module namespaces. This patch is essential
when using SCST in combination with kernel version v5.4 or later.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8673 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-30 00:54:20 +00:00
Bart Van Assche
df61d43643 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8672 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-29 16:10:50 +00:00
Bart Van Assche
5406b273a2 qla2x00t-32gbit: fix NPIV tear down process
Fix two issues with commit f5187b7d1ac6 ("scsi: qla2xxx: Optimize NPIV
tear down process"): a missing negation in a wait_event_timeout()
condition, and a missing loop end condition.

Fixes: f5187b7d1ac6 ("scsi: qla2xxx: Optimize NPIV tear down process")
Link: https://lore.kernel.org/r/20191105145550.10268-1-martin.wilck@suse.com
Signed-off-by: Martin Wilck <mwilck@suse.com>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit 8b1062d513880b3ec696945f15dc84d179f1f3c1 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8671 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-29 05:27:03 +00:00
Bart Van Assche
1391db2d8c nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8670 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-24 15:47:47 +00:00
Bart Van Assche
c1a340b484 scst: Fix the build against kernel v5.0 and before
Fixes: ef161f930f ("scst: Rework handling of recursive locking")
Reported-by: Ville Skytta <ville.skytta@iki.fi>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8669 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-24 04:49:58 +00:00
Bart Van Assche
50af8e3c4d ib_srpt/Makefile: Improve MOFED support on Debian
Instead of only checking the mlnx-ofed-kernel-dkms, also check the
mlnx-ofed-kernel-modules package name.

Signed-off-by: Ville Skytta <ville.skytta@iki.fi>
[ bvanassche: Combined two patches into this single change ]



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8668 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-23 19:57:05 +00:00
Bart Van Assche
810231050f iscsi-scst/Makefile: Improve MOFED support for Debian systems
Instead of only checking the mlnx-ofed-kernel-dkms package name, also check
the mlnx-ofed-kernel-modules package name.

Signed-off-by: Ville Skytta <ville.skytta@iki.fi>
[ bvanassche: extracted this change from a larger patch ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8667 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-23 19:54:54 +00:00
Bart Van Assche
8bdb6a625a iscsi-scst/Makefile: Fix grabbing OFED_VERS from deb version
Fixes: e7ccfcf213 ("iscsi-scst/Makefile, Ubuntu: Simplify code for version querying")
Signed-off-by: Ville Skytta <ville.skytta@iki.fi>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8666 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-23 06:39:42 +00:00
Bart Van Assche
0f4547b0ff scst_vdisk: Remove a superfluous WARN_ON_ONCE() statement
This patch fixes the following Coverity complaint:

7. assignment: Assigning: usn_len = max_len. The value of usn_len is now 252.

CID 326814 (#1 of 1): Out-of-bounds access (OVERRUN)
8. overrun-buffer-arg: Overrunning array virt_dev->usn of 21 bytes by
   passing it to a function which accesses it at byte offset 251 using
   argument usn_len (which evaluates to 252).

Fixes: ca180efeec ("scst_vdisk: Avoid that vdisk_usn_vpd() can trigger a buffer overflow")


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8665 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-17 22:08:45 +00:00
Bart Van Assche
f539200de5 scst: Remove the nolockdep patch files
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8664 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-17 19:26:17 +00:00
Bart Van Assche
ef161f930f scst: Rework handling of recursive locking
Use lockdep_register_key() and lockdep_unregister_key() instead of
disabling lockdep checking for certain lock objects. See also Linux
kernel commit 108c14858b9e ("locking/lockdep: Add support for dynamic
keys"; kernel version v5.1).



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8663 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-17 19:24:43 +00:00
Bart Van Assche
30f4ebdab7 scst: Simplify scst_cm_del_free_list_id()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8662 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-17 19:22:02 +00:00
Bart Van Assche
c6abe376e9 scst_vdisk, async file I/O: Fix a WARN_ON_ONCE() statement
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8661 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-17 19:21:33 +00:00
Bart Van Assche
23a9e8e1e6 scst_vdisk, async file I/O: Report residuals instead of triggering two kernel warnings
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8660 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-17 19:20:47 +00:00
Bart Van Assche
c6c6a94965 iscsi: Remove a debug assert
Remove this debug assert because it a write residual can happen, e.g. if the
expected transfer length exceeds the Data Out buffer length. This statement
was hit by the following CDB, submitted by the libiscsi regression tests:

[14896]: scst: scst_parse_cmd:1235:Warning: expected transfer length 0 (DIF 0) for opcode WRITE(10) (handler vdisk_fileio, target iscsi) doesn't match decoded value 512
[14896]: scst_parse_cmd:1243:Suspicious CDB:
 (h)___0__1__2__3__4__5__6__7__8__9__A__B__C__D__E__F
   0: 2a 00 00 00 00 00 00 00 01 00   *.........



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8659 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-17 19:19:09 +00:00
Bart Van Assche
d5c638ca1d rpm build: Make the RPM build directory configurable
Signed-off-by: Daniel Ahlin <dah@pdc.kth.se>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8658 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-16 04:22:03 +00:00
Bart Van Assche
9d8b4ee467 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8657 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-09 17:26:30 +00:00
Bart Van Assche
1012e86f12 qla2x00t-32gbit: Revert r8645 because it breaks point-to-point mode
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8656 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-09 04:11:10 +00:00
Bart Van Assche
ac145e1cb6 ib_srpt: Detect ib_sg_dma_len() presence at compile time
This patch makes it possible to build the ib_srpt driver against a kernel
before v5.1 + latest MOFED.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8655 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-08 21:28:37 +00:00
Bart Van Assche
e634e03a78 scripts/specialize-patch: Add support for HAVE_SRP_DATA_DESC_IMM
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8654 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-08 21:17:29 +00:00
Bart Van Assche
30c6cdfbe7 ib_srpt: Detect SRP_DATA_DESC_IMM constant support at compile time
This patch makes it possible to build the ib_srpt driver against a kernel
before v4.21 + latest MOFED.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8653 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-08 20:40:51 +00:00
Bart Van Assche
2f37a91d77 Remove more references to the ibmvstgt, mpt and mvsas_tgt drivers
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8652 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-03 21:29:36 +00:00
Bart Van Assche
65b404ccbb qla2x00t-32gbit: stop timer in shutdown path
In shutdown/reboot paths, the timer is not stopped:

  qla2x00_shutdown
  pci_device_shutdown
  device_shutdown
  kernel_restart_prepare
  kernel_restart
  sys_reboot

This causes lockups (on powerpc) when firmware config space access calls
are interrupted by smp_send_stop later in reboot.

Fixes: e30d1756480dc ("[SCSI] qla2xxx: Addition of shutdown callback handler.")
Link: https://lore.kernel.org/r/20191024063804.14538-1-npiggin@gmail.com
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit d3566abb1a1e7772116e4d50fb6a58d19c9802e5 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8651 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-03 00:27:58 +00:00
Bart Van Assche
60f0c2ebe9 qla2x00t-32gbit: Fix partial flash write of MBI
For new adapters with multiple flash regions to write to, current code
allows FW & Boot regions to be written, while other regions are blocked via
sysfs. The fix is to block all flash read/write through sysfs interface.

Fixes: e81d1bcbde06 ("scsi: qla2xxx: Further limit FLASH region write access from SysFS")
Cc: stable@vger.kernel.org # 5.2
Link: https://lore.kernel.org/r/20191022193643.7076-3-hmadhani@marvell.com
Signed-off-by: Quinn Tran <qutran@marvell.com>
ed-off-by: Girish Basrur <gbasrur@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit 8d8b83f5be2a3bdac3695a94e6cb5e50bd114869 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8650 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-03 00:27:19 +00:00
Bart Van Assche
6dd22217c6 qla2x00t-32gbit: Initialize mailbox to prevent driver load failure
This patch fixes issue with Gen7 adapter in a blade environment where one
of the ports will not be detected by driver. Firmware expects mailbox 11 to
be set or cleared by driver for newer ISP.

Following message is seen in the log file:

[   18.810892] qla2xxx [0000:d8:00.0]-1820:1: **** Failed=102 mb[0]=4005 mb[1]=37 mb[2]=20 mb[3]=8
[   18.819596]  cmd=2 ****

[mkp: typos]

Link: https://lore.kernel.org/r/20191022193643.7076-2-hmadhani@marvell.com
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit c2ff2a36eff60efb5e123c940115216d6bf65684 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8649 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-03 00:26:51 +00:00
Bart Van Assche
c24ad5d601 qla2x00t-32gbit: fixup incorrect usage of host_byte
DRIVER_ERROR is a a driver byte setting, not a host byte.  The qla2xxx
driver should rather return DID_ERROR here to be in line with the other
drivers.

Link: https://lore.kernel.org/r/20191018140458.108278-1-hare@suse.de
Signed-off-by: Hannes Reinecke <hare@suse.com>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit 66cf50e65b183c863825f5c28a818e3f47a72e40 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8648 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-03 00:26:23 +00:00
Bart Van Assche
cecdb41bb9 qla2x00t-32gbit: Fix a potential NULL pointer dereference
alloc_workqueue is not checked for errors and as a result a potential
NULL dereference could occur.

Link: https://lore.kernel.org/r/1568824618-4366-1-git-send-email-allen.pais@oracle.com
Signed-off-by: Allen Pais <allen.pais@oracle.com>
Reviewed-by: Martin Wilck <mwilck@suse.com>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit 35a79a63517981a8aea395497c548776347deda8 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8647 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-03 00:25:41 +00:00
Bart Van Assche
56f22a2bbf qla2x00t-32gbit: Remove WARN_ON_ONCE in qla2x00_status_cont_entry()
Commit 88263208dd23 ("scsi: qla2xxx: Complain if sp->done() is not called
from the completion path") introduced the WARN_ON_ONCE in
qla2x00_status_cont_entry(). The assumption was that there is only one
status continuations element. According to the firmware documentation it is
possible that multiple status continuations are emitted by the firmware.

Fixes: 88263208dd23 ("scsi: qla2xxx: Complain if sp->done() is not called from the completion path")
Link: https://lore.kernel.org/r/20190927073031.62296-1-dwagner@suse.de
Cc: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit 9bc6157f5fd0e898c94f3018d088a3419bde0d8f upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8646 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-03 00:25:09 +00:00
Bart Van Assche
db1be8cf77 qla2x00t-32gbit: Fix Nport ID display value
For N2N, the NPort ID is assigned by driver in the PLOGI ELS.  According to
FW Spec the byte order for SID is not the same as DID.

Link: https://lore.kernel.org/r/20190912180918.6436-8-hmadhani@marvell.com
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>
Tested-by: Roman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit 0aabb6b699f72dca96988d3f428e222f932dc889 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8645 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-03 00:24:35 +00:00
Bart Van Assche
d0b4561393 qla2x00t-32gbit: Fix N2N link up fail
During link up/bounce, qla driver would do command flush as part of
cleanup.  In this case, the flush can intefere with FW state.  This patch
allows FW to be in control of link up.

Link: https://lore.kernel.org/r/20190912180918.6436-7-hmadhani@marvell.com
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit f3f1938bb673b1b5ad182c4608f5f8a24921eea3 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8644 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-03 00:24:12 +00:00