Bart Van Assche
08aaacda29
qla2x00t-32gbit: Fix inconsistent format argument type in qla_dbg.c
...
Fix the following warning:
[drivers/scsi/qla2xxx/qla_dbg.c:2451]: (warning) %ld in format string (no. 4)
requires 'long' but the argument type is 'unsigned long'.
Link: https://lore.kernel.org/r/20200930022515.2862532-4-yebin10@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Reviewed-by: Nilesh Javali <njavali@marvell.com >
Signed-off-by: Ye Bin <yebin10@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
See also upstream commit 72e813d9a1b7a0a6dc6b27b563c389fbdb50cee2.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9277 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 23:07:16 +00:00
Bart Van Assche
911051bdc2
qla2x00t-32gbit: Fix inconsistent format argument type in qla_os.c
...
Fix the following warnings:
[drivers/scsi/qla2xxx/qla_os.c:4882]: (warning) %ld in format string (no. 2)
requires 'long' but the argument type is 'unsigned long'.
[drivers/scsi/qla2xxx/qla_os.c:5011]: (warning) %ld in format string (no. 1)
requires 'long' but the argument type is 'unsigned long'.
Link: https://lore.kernel.org/r/20200930022515.2862532-3-yebin10@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Reviewed-by: Nilesh Javali <njavali@marvell.com >
Signed-off-by: Ye Bin <yebin10@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
See also upstream commit 250bd00923c72c846092271a9e51ee373db081b6.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9276 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 23:06:30 +00:00
Bart Van Assche
480e079d69
qla2x00t-32gbit: Update version to 10.02.00.103-k
...
Link: https://lore.kernel.org/r/20200929102152.32278-8-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 718c2fe92b208415fa76550975dc5d7708448f7c.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9275 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 23:05:16 +00:00
Bart Van Assche
01a80a8851
qla2x00t-32gbit: Fix point-to-point (N2N) device discovery issue
...
Driver was using a shorter timeout waiting for PLOGI from the peer in
point-to-point configurations. Some devices takes some time (~4 seconds) to
initiate the PLOGI. This peer initiating PLOGI is when the peer has a
higher P-WWN.
Increase the wait time based on N2N R_A_TOV.
Link: https://lore.kernel.org/r/20200929102152.32278-7-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 94eda2717826015a80ca271394c4378747de8936.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9274 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 23:04:28 +00:00
Bart Van Assche
9a1b2c10e2
qla2x00t-32gbit: Fix crash on session cleanup with unload
...
On unload, session cleanup prematurely gave the signal for driver unload
path to advance.
Link: https://lore.kernel.org/r/20200929102152.32278-6-njavali@marvell.com
Fixes: 726b85487067 ("qla2xxx: Add framework for async fabric discovery")
Cc: stable@vger.kernel.org
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 50457dab670f396557e60c07f086358460876353.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9273 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 23:03:30 +00:00
Bart Van Assche
71746d0d0f
qla2x00t-32gbit: Fix reset of MPI firmware
...
Normally, the MPI firmware is reset when an MPI dump is collected. If an
unsaved MPI dump exists in the driver, though, an alternate mechanism is
used. This mechanism, which was not fully correct, is not recommended and
instead an MPI dump template walk is suggested to perform the MPI reset.
To allow for the MPI dump template walk, extra space is reserved in the MPI
dump buffer which gets used only when there is already an MPI dump in
place.
Link: https://lore.kernel.org/r/20200929102152.32278-5-njavali@marvell.com
Fixes: cbb01c2f2f63 ("scsi: qla2xxx: Fix MPI failure AEN (8200) handling")
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 3e6efab865ac943f4ec43913eb665695737112b0.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9272 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 23:02:39 +00:00
Bart Van Assche
6a5bbac38a
qla2x00t-32gbit: Fix MPI reset needed message
...
When printing the message:
"MPI Heartbeat stop. MPI reset is not needed.."
..the wrong register was checked leading to always printing that MPI reset
is not needed, even when it is needed. Fix the MPI reset message.
Link: https://lore.kernel.org/r/20200929102152.32278-4-njavali@marvell.com
Fixes: cbb01c2f2f63 ("scsi: qla2xxx: Fix MPI failure AEN (8200) handling")
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 7a6cdbd5e87515ebf6231b762ad903c7cff87b9c.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9271 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 23:01:40 +00:00
Bart Van Assche
fa9bf15340
qla2x00t-32gbit: Fix buffer-buffer credit extraction error
...
Current code uses wrong mailbox option to extract bbc from firmware. This
field is nested inside of PLOGI payload. Extract bbc from PLOGI template
payload.
Link: https://lore.kernel.org/r/20200929102152.32278-3-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 44f5a37d1e3e4e392412318666f8477601ae3024.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9270 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 23:00:18 +00:00
Bart Van Assche
f78ec93f05
qla2x00t-32gbit: Correct the check for sscanf() return value
...
Since the version string has been modified, sscanf() returns 4 instead of
6.
Link: https://lore.kernel.org/r/20200929102152.32278-2-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 7dc0f671d89c03db95db3d4cd57257790d7a4b80.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9269 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 22:59:11 +00:00
Bart Van Assche
411c5b0e1b
qla2x00t-32gbit: Update version to 10.02.00.102-k
...
Update internal driver version and remove module version macro.
Link: https://lore.kernel.org/r/20200904045128.23631-14-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 767c8457b729e774f5a4646f60a0598ab868c798.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9268 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 22:58:16 +00:00
Bart Van Assche
4e99fc582f
qla2x00t-32gbit: Add SLER and PI control support
...
BIT_13 of extended FW attribute informs about NVMe-2 support. Set BIT_15
of special feature control block for enabling SLER in FW. Set bit 8 (SLER
supported) to 1 for the service parameter information when sending NVMe
PRLI request. Set BIT_14 of special feature control block for enabling PI
Control in FW. Driver should set bit 9 (PI Control supported) to 1 for the
service parameter information when sending NVMe PRLI request. Set BIT_13
for NVMe Async events.
Link: https://lore.kernel.org/r/20200904045128.23631-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 cf3c54fb49a4eb5b5b83ddab0b25df47b2e958af.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9267 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 22:57:26 +00:00
Bart Van Assche
49f618cea5
qla2x00t-32gbit: Add IOCB resource tracking
...
This patch tracks number of IOCB resources used in the I/O fast path. If
the number of used IOCBs reach a high water limit, driver would return the
I/O as busy and let upper layer retry. This prevents over subscription of
IOCB resources where any future error recovery command is unable to cut
through. Enable IOCB throttling by default.
Link: https://lore.kernel.org/r/20200904045128.23631-12-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Quinn Tran <qutran@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 89c72f4245a8510ffdb0d1980944210b8bc6e49f.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9266 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 22:56:20 +00:00
Bart Van Assche
dc06ae2b08
qla2x00t-32gbit: Add rport fields in debugfs
...
This patch adds rport fields in debugfs.
Link: https://lore.kernel.org/r/20200904045128.23631-11-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 6152d20fa6703cf364253efc4eab31151558cb01.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9265 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 22:54:58 +00:00
Bart Van Assche
51c390f09d
qla2x00t-32gbit: Make tgt_port_database available in initiator mode
...
tgt_port_database data is today exported only in target mode, allow it to
be shown in initiator mode as well.
Link: https://lore.kernel.org/r/20200904045128.23631-10-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 4e5a05d1ecd92cec59b11c33821b5407984df81d.
---
drivers/scsi/qla2xxx/qla_dfs.c | 64 +++++++++++++++++-----------------
1 file changed, 32 insertions(+), 32 deletions(-)
diff --git a/drivers/scsi/qla2xxx/qla_dfs.c b/drivers/scsi/qla2xxx/qla_dfs.c
index 616ce891818d..1e9db568aee3 100644
--- a/drivers/scsi/qla2xxx/qla_dfs.c
+++ b/drivers/scsi/qla2xxx/qla_dfs.c
@@ -138,51 +138,51 @@ qla2x00_dfs_tgt_port_database_show(struct seq_file *s, void *unused)
{
scsi_qla_host_t *vha = s->private;
struct qla_hw_data *ha = vha->hw;
- struct gid_list_info *gid_list, *gid;
+ struct gid_list_info *gid_list;
dma_addr_t gid_list_dma;
fc_port_t fc_port;
+ char *id_iter;
int rc, i;
uint16_t entries, loop_id;
- struct qla_tgt *tgt = vha->vha_tgt.qla_tgt;
seq_printf(s, "%s\n", vha->host_str);
- if (tgt) {
- gid_list = dma_alloc_coherent(&ha->pdev->dev,
- qla2x00_gid_list_size(ha),
- &gid_list_dma, GFP_KERNEL);
- if (!gid_list) {
- ql_dbg(ql_dbg_user, vha, 0x7018,
- "DMA allocation failed for %u\n",
- qla2x00_gid_list_size(ha));
- return 0;
- }
+ gid_list = dma_alloc_coherent(&ha->pdev->dev,
+ qla2x00_gid_list_size(ha),
+ &gid_list_dma, GFP_KERNEL);
+ if (!gid_list) {
+ ql_dbg(ql_dbg_user, vha, 0x7018,
+ "DMA allocation failed for %u\n",
+ qla2x00_gid_list_size(ha));
+ return 0;
+ }
- rc = qla24xx_gidlist_wait(vha, gid_list, gid_list_dma,
- &entries);
- if (rc != QLA_SUCCESS)
- goto out_free_id_list;
+ rc = qla24xx_gidlist_wait(vha, gid_list, gid_list_dma,
+ &entries);
+ if (rc != QLA_SUCCESS)
+ goto out_free_id_list;
- gid = gid_list;
+ id_iter = (char *)gid_list;
- seq_puts(s, "Port Name Port ID Loop ID\n");
+ seq_puts(s, "Port Name Port ID Loop ID\n");
- for (i = 0; i < entries; i++) {
- loop_id = le16_to_cpu(gid->loop_id);
- memset(&fc_port, 0, sizeof(fc_port_t));
+ for (i = 0; i < entries; i++) {
+ struct gid_list_info *gid =
+ (struct gid_list_info *)id_iter;
+ loop_id = le16_to_cpu(gid->loop_id);
+ memset(&fc_port, 0, sizeof(fc_port_t));
- fc_port.loop_id = loop_id;
+ fc_port.loop_id = loop_id;
- rc = qla24xx_gpdb_wait(vha, &fc_port, 0);
- seq_printf(s, "%8phC %02x%02x%02x %d\n",
- fc_port.port_name, fc_port.d_id.b.domain,
- fc_port.d_id.b.area, fc_port.d_id.b.al_pa,
- fc_port.loop_id);
- gid = (void *)gid + ha->gid_list_info_size;
- }
-out_free_id_list:
- dma_free_coherent(&ha->pdev->dev, qla2x00_gid_list_size(ha),
- gid_list, gid_list_dma);
+ rc = qla24xx_gpdb_wait(vha, &fc_port, 0);
+ seq_printf(s, "%8phC %02x%02x%02x %d\n",
+ fc_port.port_name, fc_port.d_id.b.domain,
+ fc_port.d_id.b.area, fc_port.d_id.b.al_pa,
+ fc_port.loop_id);
+ id_iter += ha->gid_list_info_size;
}
+out_free_id_list:
+ dma_free_coherent(&ha->pdev->dev, qla2x00_gid_list_size(ha),
+ gid_list, gid_list_dma);
return 0;
}
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9264 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 22:54:00 +00:00
Bart Van Assche
e5b56feaef
qla2x00t-32gbit: Fix I/O errors during LIP reset tests
...
In .fcp_io(), returning ENODEV as soon as remote port delete has started
can cause I/O errors. Fix this by returning EBUSY until the remote port
delete finishes.
Link: https://lore.kernel.org/r/20200904045128.23631-9-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 a35f87bdcc0615c5a3a695d13dd1ccf827826368.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9263 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 22:53:12 +00:00
Bart Van Assche
3eb6d581ba
qla2x00t-32gbit: Performance tweak
...
Move statistics fields from vha struct to qpair to reduce memory thrashing.
Link: https://lore.kernel.org/r/20200904045128.23631-8-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 49db4d4e02aabcd4fa2f60142ef42e50fb2dd526.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9262 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 22:52:11 +00:00
Bart Van Assche
4aa1dc12c8
qla2x00t-32gbit: Fix memory size truncation
...
Memory size calculations for Extended Login used in hardware offload got
truncated. Fix this by changing definition of exlogin_size to use uint32_t.
Link: https://lore.kernel.org/r/20200904045128.23631-7-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 d38cb849e17a34637b97ce57c550ec70d63dd39a.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9261 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 22:48:59 +00:00
Bart Van Assche
9887b73dd2
qla2x00t-32gbit: Reduce duplicate code in reporting speed
...
Indicate correct speed for 16G Mezz card.
Link: https://lore.kernel.org/r/20200904045128.23631-6-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 d68930bae477e864e016aeb8d557f099b4636aac.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9260 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 20:10:28 +00:00
Bart Van Assche
fc2ae4183c
qla2x00t-32gbit: Honor status qualifier in FCP_RSP per spec
...
FCP-4 (referred FCP-4 rev-2b) identifies the earlier known "retry delay
timer" field as "status qualifier", which is described in SAM-5 and later
specs. This fix makes appropriate driver side modifications to honor the
new definition. The SAM document referred was SAM-6 rev-5.
Link: https://lore.kernel.org/r/20200904045128.23631-5-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Arun Easi <aeasi@marvell.com >
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
See also upstream commit 3aac0c0fde17d2fdb65c7840bdf057a681f1e035.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9259 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 20:09:19 +00:00
Bart Van Assche
f48aaeb800
qla2x00t-32gbit: Allow dev_loss_tmo setting for FC-NVMe devices
...
Add a remote port debugfs entry to get/set dev_loss_tmo for NVMe devices.
Link: https://lore.kernel.org/r/20200904045128.23631-4-njavali@marvell.com
Reported-by: kernel test robot <lkp@intel.com >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Arun Easi <aeasi@marvell.com >
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
See also upstream commit 27c8aa5e1b069b7629e41bba83b522f99132a6b6.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9258 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 20:07:18 +00:00
Bart Van Assche
c121158a2a
qla2x00t-32gbit: Setup debugfs entries for remote ports
...
Create a base for adding remote port related entries in debugfs.
Link: https://lore.kernel.org/r/20200904045128.23631-3-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Arun Easi <aeasi@marvell.com >
Signed-off-by: Himanshu Madhani <hmadhani@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 >
See also upstream commit 1e98fb0f9208da058e2b6627f9f19fa0a95d05cd.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9257 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 20:06:16 +00:00
Bart Van Assche
6d60582dff
qla2x00t-32gbit: Fix I/O failures during remote port toggle testing (part 2)
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9256 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 19:20:08 +00:00
Bart Van Assche
3922313aa5
qla2x00t-32gbit: Fix I/O failures during remote port toggle testing
...
Driver was using a lower value for dev_loss_tmo making it more prone to I/O
failures during remote port toggle testing. Set dev_loss_tmo to zero during
remote port registration to allow nvme-fc default dev_loss_tmo to be used,
which is higher than what driver was using.
Link: https://lore.kernel.org/r/20200904045128.23631-2-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Arun Easi <aeasi@marvell.com >
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com >
Signed-off-by: Nilesh Javali <njavali@marvell.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
See also upstream commit dd8d0bf6fb72bc73dc534d0d222e769e71d2202c.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9255 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 19:17:45 +00:00
Bart Van Assche
f7e687cf28
qla2x00t-32gbit: Convert to SPDX license identifiers
...
All files in this driver directory contain the following notice:
See LICENSE.qla2xxx for copyright and licensing details.
LICENSE.qla2xxx can be found in Documentation/scsi/. The file contains:
- A copyright notice
This copyright notice is redundant as all files contain the same
copyright notice already
- A license notice
You may modify and redistribute the device driver code under the
GNU General Public License (a copy of which is attached hereto as
Exhibit A) published by the Free Software Foundation (version 2).
This can be replaced with the corresponding SPDX license identifier
(GPL-2.0-only) in the source files which reference this license
file.
- The full GPLv2 license text
A redundant copy of LICENSES/preferred/GPL-2.0
Remove the notices and add the SPDX license identifier GPL-2.0-only to the
source files.
Finally remove the now redundant LICENSE.qla2xxx file.
Reviewed-by: Richard Fontana <rfontana@redhat.com >
Reviewed-by: Jilayne Lovejoy <opensource@jilayne.com >
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com >
Acked-by: Igor Russkikh <irusskikh@marvell.com >
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com >
Acked-by: Nilesh Javali <njavali@marvell.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
See also upstream commit 77adf3f01bf7a48eb27a466ac4d14f410b80afc1.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9254 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 19:14:28 +00:00
Bart Van Assche
faccc547b8
qla2x00t-32gbit: Remove unneeded variable 'rval'
...
This addresses the following coccinelle warning:
drivers/scsi/qla2xxx/qla_init.c:7112:5-9: Unneeded variable: "rval".
Return "QLA_SUCCESS" on line 7115
Link: https://lore.kernel.org/r/20200911091021.2937708-1-yanaijie@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
See also upstream commit 34eb5ccf35daea082b6bc3857f82f23155fb266f.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9253 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 19:12:14 +00:00
Bart Van Assche
5d0620470c
qla2x00t-32gbit: Handle incorrect entry_type entries
...
It was observed on an ISP8324 16Gb HBA with fw=8.08.203 (d0d5) in a
PowerPC64 machine that pkt->entry_type was MBX_IOCB_TYPE/0x39 with an
sp->type SRB_SCSI_CMD which is invalid and should not be possible.
Reading the entry_type from the crash dump shows the expected value of
STATUS_TYPE/0x03 but the call trace shows that qla24xx_mbx_iocb_entry() is
used.
Add a check to verify for consistency and reset the HBA if an invalid state
is reached. Obviously, this is only a workaround until the real problem is
solved.
Link: https://lore.kernel.org/r/20200908081516.8561-5-dwagner@suse.de
Reviewed-by: Arun Easi <aeasi@marvell.com >
Signed-off-by: Daniel Wagner <dwagner@suse.de >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
See also upstream commit 31a3271ff11badc50d6dc0efb4da393e4c3bf388.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9252 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 19:11:15 +00:00
Bart Van Assche
6fdda1cbc8
qla2x00t-32gbit: Log calling function name in qla2x00_get_sp_from_handle()
...
Commit 7c3df1320e5e ("[SCSI] qla2xxx: Code changes to support new dynamic
logging infrastructure.") removed the use of the func argument. Let's add
it back.
Link: https://lore.kernel.org/r/20200908081516.8561-4-dwagner@suse.de
Reviewed-by: Arun Easi <aeasi@marvell.com >
Signed-off-by: Daniel Wagner <dwagner@suse.de >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
See also upstream commit 7d88d5dff95f929e94b9d6425f699eba22e47444.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9251 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 19:10:35 +00:00
Bart Van Assche
6c052abd82
qla2x00t-32gbit: Simplify return value logic in qla2x00_get_sp_from_handle()
...
Refactor qla2x00_get_sp_from_handle() to avoid the unnecessary goto if
early returns are used. With this we can also avoid preinitialzing the sp
pointer.
Link: https://lore.kernel.org/r/20200908081516.8561-3-dwagner@suse.de
Reviewed-by: Martin Wilck <mwilck@suse.com >
Reviewed-by: Arun Easi <aeasi@marvell.com >
Signed-off-by: Daniel Wagner <dwagner@suse.de >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
See also upstream commit 622299f16f33852baddf94b32bc80e2c1e24c39a.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9250 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 19:09:41 +00:00
Bart Van Assche
9f3d3f4cad
qla2xxx-32gbit: Warn if done() or free() are called on an already freed srb
...
Emit a warning when ->done or ->free are called on an already freed
srb. There is a hidden use-after-free bug in the driver which corrupts
the srb memory pool which originates from the cleanup callbacks.
An extensive search didn't bring any lights on the real problem. The
initial fix was to set both pointers to NULL and try to catch invalid
accesses. But instead the memory corruption was gone and the driver
didn't crash. Since not all calling places check for NULL pointer, add
explicitly default handlers. With this we workaround the memory
corruption and add a debug help.
Link: https://lore.kernel.org/r/20200908081516.8561-2-dwagner@suse.de
Reviewed-by: Martin Wilck <mwilck@suse.com >
Reviewed-by: Arun Easi <aeasi@marvell.com >
Signed-off-by: Daniel Wagner <dwagner@suse.de >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
See also upstream commit c0014f94218ea3a312f6235febea0d626c5f2154.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9249 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 19:08:48 +00:00
Bart Van Assche
93474d5f29
qla2x00t-32gbit: Fix the return value
...
A negative error code should be returned.
Link: https://lore.kernel.org/r/20200829075746.19166-1-tian.xianting@h3c.com
Acked-by: Nilesh Javali <njavali@marvell.com >
Signed-off-by: Xianting Tian <tian.xianting@h3c.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
See also upstream commit e5f48ac42cc9 ("scsi: qla2xxx: Fix the return value").
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9248 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 17:59:51 +00:00
Bart Van Assche
7e12fdac01
qla2x00t-32gbit: Minimize diffs with the upstream code
...
See also upstream commit 62e9dd177732 ("scsi: qla2xxx: Change in PUREX to
handle FPIN ELS requests").
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9247 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-28 17:54:03 +00:00
Bart Van Assche
f55541409c
www: Fix HTML syntax
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9246 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-23 03:29:58 +00:00
Bart Van Assche
ba5d3e94b9
www: Add more information about the SRP target driver
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9245 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-23 03:22:21 +00:00
Bart Van Assche
53cbbb2c94
www: Update the information about the SRP target driver
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9244 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-23 03:01:52 +00:00
Bart Van Assche
3b5f4e54da
www: Remove information about target drivers that have been removed
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9243 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-23 02:55:47 +00:00
Bart Van Assche
ad3c9e0071
www/downloads.html: Update latest release information
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9242 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-23 02:48:12 +00:00
Bart Van Assche
20e1827d54
Makefile: Add a target for building a single release archive
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9241 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-23 02:36:20 +00:00
Bart Van Assche
ead177f479
SVN_TAGS: Add information about the 3.5.0 release
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9240 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-22 23:57:45 +00:00
Bart Van Assche
7c294b7648
scst/ChangeLog: Mention the qla2x00t-32gbit driver
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9238 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-22 23:53:40 +00:00
Bart Van Assche
21ea12d0de
scstadmin: Fix the release-archive Makefile target
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9237 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-22 23:50:48 +00:00
Bart Van Assche
6ee007cb6e
qla2x00t-32gbit: Fix the release-archive Makefile target
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9236 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-22 23:50:27 +00:00
Bart Van Assche
3885ef5ef7
qla2x00t-32gbit: Add a version number
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9235 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-22 23:48:48 +00:00
Bart Van Assche
71e25520ee
scst/Makefile: Remove a superfluous backslash
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9234 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-22 23:46:25 +00:00
Bart Van Assche
0b3aad05f5
scripts/update-version: Also update the qla2x00t-32gbit version number
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9233 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-22 23:45:42 +00:00
Bart Van Assche
ed38dccfb4
scst/ChangeLog: Document that RHEL / CentOS 8.3 is supported
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9232 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-22 22:47:05 +00:00
Bart Van Assche
d3c92ea7aa
Bump the version number to 3.5.0
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9231 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-22 03:38:21 +00:00
Bart Van Assche
e3c8aedb2c
scst_event: Fix the code that copies the CDB of the command to be aborted
...
I came across this accidentally while looking up the users of the
cmd_to_abort pointer.
Fixes: 297d268a7a ("SCST events infrastructure"; r6574)
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9230 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-21 23:58:29 +00:00
Bart Van Assche
5826f2c8de
scst: Fix two bugs in error paths
...
Wait for percpu_ref_kill() to finish before calling percpu_ref_exit().
This patch fixes the following complaint:
WARNING: CPU: 7 PID: 56710 at lib/percpu-refcount.c:110 percpu_ref_exit+0x28/0x30
RIP: 0010:percpu_ref_exit+0x28/0x30
Call Trace:
scst_free_device+0x89/0x120 [scst]
scst_register_virtual_device_node+0x27a/0x4f0 [scst]
vdisk_add_blockio_device+0x1fa/0x3d0 [scst_vdisk]
scst_devt_mgmt_store_work_fn+0x21b/0x2d0 [scst]
sysfs_work_thread_fn+0xef/0x400 [scst]
kthread+0x112/0x130
Fixes: c5ff6adeae ("Fix unloading of scst_vdisk while I/O is ongoing"; r9048)
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9229 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-21 22:06:06 +00:00
Bart Van Assche
e3d187f6af
scripts/kernel-functions: Apply kernel patches more selectively
...
Only try to apply kernel patches that should apply such that 'patch' does
not report any error messages that some patches fail to apply.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9228 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-21 20:56:58 +00:00
Bart Van Assche
cf4a11725a
scst: Unbreak the non-RHEL build
...
This patch is a fix for r9221.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9227 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-21 19:54:08 +00:00