Commit Graph

7122 Commits

Author SHA1 Message Date
Bart Van Assche
eb34335f2f scst: Suppress a warning in scst_cm_update_dev()
Suppress the following warning:

WARNING: CPU: 0 PID: 6998 at scst/src/scst_copy_mgr.c:2672 scst_cm_update_dev+0xdc/0x110

This warning can be triggered during unregistration of a virtual device with
the following test case:
1. Change a parameter of the virtual device, e.g. the USN.
2. Delete the LUN.

That triggers the following sequence:
1. vdev_del_device()
2. scst_unregister_virtual_device()
3. scst_acg_del_lun()
4. cancel the work struct associated with vdev_inq_changed_fn().
5. visk_detach()
6. vdev_del_device() finishes.

vdev_inq_changed_fn() may get called after a LUN has been unregistered from
the copy manager and before device deletion finishes.

Reported-by: Gleb Chesnokov <Chesnokov.G@raidix.com>




git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9341 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-02-09 03:42:26 +00:00
Bart Van Assche
c522f2448d scst: Increase the maximum READ CAPACITY(16) response buffer size
From the libiscsi source code:

        readcapacity16(sd, &rc16_task, /*alloc_len=*/96, EXPECT_STATUS_GOOD);

Hence increase the limit from 32 to 128.

Fixes: dd467b0eda ("scst: Limit the size of READ CAPACITY buffers")



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9340 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-02-09 03:37:28 +00:00
Vladislav Bolkhovitin
92a6dad912 Web copyrights updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9339 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-02-05 20:26:25 +00:00
Bart Van Assche
5a8db0e00f README.performance: Add to repository
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9338 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-24 03:59:03 +00:00
Bart Van Assche
3562037277 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9337 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-23 16:59:56 +00:00
Bart Van Assche
dd467b0eda scst: Limit the size of READ CAPACITY buffers
Fixes: be8b679bb8 ("scst: fix tapes handling with Windows initiators")
Reported-by: James McCarthy <mccarthy1029@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9336 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-17 20:31:31 +00:00
Bart Van Assche
ed0bb63c54 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9335 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-17 16:21:56 +00:00
Bart Van Assche
48e2034307 Debian: Follow-up for r9333
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9334 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-10 01:22:26 +00:00
Bart Van Assche
613e7583c2 Debian: Various package building improvements
Use a two digit revision number instead of a single digit revision number to
fix a lintian warning. Exclude .gitignore files from the source archive.
Copy the debhelper major version number into debian/compat instead of
hardcoding the compatibility level because the highest compatibility level
supported by Ubuntu 16.04 is 9 and because compatibility level 9 is considered
deprecated by Ubuntu 20.04.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9333 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-10 01:21:44 +00:00
Bart Van Assche
e0e4dcba2c dpkg: Use defaults if DEBEMAIL or DEBFULLNAME have not been set
This makes it easier to build a Debian package.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9332 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-10 01:18:07 +00:00
Bart Van Assche
94a84adbf7 scst: Micro-optimize the overflow checks in scst_tape_generic_parse()
Use shift operations instead of multiplication operations. See also commit
6258844d60 ("scst: fix overflows handling for tapes").


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9331 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-10 01:17:29 +00:00
Bart Van Assche
5d630c2514 Revert "debian/rules: Also clean the scstadmin/scstadmin soft link"
Since the soft link scstadmin/scstadmin is under source control, do not
remove it while removing build artefacts. See also commit b3435fbdda
("debian/rules: Also clean the scstadmin/scstadmin soft link").



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9330 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-10 01:16:26 +00:00
Bart Van Assche
013aecf10e scst: Fix the PERCPU_REF_ALLOW_REINIT backport
Fixes: 8eeb9af891 ("scst: Fix the CentOS / RHEL 8.[012] builds")


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9329 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-10 01:15:01 +00:00
Bart Van Assche
8eeb9af891 scst: Fix the CentOS / RHEL 8.[012] builds
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9328 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-08 03:20:42 +00:00
Bart Van Assche
1d157c0bc1 fcst: Fix the kernel v5.10 build
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9327 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-08 03:19:39 +00:00
Bart Van Assche
a9d4468352 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9326 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-06 21:50:14 +00:00
Bart Van Assche
147ced0a55 scst_vdisk: Make vdisk_get_file_size() return 0 upon success
Reported-by: Grant Albitz <GAlbitz@comstar-usa.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9325 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-04 21:22:57 +00:00
Bart Van Assche
9aaa0846dc scst: Add support for the READ and WRITE DYN RUNTIME ATTR commands
Signed-off-by: Rob Turk <robtu@rtist.nl>
[ bvanassche: moved get_cdb_info_dyn_runtime_attr() definition ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9324 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-04 03:59:00 +00:00
Bart Van Assche
e6561891ff nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9323 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-04 02:14:20 +00:00
Bart Van Assche
427981871e scst_lib: Fix spelling of "SEND DVD STRUCTURE"
Reported-by: Rob Turk <robtu@rtist.nl>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9322 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-03 03:20:00 +00:00
Bart Van Assche
1b3d5b60eb scst: Rework the mechanism for suspending activity
Use a percpu_ref instead of one atomic counter per CPU. This patch
eliminates two atomic instructions from the command processing path.
This patch decreases performance for the following configurations
because the backported version of percpu_ref uses a single global
counter:
* RHEL 6.x / CentOS 6.x and before (maintenance ended on 2020-11-30).
* Upstream kernel version v3.10 and before.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9321 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-03 02:59:31 +00:00
Bart Van Assche
7f0900b858 scst: Modify the code that decides whether or not to process in tasklet context
Since the next patch will remove cpu_cmd_count, make this decision
independent of cpu_cmd_count.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9320 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-03 02:56:01 +00:00
Bart Van Assche
cb8c3a4725 scst: Fix percpu-ref reinitialization for RHEL 8 / CentOS 8
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9319 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-03 02:54:08 +00:00
Bart Van Assche
df4c250b8d scst_vdisk: Port to Linux kernel v5.11
Use blkdev_get_by_path() to open block devices instead of filp_open().


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9318 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-03 02:53:36 +00:00
Bart Van Assche
8f2e1df308 scst_vdisk: Use blkdev_get_by_path() to open block devices
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9317 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-03 02:52:31 +00:00
Bart Van Assche
616730270b scst: Rework vdisk_get_file_size()
Linux kernel commit 4e7b5671c6a8 ("block: remove i_bdev"; v5.11-rc1) removes
the i_bdev member of struct inode. Hence use blkdev_get_by_path() to open
block devices when the struct block_device pointer is needed instead of using
filp_open().



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9316 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-03 02:51:31 +00:00
Bart Van Assche
1c3d35bdab scst_vdisk: Rework vdisk_set_wt() and vcdrom_change()
This patch breaks the transactional properties of these functions but
makes it easier to port these functions to Linux kernel v5.10.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9315 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-03 02:48:04 +00:00
Bart Van Assche
6b420cfb32 fcst: Port to Linux kernel v5.10
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9314 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-03 02:46:48 +00:00
Bart Van Assche
b474628992 scst_lib: Port to Linux kernel v5.10
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9313 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-03 00:40:12 +00:00
Bart Van Assche
116ab5adc3 scst_vdisk: Split several lines that exceed 80 characters
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9312 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-03 00:38:14 +00:00
Bart Van Assche
10abb160b0 scst_vdisk: Fix trailing whitespace removal code in vcdrom_change()
Stop looking for trailing whitespace when p == buffer. Remove the local
variable 'pp' since it always equals p + 1.

Fixes: f381dbb74c ("Device sysfs locking reconsidered to remove recently introduced deadlock possibility")


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9311 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-03 00:37:37 +00:00
Bart Van Assche
c0151f6cda Bump the version number to 3.6.0
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9310 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-02 23:16:59 +00:00
Bart Van Assche
2aed2394ef qla2x00t-32gbit: Implement the find_cmd_by_tag() callback
Fixes: ab09b4f3c3 ("qla2x00t-32gbit: Drop TARGET_SCF_LOOKUP_LUN_FROM_TAG")



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9309 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-01 04:00:13 +00:00
Bart Van Assche
e9b7c7e8ff scst_lib: Fix a kernel-doc header
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9308 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-31 22:46:20 +00:00
Bart Van Assche
ea7fac484e qla2x00t-32gbit: Backport to older kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9307 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-31 16:59:15 +00:00
Bart Van Assche
4664d87d6a scripts/kernel-functions: Apply the yylloc patch also to scripts/dtc/dtc-lexer.lex.c_shipped
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9306 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-31 16:58:27 +00:00
Bart Van Assche
0895adbb92 scripts/kernel-functions: Unbreak the build against kernel versions 2.6.34[2..7]
Fixes: e3d187f6af ("scripts/kernel-functions: Apply kernel patches more selectively")



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9305 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-31 16:57:10 +00:00
Bart Van Assche
5b5a50db96 qla2x00t-32gbit: Fix the use of whitespace in qla_target.c
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9304 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-29 00:30:54 +00:00
Bart Van Assche
aa81b9023b qla2x00t-32gbit: Remove qla_nvme_ls() return value
The function always returns QLA_SUCCESS and the caller qla2x00_start_sp()
doesn't even evalute the return value. So there is no point in returning a
status.

Link: https://lore.kernel.org/r/20200520130819.90625-1-dwagner@suse.de
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

See also upstream commit ac988c49367a52b466285239361ede0f74c672da.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9303 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-29 00:21:49 +00:00
Bart Van Assche
5055d80d36 qla2x00t-32gbit: Update version to 10.02.00.104-k
Link: https://lore.kernel.org/r/20201202132312.19966-16-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>

See also upstream commit afc516dcfe52802e0d29e37e3200c0f08583bd8f.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9302 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 23:53:31 +00:00
Bart Van Assche
dad1b2cb9c qla2x00t-32gbit: Fix device loss on 4G and older HBAs
Due to a bug in the older scan logic, when a once lost device re-appeared,
it was not discovered. Fix this by resetting login_retry counter upon
device discovery.

This is applicable only for 4G and older HBAs.

Link: https://lore.kernel.org/r/20201202132312.19966-15-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>

See also upstream commit abd9cae9bbae9f3a80dae82587b1f79161ad7836.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9301 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 23:52:31 +00:00
Bart Van Assche
ab98afb456 qla2x00t-32gbit: If fcport is undergoing deletion complete I/O with retry
Driver unload with I/Os in flight causes server to crash.  Complete I/O
with DID_IMM_RETRY if fcport undergoing deletion.

CPU: 44 PID: 35008 Comm: qla2xxx_4_dpc Kdump: loaded Tainted: G
OE  X   5.3.18-22-default #1 SLE15-SP2 (unreleased)
Hardware name: HPE ProLiant DL380 Gen10/ProLiant DL380 Gen10, BIOS U30 07/16/2020
RIP: 0010:dma_direct_unmap_sg+0x24/0x60
Code: 4c 8b 04 24 eb b9 0f 1f 44 00 00 85 d2 7e 4e 41 57
      4d 89 c7 41 56 41 89 ce 41 55 49 89 fd 41 54 41 89 d4 55 31 ed 53 48 89
      f3 <8b> 53 18 48 8b 73 10 4d 89 f8 44 89 f1 4c 89 ef 83 c5 01 e8 44 ff
RSP: 0018:ffffc0c661037d88 EFLAGS: 00010046
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000002
RDX: 000000000000001d RSI: 0000000000000000 RDI: ffff9a51ee53b0b0
RBP: 0000000000000000 R08: 0000000000000000 R09: ffff9a51ee53b0b0
R10: ffffc0c646463dc8 R11: ffff9a4a067087c8 R12: 000000000000001d
R13: ffff9a51ee53b0b0 R14: 0000000000000002 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff9a523f800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000018 CR3: 000000043740a004 CR4: 00000000007606e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
PKRU: 55555554
Call Trace:
qla2xxx_qpair_sp_free_dma+0x20d/0x3c0 [qla2xxx]
qla2xxx_qpair_sp_compl+0x35/0x90 [qla2xxx]
__qla2x00_abort_all_cmds+0x180/0x390 [qla2xxx]
? qla24xx_process_purex_list+0x100/0x100 [qla2xxx]
qla2x00_abort_all_cmds+0x5e/0x80 [qla2xxx]
qla2x00_do_dpc+0x317/0xa30 [qla2xxx]
kthread+0x10d/0x130
? kthread_park+0xa0/0xa0
ret_from_fork+0x35/0x40

Link: https://lore.kernel.org/r/20201202132312.19966-14-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.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>

See also upstream commit 707531bc2626c1959a03b93566ebb4e629c99276.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9300 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 23:51:49 +00:00
Bart Van Assche
3e72ee7690 qla2x00t-32gbit: Fix the call trace for flush workqueue
The call trace was because workqueue was allocated without any flags, added
WQ_MEM_RECLAIM as flag when allocating.

kernel: workqueue: WQ_MEM_RECLAIM
kblockd:blk_mq_run_work_fn is flushing !WQ_MEM_RECLAIM qla2xxx_wq:0x0
kernel: WARNING: CPU: 0 PID: 2475 at
kernel/workqueue.c:2593 check_flush_dependency+0x110/0x130
kernel: CPU: 0 PID: 2475 Comm: kworker/0:1H Kdump:
loaded Tainted: G           OE    --------- -  - 4.18.0-193.el8.x86_64 #1
kernel: Hardware name: HPE ProLiant XL170r Gen10/ProLiant XL170r Gen10, BIOS U38 05/21/2019
kernel: Workqueue: kblockd blk_mq_run_work_fn
kernel: RIP: 0010:check_flush_dependency+0x110/0x130
kernel: Code: ff ff 48 8b 50 18 48 8d 8b b0 00 00 00 49 89 e8 48 81 c6 b0 00 00 00 48 c7 c7 00 1e e9
	95 c6 05 dc 9a 2f 01 01 e8 1a 42 fe ff <0f> 0b e9 0a ff ff ff 80 3d ca 9a 2f 01 0 0 75 95 e9 41 ff ff ff 90
kernel: RSP: 0018:ffffa40f48b2baf8 EFLAGS: 00010282
kernel: RAX: 0000000000000000 RBX: ffff946795282600 RCX: 0000000000000000
kernel: RDX: 000000000000005f RSI: ffffffff96a1af7f RDI: 0000000000000246
kernel: RBP: 0000000000000000 R08: ffffffff96a1af20 R09: 0000000000029480
kernel: R10: 00080c89bb3e7462 R11: 00000000000009ab R12: ffff946773628000
kernel: R13: 0000000000000282 R14: 0000000000000246 R15: ffffa40f48b2bb40
kernel: FS: 	0000000000000000(0000) 	GS:ffff94679fa00000(0000) knlGS:0000000000000000
kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kernel: CR2: 00005570c4b60110 CR3: 000000029140a005 CR4: 00000000007606f0
kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
kernel: DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
kernel: PKRU: 55555554
kernel: Call Trace:
kernel: flush_workqueue+0x13a/0x440
kernel: qla2x00_wait_for_sess_deletion+0x1d6/0x200 [qla2xxx]
kernel: ? finish_wait+0x80/0x80
kernel: qla2xxx_disable_port+0x2b/0x30 [qla2xxx]
kernel: qla2x00_process_vendor_specific+0x1dc9/0x2d20 [qla2xxx]
kernel: ? blk_rq_map_sg+0x195/0x570
kernel: qla24xx_bsg_request+0x1a3/0xf90 [qla2xxx]

Link: https://lore.kernel.org/r/20201202132312.19966-13-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.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>

See also upstream commit 0a6f4d762c6b8fd0d442db74c8d279744100ae25.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9299 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 23:51:08 +00:00
Bart Van Assche
44dd7f48a3 qla2x00t-32gbit: Fix flash update in 28XX adapters on big endian machines
Flash update failed due to missing endian conversion in FLT region access
as well as in checksum computation.

Link: https://lore.kernel.org/r/20201202132312.19966-12-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>

See also upstream commit 0bc17251dff432f2589d3d509fb4dc14912d4372.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9298 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 23:50:15 +00:00
Bart Van Assche
68207cfbb0 qla2x00t-32gbit: Handle aborts correctly for port undergoing deletion
Call trace observed while shutting down the adapter ports (LINK DOWN).
Handle aborts correctly.

localhost kernel: INFO: task nvme:44209 blocked for more than 120 seconds.
localhost kernel: "echo 0 >/proc/sys/kernel/hung_task_timeout_secs" disables this message.
localhost kernel: nvme            D ffff88b45fb5acc0     0 44209 1 0x00000080
localhost kernel: Call Trace:
localhost kernel: [<ffffffffbd187169>] schedule+0x29/0x70
localhost kernel: [<ffffffffbd184c51>] schedule_timeout+0x221/0x2d0
localhost kernel: [<ffffffffbcad7229>] ? ttwu_do_wakeup+0x19/0xe0
localhost kernel: [<ffffffffbcad735f>] ? ttwu_do_activate+0x6f/0x80
localhost kernel: [<ffffffffbcada830>] ? try_to_wake_up+0x190/0x390
localhost kernel: [<ffffffffbd18751d>] wait_for_completion+0xfd/0x140
localhost kernel: [<ffffffffbcadaaf0>] ? wake_up_state+0x20/0x20
localhost kernel: [<ffffffffbcabe3da>] flush_work+0x10a/0x1b0
localhost kernel: [<ffffffffbcabb0f0>] ? move_linked_works+0x90/0x90
localhost kernel: [<ffffffffbcabe6cf>] flush_delayed_work+0x3f/0x50
localhost kernel: [<ffffffffc0452767>] nvme_fc_init_ctrl+0x657/0x6a0 [nvme_fc]
localhost kernel: [<ffffffffc045293a>] nvme_fc_create_ctrl+0x18a/0x210 [nvme_fc]
localhost kernel: [<ffffffffc028962f>] nvmf_dev_write+0x98f/0xb35 [nvme_fabrics]
localhost kernel: [<ffffffffbcd08927>] ? security_file_permission+0x27/0xa0
localhost kernel: [<ffffffffbcc4db50>] vfs_write+0xc0/0x1f0
localhost kernel: [<ffffffffbcc4e92f>] SyS_write+0x7f/0xf0
localhost kernel: [<ffffffffbd193f92>] system_call_fastpath+0x25/0x2a

Link: https://lore.kernel.org/r/20201202132312.19966-11-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.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>

See also upstream commit f795f96e725b472de59db06a21a23e2285faaf14.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9297 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 23:49:15 +00:00
Bart Van Assche
baed87d219 qla2x00t-32gbit: Fix crash during driver load on big endian machines
Crash stack:
	[576544.715489] Unable to handle kernel paging request for data at address 0xd00000000f970000
	[576544.715497] Faulting instruction address: 0xd00000000f880f64
	[576544.715503] Oops: Kernel access of bad area, sig: 11 [#1]
	[576544.715506] SMP NR_CPUS=2048 NUMA pSeries
	:
	[576544.715703] NIP [d00000000f880f64] .qla27xx_fwdt_template_valid+0x94/0x100 [qla2xxx]
	[576544.715722] LR [d00000000f7952dc] .qla24xx_load_risc_flash+0x2fc/0x590 [qla2xxx]
	[576544.715726] Call Trace:
	[576544.715731] [c0000004d0ffb000] [c0000006fe02c350] 0xc0000006fe02c350 (unreliable)
	[576544.715750] [c0000004d0ffb080] [d00000000f7952dc] .qla24xx_load_risc_flash+0x2fc/0x590 [qla2xxx]
	[576544.715770] [c0000004d0ffb170] [d00000000f7aa034] .qla81xx_load_risc+0x84/0x1a0 [qla2xxx]
	[576544.715789] [c0000004d0ffb210] [d00000000f79f7c8] .qla2x00_setup_chip+0xc8/0x910 [qla2xxx]
	[576544.715808] [c0000004d0ffb300] [d00000000f7a631c] .qla2x00_initialize_adapter+0x4dc/0xb00 [qla2xxx]
	[576544.715826] [c0000004d0ffb3e0] [d00000000f78ce28] .qla2x00_probe_one+0xf08/0x2200 [qla2xxx]

Link: https://lore.kernel.org/r/20201202132312.19966-8-njavali@marvell.com
Fixes: f73cb695d3ec ("[SCSI] qla2xxx: Add support for ISP2071.")
Cc: stable@vger.kernel.org
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>

See also upstream commit 8de309e7299a00b3045fb274f82b326f356404f0.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9296 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 23:46:16 +00:00
Bart Van Assche
b885c5f4e5 qla2x00t-32gbit: Fix compilation issue in PPC systems
Fix compile time errors reported on PPC systems,

qla_gbl.h:991:20: error: inlining failed in call to always_inline
     qla_nvme_abort_set_option: function body not available

Link: https://lore.kernel.org/r/20201202132312.19966-7-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>

See also upstream commit aceba54ba0f998ed6bec88faaf94e7458f753399.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9295 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 23:41:05 +00:00
Bart Van Assche
260f713d87 qla2x00t-32gbit: Don't check for fw_started while posting NVMe command
NVMe commands can come only after successful addition of rport and NVMe
connect, and rport is only registered after FW started bit is set. Remove
the redundant check.

Link: https://lore.kernel.org/r/20201202132312.19966-6-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.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>

See also upstream commit 0ce8ab50a6ed7c10bc3b7fc00d4aa5b67b5f9e2c.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9294 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 23:39:33 +00:00
Bart Van Assche
6464aae05b qla2x00t-32gbit: Tear down session if FW say it is down
The completion status 0x28 (ppc = be = 0x2800) below indicates session is
not there, trigger session deletion.

qla2xxx [000b:04:00.1]-8009:8: DEVICE RESET ISSUED nexus=8:1:51 cmd=c000001432d0f600.
qla2xxx [000b:04:00.1]-5039:8: Async-tmf error - hdl=67b completion status(2800).
qla2xxx [000b:04:00.1]-8030:8: TM IOCB failed (102).
qla2xxx [000b:04:00.1]-800c:8: do_reset failed for cmd=c000001432d0f600.
qla2xxx [000b:04:00.1]-800f:8: DEVICE RESET FAILED: Task management failed nexus=8:1:51 cmd=c000001432d0f600.
qla2xxx [000b:04:00.1]-8009:8: DEVICE RESET ISSUED nexus=8:1:52 cmd=c000001432d0c200.
qla2xxx [000b:04:00.1]-5039:8: Async-tmf error - hdl=67c completion status(2800).
qla2xxx [000b:04:00.1]-8030:8: TM IOCB failed (102).

Link: https://lore.kernel.org/r/20201202132312.19966-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>

See also upstream commit e4fc78f48d3f8a9ea49e4b24878ac48dc9a58744.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9293 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 23:38:59 +00:00
Bart Van Assche
bb519e83d1 qla2x00t-32gbit: Limit interrupt vectors to number of CPUs
Driver created too many QPairs(126) with 28xx adapter.  Limit to the number
of CPUs to minimize wasted resources.

Link: https://lore.kernel.org/r/20201202132312.19966-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>

See also upstream commit a6dcfe08487e5e83b6b4214c959a9577a9ed2d9f.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9292 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 23:38:04 +00:00