Home Home > GIT Browse > SLE15
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Kirjanov <dkirjanov@suse.com>2019-09-25 18:07:55 +0300
committerDenis Kirjanov <dkirjanov@suse.com>2019-09-25 18:07:55 +0300
commit21718fdf45194f08a946ed637641f94a2b6e6104 (patch)
tree8ee72760da2d05bbb80f11757b6465adbe798d83
parent846b396cb42728e55cfe179cce20d49117fd4547 (diff)
parent7173b2d861ba8f8de0f163e3436484ae81e833b1 (diff)
Pull scsi fixes from Hannes Reinecke
-rw-r--r--patches.suse/powerpc-64s-support-nospectre_v2-cmdline-option.patch3
-rw-r--r--patches.suse/powerpc-rtas-use-device-model-APIs-and-serialization.patch3
-rw-r--r--patches.suse/powerpc-tm-Fix-FP-VMX-unavailable-exceptions-inside-.patch3
-rw-r--r--patches.suse/powerpc-tm-Fix-restoring-FP-VMX-facility-incorrectly.patch3
-rw-r--r--patches.suse/powerpc-xive-Fix-dump-of-XIVE-interrupt-under-pserie.patch3
-rw-r--r--patches.suse/powerpc-xmon-Add-a-dump-of-all-XIVE-interrupts.patch3
-rw-r--r--patches.suse/powerpc-xmon-Check-for-HV-mode-when-dumping-XIVE-inf.patch3
-rw-r--r--patches.suse/scsi-core-avoid-preallocating-big-SGL-for-data.patch114
-rw-r--r--patches.suse/scsi-core-avoid-preallocating-big-SGL-for-protection.patch93
-rw-r--r--patches.suse/scsi-core-don-t-preallocate-small-SGL-in-case-of-NO_.patch45
-rw-r--r--patches.suse/scsi-cxlflash-Mark-expected-switch-fall-throughs.patch3
-rw-r--r--patches.suse/scsi-lpfc-Add-MDS-driver-loopback-diagnostics-suppor.patch3
-rw-r--r--patches.suse/scsi-lpfc-Add-NVMe-sequence-level-error-recovery-sup.patch3
-rw-r--r--patches.suse/scsi-lpfc-Add-first-and-second-level-hardware-revisi.patch3
-rw-r--r--patches.suse/scsi-lpfc-Add-simple-unlikely-optimizations-to-reduc.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-ADISC-reception-terminating-login-stat.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-BlockGuard-enablement-on-FCoE-adapters.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-ELS-field-alignments.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-FLOGI-handling-across-multiple-link-up.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-Max-Frame-Size-value-shown-in-fdmishow.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-Oops-in-nvme_register-with-target-logo.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-PLOGI-failure-with-high-remoteport-cou.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-coverity-warnings.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-crash-due-to-port-reset-racing-vs-adap.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-crash-on-driver-unload-in-wq-free.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-deadlock-on-host_lock-during-cable-pul.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-devices-that-don-t-return-after-devlos.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-discovery-when-target-has-no-GID_FT-in.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-error-in-remote-port-address-change.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-failure-to-clear-non-zero-eq_delay-aft.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-hang-when-downloading-fw-on-port-enabl.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-irq-raising-in-lpfc_sli_hba_down.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-issuing-init_vpi-mbox-on-SLI-3-card.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-leak-of-ELS-completions-on-adapter-res.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-loss-of-remote-port-after-devloss-due-.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-null-ptr-oops-updating-lpfc_devloss_tm.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-nvme-first-burst-module-parameter-desc.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-nvme-sg_seg_cnt-display-if-HBA-does-no.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-nvme-target-mode-ABTSing-a-received-AB.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-oops-when-fewer-hdwqs-than-cpus.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-port-relogin-failure-due-to-GID_FT-int.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-propagation-of-devloss_tmo-setting-to-.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-reported-physical-link-speed-on-a-disa.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-reset-recovery-paths-that-are-not-reco.patch56
-rw-r--r--patches.suse/scsi-lpfc-Fix-sg_seg_cnt-for-HBAs-that-don-t-support.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-sli4-adapter-initialization-with-MSI.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-too-many-sg-segments-spamming-in-kerne.patch3
-rw-r--r--patches.suse/scsi-lpfc-Fix-upcall-to-bsg-done-in-non-success-case.patch3
-rw-r--r--patches.suse/scsi-lpfc-Limit-xri-count-for-kdump-environment.patch3
-rw-r--r--patches.suse/scsi-lpfc-Migrate-to-px-and-pf-in-kernel-print-calls.patch3
-rw-r--r--patches.suse/scsi-lpfc-Resolve-checker-warning-for-lpfc_new_io_bu.patch71
-rw-r--r--patches.suse/scsi-lpfc-Support-dynamic-unbounded-SGL-lists-on-G7-.patch3
-rw-r--r--patches.suse/scsi-lpfc-Update-lpfc-version-to-12.4.0.0.patch3
-rw-r--r--patches.suse/scsi-lpfc-fix-12.4.0.0-GPF-at-boot.patch (renamed from patches.suse/lpfc-fix-12.4.0.0-gpf-at-boot.patch)15
-rw-r--r--patches.suse/scsi-lpfc-merge-per-protocol-wq-cq-pairs-into-single.patch3
-rw-r--r--patches.suse/scsi-lpfc-remove-NULL-check-before-some-freeing-func.patch3
-rw-r--r--patches.suse/scsi-lpfc-remove-bg-debugfs-buffers.patch443
-rw-r--r--patches.suse/scsi-qla2xxx-Allow-NVMe-IO-to-resume-with-short-cabl.patch3
-rw-r--r--patches.suse/scsi-qla2xxx-Correct-error-handling-during-initializ.patch5
-rw-r--r--patches.suse/scsi-qla2xxx-Fix-DMA-unmap-leak.patch3
-rw-r--r--patches.suse/scsi-qla2xxx-Fix-NVMe-port-discovery-after-a-short-d.patch3
-rw-r--r--patches.suse/scsi-qla2xxx-Fix-Relogin-to-prevent-modifying-scan_s.patch3
-rw-r--r--patches.suse/scsi-qla2xxx-Fix-abort-timeout-race-condition.patch3
-rw-r--r--patches.suse/scsi-qla2xxx-Fix-different-size-DMA-Alloc-Unmap.patch3
-rw-r--r--patches.suse/scsi-qla2xxx-Fix-hang-in-fcport-delete-path.patch3
-rw-r--r--patches.suse/scsi-qla2xxx-Fix-premature-timer-expiration.patch3
-rw-r--r--patches.suse/scsi-qla2xxx-Include-the-asm-unaligned.h-header-file.patch38
-rw-r--r--patches.suse/scsi-qla2xxx-Introduce-the-dsd32-and-dsd64-data-stru.patch1443
-rw-r--r--patches.suse/scsi-qla2xxx-Reject-EH_-abort-device_reset-target_re.patch3
-rw-r--r--patches.suse/scsi-qla2xxx-Remove-unnecessary-null-check.patch5
-rw-r--r--patches.suse/scsi-qla2xxx-Replace-vmalloc-memset-with-vzalloc.patch3
-rw-r--r--patches.suse/scsi-qla2xxx-Retry-fabric-Scan-on-IOCB-queue-full.patch3
-rw-r--r--patches.suse/scsi-qla2xxx-Skip-FW-dump-on-LOOP-initialization-err.patch3
-rw-r--r--patches.suse/scsi-qla2xxx-Update-driver-version-to-10.01.00.18-k.patch3
-rw-r--r--patches.suse/scsi-qla2xxx-Use-Correct-index-for-Q-Pair-array.patch3
-rw-r--r--patches.suse/scsi-qla2xxx-Use-__le64-instead-of-uint32_t-2-for-se.patch456
-rw-r--r--patches.suse/scsi-qla2xxx-Use-common-update-firmware-options-rout.patch3
-rw-r--r--patches.suse/scsi-qla2xxx-do-not-crash-on-uninitialized-pool-list.patch149
-rw-r--r--patches.suse/scsi-qla2xxx-qla2x00_alloc_fw_dump-set-ha-eft.patch14
-rw-r--r--patches.suse/x86-kconfig-remove-x86_direct_gbpages-dependency-on-debug_pagealloc.patch3
-rw-r--r--series.conf78
81 files changed, 2627 insertions, 596 deletions
diff --git a/patches.suse/powerpc-64s-support-nospectre_v2-cmdline-option.patch b/patches.suse/powerpc-64s-support-nospectre_v2-cmdline-option.patch
index 340ee40a80..cea77803ec 100644
--- a/patches.suse/powerpc-64s-support-nospectre_v2-cmdline-option.patch
+++ b/patches.suse/powerpc-64s-support-nospectre_v2-cmdline-option.patch
@@ -4,8 +4,7 @@ Date: Thu, 23 May 2019 21:46:48 -0500
Subject: [PATCH] powerpc/64s: support nospectre_v2 cmdline option
References: bsc#1131107
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
+Patch-mainline: v5.4-rc1
Git-commit: d8f0e0b073e1ec52a05f0c2a56318b47387d2f10
Add support for disabling the kernel implemented spectre v2 mitigation
diff --git a/patches.suse/powerpc-rtas-use-device-model-APIs-and-serialization.patch b/patches.suse/powerpc-rtas-use-device-model-APIs-and-serialization.patch
index 8e5507ca13..ddaa475c90 100644
--- a/patches.suse/powerpc-rtas-use-device-model-APIs-and-serialization.patch
+++ b/patches.suse/powerpc-rtas-use-device-model-APIs-and-serialization.patch
@@ -5,8 +5,7 @@ Subject: [PATCH] powerpc/rtas: use device model APIs and serialization during
LPM
References: bsc#1144123 ltc#178840
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
+Patch-mainline: v5.4-rc1
Git-commit: a6717c01ddc259f6f73364779df058e2c67309f8
The LPAR migration implementation and userspace-initiated cpu hotplug
diff --git a/patches.suse/powerpc-tm-Fix-FP-VMX-unavailable-exceptions-inside-.patch b/patches.suse/powerpc-tm-Fix-FP-VMX-unavailable-exceptions-inside-.patch
index 8063baa785..42a6837e91 100644
--- a/patches.suse/powerpc-tm-Fix-FP-VMX-unavailable-exceptions-inside-.patch
+++ b/patches.suse/powerpc-tm-Fix-FP-VMX-unavailable-exceptions-inside-.patch
@@ -5,8 +5,7 @@ Subject: [PATCH] powerpc/tm: Fix FP/VMX unavailable exceptions inside a
transaction
References: CVE-2019-15030 bsc#1149713
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
+Patch-mainline: v5.3-rc8
Git-commit: 8205d5d98ef7f155de211f5e2eb6ca03d95a5a60
When we take an FP unavailable exception in a transaction we have to
diff --git a/patches.suse/powerpc-tm-Fix-restoring-FP-VMX-facility-incorrectly.patch b/patches.suse/powerpc-tm-Fix-restoring-FP-VMX-facility-incorrectly.patch
index f7c57be397..c93a3acb54 100644
--- a/patches.suse/powerpc-tm-Fix-restoring-FP-VMX-facility-incorrectly.patch
+++ b/patches.suse/powerpc-tm-Fix-restoring-FP-VMX-facility-incorrectly.patch
@@ -5,8 +5,7 @@ Subject: [PATCH] powerpc/tm: Fix restoring FP/VMX facility incorrectly on
interrupts
References: CVE-2019-15031 bsc#1149713
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
+Patch-mainline: v5.3-rc8
Git-commit: a8318c13e79badb92bc6640704a64cc022a6eb97
When in userspace and MSR FP=0 the hardware FP state is unrelated to
diff --git a/patches.suse/powerpc-xive-Fix-dump-of-XIVE-interrupt-under-pserie.patch b/patches.suse/powerpc-xive-Fix-dump-of-XIVE-interrupt-under-pserie.patch
index 391d8a5049..1fff3b2f2f 100644
--- a/patches.suse/powerpc-xive-Fix-dump-of-XIVE-interrupt-under-pserie.patch
+++ b/patches.suse/powerpc-xive-Fix-dump-of-XIVE-interrupt-under-pserie.patch
@@ -7,8 +7,7 @@ Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
References: bsc#1142019
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
+Patch-mainline: v5.4-rc1
Git-commit: b4868ff55d082bc66b0c287a41e4888f6d3e5f87
The xmon 'dxi' command calls OPAL to query the XIVE configuration of a
diff --git a/patches.suse/powerpc-xmon-Add-a-dump-of-all-XIVE-interrupts.patch b/patches.suse/powerpc-xmon-Add-a-dump-of-all-XIVE-interrupts.patch
index de520390d9..908a7c40dd 100644
--- a/patches.suse/powerpc-xmon-Add-a-dump-of-all-XIVE-interrupts.patch
+++ b/patches.suse/powerpc-xmon-Add-a-dump-of-all-XIVE-interrupts.patch
@@ -7,8 +7,7 @@ Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
References: bsc#1142019
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
+Patch-mainline: v5.4-rc1
Git-commit: 39f14e79b15a40709ef177bc4c07f193b6d3bce3
Modify the xmon 'dxi' command to query all interrupts if no IRQ number
diff --git a/patches.suse/powerpc-xmon-Check-for-HV-mode-when-dumping-XIVE-inf.patch b/patches.suse/powerpc-xmon-Check-for-HV-mode-when-dumping-XIVE-inf.patch
index bcea95d6fe..29721e8fcf 100644
--- a/patches.suse/powerpc-xmon-Check-for-HV-mode-when-dumping-XIVE-inf.patch
+++ b/patches.suse/powerpc-xmon-Check-for-HV-mode-when-dumping-XIVE-inf.patch
@@ -8,8 +8,7 @@ Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
References: bsc#1142019
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
+Patch-mainline: v5.4-rc1
Git-commit: c3e0dbd7f780a58c4695f1cd8fc8afde80376737
Currently, the xmon 'dx' command calls OPAL to dump the XIVE state in
diff --git a/patches.suse/scsi-core-avoid-preallocating-big-SGL-for-data.patch b/patches.suse/scsi-core-avoid-preallocating-big-SGL-for-data.patch
deleted file mode 100644
index 98ffc8f412..0000000000
--- a/patches.suse/scsi-core-avoid-preallocating-big-SGL-for-data.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-From: Ming Lei <ming.lei@redhat.com>
-Date: Sun, 28 Apr 2019 15:39:32 +0800
-Subject: scsi: core: avoid preallocating big SGL for data
-Patch-mainline: v5.3-rc1
-Git-commit: 3dccdf53c2f38399b11085ded4447ce1467f006c
-References: bsc#1141707
-
-scsi_mq_setup_tags() preallocates a big buffer for the IO SGL. The size is
-based on scsi_mq_sgl_size() which is determined based on
-shost->sg_tablesize and SG_CHUNK_SIZE.
-
-Modern DMA engines are often capable of dealing with very big segments so
-the resulting scsi_mq_sgl_size() is often too big. SG_CHUNK_SIZE results in
-a static 4KB SGL allocation per command.
-
-If an HBA has lots of deep queues, preallocation for the sg list can
-consume substantial amounts of memory. For lpfc, nr_hw_queues can be 70
-and each queue's depth 3781. This means the resulting preallocation for
-the data SGL is 70*3781*2K = 517MB.
-
-Switch to runtime allocation for SGL for lists longer than 2 entries. This
-is the approach used by NVMe PCI so it should be reasonable for SCSI as
-well. Runtime SGL allocation has always been the case for the legacy I/O
-path so this is nothing new.
-
-[mkp: attempted to clarify commit desc]
-
-Cc: Christoph Hellwig <hch@lst.de>
-Cc: Bart Van Assche <bvanassche@acm.org>
-Cc: Ewan D. Milne <emilne@redhat.com>
-Cc: Hannes Reinecke <hare@suse.com>
-Reviewed-by: Christoph Hellwig <hch@lst.de>
-Signed-off-by: Ming Lei <ming.lei@redhat.com>
-Reviewed-by: Bart Van Assche <bvanassche@acm.org>
-Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-Acked-by: Daniel Wagner <dwagner@suse.de>
----
- drivers/scsi/scsi_lib.c | 19 +++++++++++--------
- 1 file changed, 11 insertions(+), 8 deletions(-)
-
---- a/drivers/scsi/scsi_lib.c
-+++ b/drivers/scsi/scsi_lib.c
-@@ -45,6 +45,8 @@
- */
- #define SCSI_INLINE_PROT_SG_CNT 1
-
-+#define SCSI_INLINE_SG_CNT 2
-+
- static struct kmem_cache *scsi_sdb_cache;
- static struct kmem_cache *scsi_sense_cache;
- static struct kmem_cache *scsi_sense_isadma_cache;
-@@ -614,11 +616,12 @@ static void scsi_mq_free_sgtables(struct
- struct scsi_data_buffer *sdb;
-
- if (cmd->sdb.table.nents)
-- sg_free_table_chained(&cmd->sdb.table, SG_CHUNK_SIZE);
-+ sg_free_table_chained(&cmd->sdb.table,
-+ SCSI_INLINE_SG_CNT);
- if (cmd->request->next_rq) {
- sdb = cmd->request->next_rq->special;
- if (sdb)
-- sg_free_table_chained(&sdb->table, SG_CHUNK_SIZE);
-+ sg_free_table_chained(&sdb->table, SCSI_INLINE_SG_CNT);
- }
- if (scsi_prot_sg_count(cmd))
- sg_free_table_chained(&cmd->prot_sdb->table,
-@@ -651,7 +654,7 @@ static void scsi_mq_uninit_cmd(struct sc
- static void scsi_release_buffers(struct scsi_cmnd *cmd)
- {
- if (cmd->sdb.table.nents)
-- sg_free_table_chained(&cmd->sdb.table, SG_CHUNK_SIZE);
-+ sg_free_table_chained(&cmd->sdb.table, SCSI_INLINE_SG_CNT);
-
- memset(&cmd->sdb, 0, sizeof(cmd->sdb));
-
-@@ -1086,7 +1089,7 @@ static int scsi_init_sgtable(struct requ
- */
- if (unlikely(sg_alloc_table_chained(&sdb->table,
- blk_rq_nr_phys_segments(req), sdb->table.sgl,
-- SG_CHUNK_SIZE)))
-+ SCSI_INLINE_SG_CNT)))
- return BLKPREP_DEFER;
-
- /*
-@@ -1961,9 +1964,9 @@ static inline blk_status_t prep_to_mq(in
- }
-
- /* Size in bytes of the sg-list stored in the scsi-mq command-private data. */
--static unsigned int scsi_mq_sgl_size(struct Scsi_Host *shost)
-+static unsigned int scsi_mq_inline_sgl_size(struct Scsi_Host *shost)
- {
-- return min_t(unsigned int, shost->sg_tablesize, SG_CHUNK_SIZE) *
-+ return min_t(unsigned int, shost->sg_tablesize, SCSI_INLINE_SG_CNT) *
- sizeof(struct scatterlist);
- }
-
-@@ -2146,7 +2149,7 @@ static int scsi_mq_init_request(struct b
- if (scsi_host_get_prot(shost)) {
- sg = (void *)cmd + sizeof(struct scsi_cmnd) +
- shost->hostt->cmd_size;
-- cmd->prot_sdb = (void *)sg + scsi_mq_sgl_size(shost);
-+ cmd->prot_sdb = (void *)sg + scsi_mq_inline_sgl_size(shost);
- }
-
- return 0;
-@@ -2312,7 +2315,7 @@ int scsi_mq_setup_tags(struct Scsi_Host
- {
- unsigned int cmd_size, sgl_size;
-
-- sgl_size = scsi_mq_sgl_size(shost);
-+ sgl_size = scsi_mq_inline_sgl_size(shost);
- cmd_size = sizeof(struct scsi_cmnd) + shost->hostt->cmd_size + sgl_size;
- if (scsi_host_get_prot(shost))
- cmd_size += sizeof(struct scsi_data_buffer) +
diff --git a/patches.suse/scsi-core-avoid-preallocating-big-SGL-for-protection.patch b/patches.suse/scsi-core-avoid-preallocating-big-SGL-for-protection.patch
deleted file mode 100644
index 7c72a26712..0000000000
--- a/patches.suse/scsi-core-avoid-preallocating-big-SGL-for-protection.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From: Ming Lei <ming.lei@redhat.com>
-Date: Sun, 28 Apr 2019 15:39:31 +0800
-Subject: scsi: core: avoid preallocating big SGL for protection information
-Patch-mainline: v5.3-rc1
-Git-commit: 92524fa12312d1f082a473e14c590c48b4ef3fe5
-References: bsc#1141707
-
-scsi_mq_setup_tags() currently preallocates a big buffer for protection
-SGL entries. scsi_mq_sgl_size() is used to determine the size for both data
-and protection information scatterlists but the protection buffer is
-usually much smaller. For example, one 512-byte sector needs 8 bytes of
-protection information. Given that the maximum number of sectors for one
-request is 2560 (BLK_DEF_MAX_SECTORS) sectors, the max protection
-information buffer size is just 20K.
-
-The protection information segment count generally matches the number of
-bios in the request. As a result, the typical actual number of segments
-won't be very big. And should the need arise, allocating a bigger SGL from
-slab is fast enough.
-
-Pre-allocate only one SGL entry for protection information and switch to
-runtime allocation in case that the protection information segment number
-is bigger than 1. This reduces memory tied up by static command
-allocations. For example, 500+ MB is saved on single lpfc HBA.
-
-[mkp: attempted to clarify commit desc]
-
-Cc: Christoph Hellwig <hch@lst.de>
-Cc: Bart Van Assche <bvanassche@acm.org>
-Cc: Ewan D. Milne <emilne@redhat.com>
-Cc: Hannes Reinecke <hare@suse.com>
-Reviewed-by: Christoph Hellwig <hch@lst.de>
-Signed-off-by: Ming Lei <ming.lei@redhat.com>
-Reviewed-by: Bart Van Assche <bvanassche@acm.org>
-Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-Acked-by: Daniel Wagner <dwagner@suse.de>
----
- drivers/scsi/scsi_lib.c | 16 ++++++++++++----
- 1 file changed, 12 insertions(+), 4 deletions(-)
-
---- a/drivers/scsi/scsi_lib.c
-+++ b/drivers/scsi/scsi_lib.c
-@@ -39,6 +39,12 @@
- #include "scsi_priv.h"
- #include "scsi_logging.h"
-
-+/*
-+ * Size of integrity metadata is usually small, 1 inline sg should
-+ * cover normal cases.
-+ */
-+#define SCSI_INLINE_PROT_SG_CNT 1
-+
- static struct kmem_cache *scsi_sdb_cache;
- static struct kmem_cache *scsi_sense_cache;
- static struct kmem_cache *scsi_sense_isadma_cache;
-@@ -615,7 +621,8 @@ static void scsi_mq_free_sgtables(struct
- sg_free_table_chained(&sdb->table, SG_CHUNK_SIZE);
- }
- if (scsi_prot_sg_count(cmd))
-- sg_free_table_chained(&cmd->prot_sdb->table, SG_CHUNK_SIZE);
-+ sg_free_table_chained(&cmd->prot_sdb->table,
-+ SCSI_INLINE_PROT_SG_CNT);
- }
-
- static void scsi_mq_uninit_cmd(struct scsi_cmnd *cmd)
-@@ -649,7 +656,7 @@ static void scsi_release_buffers(struct
- memset(&cmd->sdb, 0, sizeof(cmd->sdb));
-
- if (scsi_prot_sg_count(cmd))
-- sg_free_table_chained(&cmd->prot_sdb->table, SG_CHUNK_SIZE);
-+ sg_free_table_chained(&cmd->prot_sdb->table, SCSI_INLINE_PROT_SG_CNT);
- }
-
- static void scsi_release_bidi_buffers(struct scsi_cmnd *cmd)
-@@ -1154,7 +1161,7 @@ int scsi_init_io(struct scsi_cmnd *cmd)
-
- if (sg_alloc_table_chained(&prot_sdb->table, ivecs,
- prot_sdb->table.sgl,
-- SG_CHUNK_SIZE)) {
-+ SCSI_INLINE_PROT_SG_CNT)) {
- error = BLKPREP_DEFER;
- goto err_exit;
- }
-@@ -2308,7 +2315,8 @@ int scsi_mq_setup_tags(struct Scsi_Host
- sgl_size = scsi_mq_sgl_size(shost);
- cmd_size = sizeof(struct scsi_cmnd) + shost->hostt->cmd_size + sgl_size;
- if (scsi_host_get_prot(shost))
-- cmd_size += sizeof(struct scsi_data_buffer) + sgl_size;
-+ cmd_size += sizeof(struct scsi_data_buffer) +
-+ sizeof(struct scatterlist) * SCSI_INLINE_PROT_SG_CNT;
-
- memset(&shost->tag_set, 0, sizeof(shost->tag_set));
- shost->tag_set.ops = &scsi_mq_ops;
diff --git a/patches.suse/scsi-core-don-t-preallocate-small-SGL-in-case-of-NO_.patch b/patches.suse/scsi-core-don-t-preallocate-small-SGL-in-case-of-NO_.patch
deleted file mode 100644
index c0546fc2a7..0000000000
--- a/patches.suse/scsi-core-don-t-preallocate-small-SGL-in-case-of-NO_.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From: Ming Lei <ming.lei@redhat.com>
-Date: Thu, 6 Jun 2019 16:34:09 +0800
-Subject: scsi: core: don't preallocate small SGL in case of NO_SG_CHAIN
-Patch-mainline: v5.3-rc1
-Git-commit: 3e99b3b13a1fc8f7354edaee4c04f73a07faba69
-References: bsc#1141707
-
-The preallocated small SGL depends on SG_CHAIN so if the ARCH doesn't
-support SG_CHAIN, preallocation of small SGL can't work at all.
-
-Fix this issue by not using small preallocation in case of NO_SG_CHAIN.
-
-Cc: Christoph Hellwig <hch@lst.de>
-Cc: Bart Van Assche <bvanassche@acm.org>
-Cc: Ewan D. Milne <emilne@redhat.com>
-Cc: Hannes Reinecke <hare@suse.com>
-Cc: Guenter Roeck <linux@roeck-us.net>
-Reported-by: Guenter Roeck <linux@roeck-us.net>
-Reviewed-by: Christoph Hellwig <hch@lst.de>
-Reviewed-by: Bart Van Assche <bvanassche@acm.org>
-Tested-by: Guenter Roeck <linux@roeck-us.net>
-Signed-off-by: Ming Lei <ming.lei@redhat.com>
-Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-Acked-by: Daniel Wagner <dwagner@suse.de>
----
- drivers/scsi/scsi_lib.c | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
---- a/drivers/scsi/scsi_lib.c
-+++ b/drivers/scsi/scsi_lib.c
-@@ -43,9 +43,13 @@
- * Size of integrity metadata is usually small, 1 inline sg should
- * cover normal cases.
- */
-+#ifdef CONFIG_ARCH_NO_SG_CHAIN
-+#define SCSI_INLINE_PROT_SG_CNT 0
-+#define SCSI_INLINE_SG_CNT 0
-+#else
- #define SCSI_INLINE_PROT_SG_CNT 1
--
- #define SCSI_INLINE_SG_CNT 2
-+#endif
-
- static struct kmem_cache *scsi_sdb_cache;
- static struct kmem_cache *scsi_sense_cache;
diff --git a/patches.suse/scsi-cxlflash-Mark-expected-switch-fall-throughs.patch b/patches.suse/scsi-cxlflash-Mark-expected-switch-fall-throughs.patch
index 1e8905e3f4..9017d9d867 100644
--- a/patches.suse/scsi-cxlflash-Mark-expected-switch-fall-throughs.patch
+++ b/patches.suse/scsi-cxlflash-Mark-expected-switch-fall-throughs.patch
@@ -4,8 +4,7 @@ Date: Sun, 28 Jul 2019 19:21:19 -0500
Subject: [PATCH] scsi: cxlflash: Mark expected switch fall-throughs
References: bsc#1148868
-Patch-mainline: queued
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
Git-commit: 657bd277c162580674ddb86a90c4aeb62639bff5
Mark switch cases where we are expecting to fall through.
diff --git a/patches.suse/scsi-lpfc-Add-MDS-driver-loopback-diagnostics-suppor.patch b/patches.suse/scsi-lpfc-Add-MDS-driver-loopback-diagnostics-suppor.patch
index 109ecef775..accba4be02 100644
--- a/patches.suse/scsi-lpfc-Add-MDS-driver-loopback-diagnostics-suppor.patch
+++ b/patches.suse/scsi-lpfc-Add-MDS-driver-loopback-diagnostics-suppor.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:57:08 -0700
Subject: scsi: lpfc: Add MDS driver loopback diagnostics support
Git-commit: e62245d923caebc02582b12ce861c3d780b4106f
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
Added code to support driver loopback with MDS Diagnostics. This style of
diff --git a/patches.suse/scsi-lpfc-Add-NVMe-sequence-level-error-recovery-sup.patch b/patches.suse/scsi-lpfc-Add-NVMe-sequence-level-error-recovery-sup.patch
index 5a70c2073a..9bee65ce6b 100644
--- a/patches.suse/scsi-lpfc-Add-NVMe-sequence-level-error-recovery-sup.patch
+++ b/patches.suse/scsi-lpfc-Add-NVMe-sequence-level-error-recovery-sup.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:57:10 -0700
Subject: scsi: lpfc: Add NVMe sequence level error recovery support
Git-commit: 0d8af096430ed810aacade5f564e5b98347137d4
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
FC-NVMe-2 added support for sequence level error recovery in the FC-NVME
diff --git a/patches.suse/scsi-lpfc-Add-first-and-second-level-hardware-revisi.patch b/patches.suse/scsi-lpfc-Add-first-and-second-level-hardware-revisi.patch
index 48d64dab3c..b81a9bac83 100644
--- a/patches.suse/scsi-lpfc-Add-first-and-second-level-hardware-revisi.patch
+++ b/patches.suse/scsi-lpfc-Add-first-and-second-level-hardware-revisi.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:57:07 -0700
Subject: scsi: lpfc: Add first and second level hardware revisions to sysfs
Git-commit: ec76242f3be73e5cbb950a7ac99d4fba7e226e2e
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
reporting
diff --git a/patches.suse/scsi-lpfc-Add-simple-unlikely-optimizations-to-reduc.patch b/patches.suse/scsi-lpfc-Add-simple-unlikely-optimizations-to-reduc.patch
index bb43bf5652..96c028854b 100644
--- a/patches.suse/scsi-lpfc-Add-simple-unlikely-optimizations-to-reduc.patch
+++ b/patches.suse/scsi-lpfc-Add-simple-unlikely-optimizations-to-reduc.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:57:05 -0700
Subject: scsi: lpfc: Add simple unlikely optimizations to reduce NVME latency
Git-commit: 1df09449902d1d4023a46ad02eab16483c54c49b
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
While performing code review, several relatively simple optimizations can
diff --git a/patches.suse/scsi-lpfc-Fix-ADISC-reception-terminating-login-stat.patch b/patches.suse/scsi-lpfc-Fix-ADISC-reception-terminating-login-stat.patch
index a5c68d2d43..1f5582cd84 100644
--- a/patches.suse/scsi-lpfc-Fix-ADISC-reception-terminating-login-stat.patch
+++ b/patches.suse/scsi-lpfc-Fix-ADISC-reception-terminating-login-stat.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:56:39 -0700
Subject: scsi: lpfc: Fix ADISC reception terminating login state if a NVME
Git-commit: 26d824ca45a80f7a95e7afe578e54680cef5236f
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
target
diff --git a/patches.suse/scsi-lpfc-Fix-BlockGuard-enablement-on-FCoE-adapters.patch b/patches.suse/scsi-lpfc-Fix-BlockGuard-enablement-on-FCoE-adapters.patch
index 61976ea545..ba6a1a4636 100644
--- a/patches.suse/scsi-lpfc-Fix-BlockGuard-enablement-on-FCoE-adapters.patch
+++ b/patches.suse/scsi-lpfc-Fix-BlockGuard-enablement-on-FCoE-adapters.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:57:02 -0700
Subject: scsi: lpfc: Fix BlockGuard enablement on FCoE adapters
Git-commit: 4945c0f95bbfb35e230148f226c46868f4fdd55f
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
The driver is allowing the user to change lpfc_enable_bg while loading the
diff --git a/patches.suse/scsi-lpfc-Fix-ELS-field-alignments.patch b/patches.suse/scsi-lpfc-Fix-ELS-field-alignments.patch
index 086b76e61f..685722e0e2 100644
--- a/patches.suse/scsi-lpfc-Fix-ELS-field-alignments.patch
+++ b/patches.suse/scsi-lpfc-Fix-ELS-field-alignments.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:56:33 -0700
Subject: scsi: lpfc: Fix ELS field alignments
Git-commit: 1d755d6477cafea1d371ecc841e22adda0a43d27
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
After seeing some interoperability issues with ADISC, it was determined the
diff --git a/patches.suse/scsi-lpfc-Fix-FLOGI-handling-across-multiple-link-up.patch b/patches.suse/scsi-lpfc-Fix-FLOGI-handling-across-multiple-link-up.patch
index 7de2909366..f4787d0494 100644
--- a/patches.suse/scsi-lpfc-Fix-FLOGI-handling-across-multiple-link-up.patch
+++ b/patches.suse/scsi-lpfc-Fix-FLOGI-handling-across-multiple-link-up.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:56:44 -0700
Subject: scsi: lpfc: Fix FLOGI handling across multiple link up/down
Git-commit: 6ede2ddd8bdd28bdaf43d15e70dc0ef38c5448db
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
conditions
diff --git a/patches.suse/scsi-lpfc-Fix-Max-Frame-Size-value-shown-in-fdmishow.patch b/patches.suse/scsi-lpfc-Fix-Max-Frame-Size-value-shown-in-fdmishow.patch
index eaa58349eb..caac344ffd 100644
--- a/patches.suse/scsi-lpfc-Fix-Max-Frame-Size-value-shown-in-fdmishow.patch
+++ b/patches.suse/scsi-lpfc-Fix-Max-Frame-Size-value-shown-in-fdmishow.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:57:00 -0700
Subject: scsi: lpfc: Fix Max Frame Size value shown in fdmishow output
Git-commit: f98b2fd796d0f3dfa472e1ff977d38180301c982
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
Max Frame Size value is shown as 34816 in fdmishow from Switch.
diff --git a/patches.suse/scsi-lpfc-Fix-Oops-in-nvme_register-with-target-logo.patch b/patches.suse/scsi-lpfc-Fix-Oops-in-nvme_register-with-target-logo.patch
index c369ac5714..87e9f91d04 100644
--- a/patches.suse/scsi-lpfc-Fix-Oops-in-nvme_register-with-target-logo.patch
+++ b/patches.suse/scsi-lpfc-Fix-Oops-in-nvme_register-with-target-logo.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:56:41 -0700
Subject: scsi: lpfc: Fix Oops in nvme_register with target logout/login
Git-commit: 61184f1742c901160ceead85b3f1b3d03038f1d0
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
lpfc_nvme_register_port hit a null prev_ndlp pointer in a test with lots of
diff --git a/patches.suse/scsi-lpfc-Fix-PLOGI-failure-with-high-remoteport-cou.patch b/patches.suse/scsi-lpfc-Fix-PLOGI-failure-with-high-remoteport-cou.patch
index 2c7967e934..efd15b5768 100644
--- a/patches.suse/scsi-lpfc-Fix-PLOGI-failure-with-high-remoteport-cou.patch
+++ b/patches.suse/scsi-lpfc-Fix-PLOGI-failure-with-high-remoteport-cou.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:56:32 -0700
Subject: scsi: lpfc: Fix PLOGI failure with high remoteport count
Git-commit: 4f1a2fef2af6b8c746bc965e5f87cd3cdaf5f1f8
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
When connected to a high number of remote ports, the driver is encountering
diff --git a/patches.suse/scsi-lpfc-Fix-coverity-warnings.patch b/patches.suse/scsi-lpfc-Fix-coverity-warnings.patch
index d3188371b9..dda4a870ef 100644
--- a/patches.suse/scsi-lpfc-Fix-coverity-warnings.patch
+++ b/patches.suse/scsi-lpfc-Fix-coverity-warnings.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:57:04 -0700
Subject: scsi: lpfc: Fix coverity warnings
Git-commit: d9f492a1a1ab2f3847e2c65b87a738f3831e6751
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
Running on Coverity produced the following errors:
diff --git a/patches.suse/scsi-lpfc-Fix-crash-due-to-port-reset-racing-vs-adap.patch b/patches.suse/scsi-lpfc-Fix-crash-due-to-port-reset-racing-vs-adap.patch
index e04aed584e..3973e9c861 100644
--- a/patches.suse/scsi-lpfc-Fix-crash-due-to-port-reset-racing-vs-adap.patch
+++ b/patches.suse/scsi-lpfc-Fix-crash-due-to-port-reset-racing-vs-adap.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:56:53 -0700
Subject: scsi: lpfc: Fix crash due to port reset racing vs adapter error
Git-commit: 8c24a4f643edbcc7c8281b1f7527568f565dfbf8
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
handling
diff --git a/patches.suse/scsi-lpfc-Fix-crash-on-driver-unload-in-wq-free.patch b/patches.suse/scsi-lpfc-Fix-crash-on-driver-unload-in-wq-free.patch
index 8a3f6a33ed..6eaada85e5 100644
--- a/patches.suse/scsi-lpfc-Fix-crash-on-driver-unload-in-wq-free.patch
+++ b/patches.suse/scsi-lpfc-Fix-crash-on-driver-unload-in-wq-free.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:56:34 -0700
Subject: scsi: lpfc: Fix crash on driver unload in wq free
Git-commit: 3cee98db2610fb633fcbdd0f85385f60dabbaf75
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
If a timer routine uses workqueues, it could fire before the workqueue is
diff --git a/patches.suse/scsi-lpfc-Fix-deadlock-on-host_lock-during-cable-pul.patch b/patches.suse/scsi-lpfc-Fix-deadlock-on-host_lock-during-cable-pul.patch
index bb5d805d36..521ae94636 100644
--- a/patches.suse/scsi-lpfc-Fix-deadlock-on-host_lock-during-cable-pul.patch
+++ b/patches.suse/scsi-lpfc-Fix-deadlock-on-host_lock-during-cable-pul.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:56:52 -0700
Subject: scsi: lpfc: Fix deadlock on host_lock during cable pulls
Git-commit: 894bb17f0cb07a6503d096dbbd156e38a3640822
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
During cable pull testing a deadlock was seen between lpfc_nlp_counters()
diff --git a/patches.suse/scsi-lpfc-Fix-devices-that-don-t-return-after-devlos.patch b/patches.suse/scsi-lpfc-Fix-devices-that-don-t-return-after-devlos.patch
index c4a6af88a9..6bf7d1ec55 100644
--- a/patches.suse/scsi-lpfc-Fix-devices-that-don-t-return-after-devlos.patch
+++ b/patches.suse/scsi-lpfc-Fix-devices-that-don-t-return-after-devlos.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:56:46 -0700
Subject: scsi: lpfc: Fix devices that don't return after devloss followed by
Git-commit: 96d156f95c92eb1d8a8bfae84ceb70396a036f43
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
rediscovery
diff --git a/patches.suse/scsi-lpfc-Fix-discovery-when-target-has-no-GID_FT-in.patch b/patches.suse/scsi-lpfc-Fix-discovery-when-target-has-no-GID_FT-in.patch
index 60d56f8cc3..9a39e185c6 100644
--- a/patches.suse/scsi-lpfc-Fix-discovery-when-target-has-no-GID_FT-in.patch
+++ b/patches.suse/scsi-lpfc-Fix-discovery-when-target-has-no-GID_FT-in.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:56:38 -0700
Subject: scsi: lpfc: Fix discovery when target has no GID_FT information
Git-commit: 7f20c1cb236afd75237f1302e60daef8b90b818b
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
Some remote ports may be slow in registering their GID_FT protocol
diff --git a/patches.suse/scsi-lpfc-Fix-error-in-remote-port-address-change.patch b/patches.suse/scsi-lpfc-Fix-error-in-remote-port-address-change.patch
index b111b7707a..a221726c84 100644
--- a/patches.suse/scsi-lpfc-Fix-error-in-remote-port-address-change.patch
+++ b/patches.suse/scsi-lpfc-Fix-error-in-remote-port-address-change.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:56:51 -0700
Subject: scsi: lpfc: Fix error in remote port address change
Git-commit: 6825b7bd32030486cc94bdd4bb512756fcd5b901
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
In a test with high nvme remote port counts connected via a multi-hop FC
diff --git a/patches.suse/scsi-lpfc-Fix-failure-to-clear-non-zero-eq_delay-aft.patch b/patches.suse/scsi-lpfc-Fix-failure-to-clear-non-zero-eq_delay-aft.patch
index ce68a199e6..b512a7df51 100644
--- a/patches.suse/scsi-lpfc-Fix-failure-to-clear-non-zero-eq_delay-aft.patch
+++ b/patches.suse/scsi-lpfc-Fix-failure-to-clear-non-zero-eq_delay-aft.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:56:35 -0700
Subject: scsi: lpfc: Fix failure to clear non-zero eq_delay after io rate
Git-commit: 8d34a59caecda9a7ce0cad108ee64c37aa0c9812
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
reduction
diff --git a/patches.suse/scsi-lpfc-Fix-hang-when-downloading-fw-on-port-enabl.patch b/patches.suse/scsi-lpfc-Fix-hang-when-downloading-fw-on-port-enabl.patch
index 25b9ac53f5..3707dac3ab 100644
--- a/patches.suse/scsi-lpfc-Fix-hang-when-downloading-fw-on-port-enabl.patch
+++ b/patches.suse/scsi-lpfc-Fix-hang-when-downloading-fw-on-port-enabl.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:56:55 -0700
Subject: scsi: lpfc: Fix hang when downloading fw on port enabled for nvme
Git-commit: 84f2ddf8cf317afcfd92e06ed5a25aea48dc200e
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
As part of firmware download, the adapter is reset. On the adapter the
diff --git a/patches.suse/scsi-lpfc-Fix-irq-raising-in-lpfc_sli_hba_down.patch b/patches.suse/scsi-lpfc-Fix-irq-raising-in-lpfc_sli_hba_down.patch
index 3fa1986dc0..50bebb3813 100644
--- a/patches.suse/scsi-lpfc-Fix-irq-raising-in-lpfc_sli_hba_down.patch
+++ b/patches.suse/scsi-lpfc-Fix-irq-raising-in-lpfc_sli_hba_down.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:56:42 -0700
Subject: scsi: lpfc: Fix irq raising in lpfc_sli_hba_down
Git-commit: 4b0a42be26dd89cefaac89330070222ac8e14c01
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
The adapter reset path (lpfc_sli_hba_down) is taking/releasing a lock with
diff --git a/patches.suse/scsi-lpfc-Fix-issuing-init_vpi-mbox-on-SLI-3-card.patch b/patches.suse/scsi-lpfc-Fix-issuing-init_vpi-mbox-on-SLI-3-card.patch
index 16a06d85f7..5fb2820fb7 100644
--- a/patches.suse/scsi-lpfc-Fix-issuing-init_vpi-mbox-on-SLI-3-card.patch
+++ b/patches.suse/scsi-lpfc-Fix-issuing-init_vpi-mbox-on-SLI-3-card.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:56:40 -0700
Subject: scsi: lpfc: Fix issuing init_vpi mbox on SLI-3 card
Git-commit: 08180db2542b94e93cbdffd2a42cac2db147114a
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
The driver is inadvertently trying to issue an INIT_VPI mailbox command on
diff --git a/patches.suse/scsi-lpfc-Fix-leak-of-ELS-completions-on-adapter-res.patch b/patches.suse/scsi-lpfc-Fix-leak-of-ELS-completions-on-adapter-res.patch
index e9e2d4d68e..26786b396c 100644
--- a/patches.suse/scsi-lpfc-Fix-leak-of-ELS-completions-on-adapter-res.patch
+++ b/patches.suse/scsi-lpfc-Fix-leak-of-ELS-completions-on-adapter-res.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:56:36 -0700
Subject: scsi: lpfc: Fix leak of ELS completions on adapter reset
Git-commit: 296012285c908f6aacea83913ab9eaf273225d57
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
If the adapter is reset while there are outstanding ELS's, subsequent
diff --git a/patches.suse/scsi-lpfc-Fix-loss-of-remote-port-after-devloss-due-.patch b/patches.suse/scsi-lpfc-Fix-loss-of-remote-port-after-devloss-due-.patch
index 10a0603c37..5ceff808d0 100644
--- a/patches.suse/scsi-lpfc-Fix-loss-of-remote-port-after-devloss-due-.patch
+++ b/patches.suse/scsi-lpfc-Fix-loss-of-remote-port-after-devloss-due-.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:56:47 -0700
Subject: scsi: lpfc: Fix loss of remote port after devloss due to lack of RPIs
Git-commit: b95b21193c85db1b2797e38eea4f0fa72c7a087c
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
In tests with remote ports contantly logging out/logging coupled with
diff --git a/patches.suse/scsi-lpfc-Fix-null-ptr-oops-updating-lpfc_devloss_tm.patch b/patches.suse/scsi-lpfc-Fix-null-ptr-oops-updating-lpfc_devloss_tm.patch
index fc8f035975..287cfeedaf 100644
--- a/patches.suse/scsi-lpfc-Fix-null-ptr-oops-updating-lpfc_devloss_tm.patch
+++ b/patches.suse/scsi-lpfc-Fix-null-ptr-oops-updating-lpfc_devloss_tm.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:56:45 -0700
Subject: scsi: lpfc: Fix null ptr oops updating lpfc_devloss_tmo via sysfs
Git-commit: 07f50997d66c3273121dd6b8a7d433cdfb5395c1
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
attribute
diff --git a/patches.suse/scsi-lpfc-Fix-nvme-first-burst-module-parameter-desc.patch b/patches.suse/scsi-lpfc-Fix-nvme-first-burst-module-parameter-desc.patch
index 8eebc10e3d..aea3781828 100644
--- a/patches.suse/scsi-lpfc-Fix-nvme-first-burst-module-parameter-desc.patch
+++ b/patches.suse/scsi-lpfc-Fix-nvme-first-burst-module-parameter-desc.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:57:03 -0700
Subject: scsi: lpfc: Fix nvme first burst module parameter description
Git-commit: db197bc4699b3f0347367d25345fe681fe73f1f6
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
modinfo for lpfc_nvme_enable_fb is incorrect. FirstBurst on lpfc target is
diff --git a/patches.suse/scsi-lpfc-Fix-nvme-sg_seg_cnt-display-if-HBA-does-no.patch b/patches.suse/scsi-lpfc-Fix-nvme-sg_seg_cnt-display-if-HBA-does-no.patch
index 5496ead399..67a534e564 100644
--- a/patches.suse/scsi-lpfc-Fix-nvme-sg_seg_cnt-display-if-HBA-does-no.patch
+++ b/patches.suse/scsi-lpfc-Fix-nvme-sg_seg_cnt-display-if-HBA-does-no.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:56:57 -0700
Subject: scsi: lpfc: Fix nvme sg_seg_cnt display if HBA does not support NVME
Git-commit: 6a224b47fd019d299037e14381ddff438f2d34c8
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
The driver is currently reporting a non-zero nvme sg_seg_cnt value of 256
diff --git a/patches.suse/scsi-lpfc-Fix-nvme-target-mode-ABTSing-a-received-AB.patch b/patches.suse/scsi-lpfc-Fix-nvme-target-mode-ABTSing-a-received-AB.patch
index 5a4daa050c..6062654e5e 100644
--- a/patches.suse/scsi-lpfc-Fix-nvme-target-mode-ABTSing-a-received-AB.patch
+++ b/patches.suse/scsi-lpfc-Fix-nvme-target-mode-ABTSing-a-received-AB.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:56:56 -0700
Subject: scsi: lpfc: Fix nvme target mode ABTSing a received ABTS
Git-commit: 005d8eb92847e6823d9fea6041f7c6f26b6cf2da
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
If an unsolicited ABTS was received, the driver looks up the exchange it
diff --git a/patches.suse/scsi-lpfc-Fix-oops-when-fewer-hdwqs-than-cpus.patch b/patches.suse/scsi-lpfc-Fix-oops-when-fewer-hdwqs-than-cpus.patch
index fbe2a70928..e6680bd07a 100644
--- a/patches.suse/scsi-lpfc-Fix-oops-when-fewer-hdwqs-than-cpus.patch
+++ b/patches.suse/scsi-lpfc-Fix-oops-when-fewer-hdwqs-than-cpus.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:56:43 -0700
Subject: scsi: lpfc: Fix oops when fewer hdwqs than cpus
Git-commit: 3ad348d94452d6ab3aa0316105fb9f34f8ed3140
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
When tearing down the adapter for a reset, online/offline, or driver
diff --git a/patches.suse/scsi-lpfc-Fix-port-relogin-failure-due-to-GID_FT-int.patch b/patches.suse/scsi-lpfc-Fix-port-relogin-failure-due-to-GID_FT-int.patch
index 158bd198d3..b3681ce660 100644
--- a/patches.suse/scsi-lpfc-Fix-port-relogin-failure-due-to-GID_FT-int.patch
+++ b/patches.suse/scsi-lpfc-Fix-port-relogin-failure-due-to-GID_FT-int.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:56:37 -0700
Subject: scsi: lpfc: Fix port relogin failure due to GID_FT interaction
Git-commit: 57178b9275508e59d6daf89b874c03d597342776
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
In cases of remote-port-side cable pull/replug, there happens to be a
diff --git a/patches.suse/scsi-lpfc-Fix-propagation-of-devloss_tmo-setting-to-.patch b/patches.suse/scsi-lpfc-Fix-propagation-of-devloss_tmo-setting-to-.patch
index 12655b2e7e..edb3f492a6 100644
--- a/patches.suse/scsi-lpfc-Fix-propagation-of-devloss_tmo-setting-to-.patch
+++ b/patches.suse/scsi-lpfc-Fix-propagation-of-devloss_tmo-setting-to-.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:56:48 -0700
Subject: scsi: lpfc: Fix propagation of devloss_tmo setting to nvme transport
Git-commit: a643c6de1441e5cdab88452c46fe7c38b318009e
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
If admin changes the devloss_tmo on an rport via the fc_remote_port rport
diff --git a/patches.suse/scsi-lpfc-Fix-reported-physical-link-speed-on-a-disa.patch b/patches.suse/scsi-lpfc-Fix-reported-physical-link-speed-on-a-disa.patch
index 01d5c580e5..5699f471bc 100644
--- a/patches.suse/scsi-lpfc-Fix-reported-physical-link-speed-on-a-disa.patch
+++ b/patches.suse/scsi-lpfc-Fix-reported-physical-link-speed-on-a-disa.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:57:01 -0700
Subject: scsi: lpfc: Fix reported physical link speed on a disabled trunked
Git-commit: 845d0327bf0885e7d2fb6cb18e800491be793250
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
link
diff --git a/patches.suse/scsi-lpfc-Fix-reset-recovery-paths-that-are-not-reco.patch b/patches.suse/scsi-lpfc-Fix-reset-recovery-paths-that-are-not-reco.patch
new file mode 100644
index 0000000000..3d32554066
--- /dev/null
+++ b/patches.suse/scsi-lpfc-Fix-reset-recovery-paths-that-are-not-reco.patch
@@ -0,0 +1,56 @@
+From: James Smart <jsmart2021@gmail.com>
+Date: Tue, 3 Sep 2019 14:54:41 -0700
+Subject: [PATCH] scsi: lpfc: Fix reset recovery paths that are not recovering
+Patch-mainline: v5.4-rc1
+Git-commit: 4fb86a6bc549fc482bdb21086aa272668ed955d2
+References: bsc#1144375
+
+A recent patch unconditionally marks the hba as in error as part of
+resetting the adapter. The driver flow that called the adapter reset was a
+recovery path, which expects the adapter to not be in an error state in
+order to finish the recovery. Given the new error state being set, the
+recovery fails and the adapter is left in limbo.
+
+Revise the adapter reset routine so that it will only mark the adapter in
+error if it was unable to reset the adapter.
+
+Fixes: 8c24a4f643ed ("scsi: lpfc: Fix crash due to port reset racing vs adapter error handling")
+Link: https://lore.kernel.org/r/20190903215441.10490-1-jsmart2021@gmail.com
+Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
+Signed-off-by: James Smart <jsmart2021@gmail.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/lpfc/lpfc_sli.c | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
+index 2ff0879a9512..a0c6945b8139 100644
+--- a/drivers/scsi/lpfc/lpfc_sli.c
++++ b/drivers/scsi/lpfc/lpfc_sli.c
+@@ -4619,8 +4619,10 @@ lpfc_sli_brdrestart_s4(struct lpfc_hba *phba)
+ hba_aer_enabled = phba->hba_flag & HBA_AER_ENABLED;
+
+ rc = lpfc_sli4_brdreset(phba);
+- if (rc)
+- goto error;
++ if (rc) {
++ phba->link_state = LPFC_HBA_ERROR;
++ goto hba_down_queue;
++ }
+
+ spin_lock_irq(&phba->hbalock);
+ phba->pport->stopped = 0;
+@@ -4635,8 +4637,7 @@ lpfc_sli_brdrestart_s4(struct lpfc_hba *phba)
+ if (hba_aer_enabled)
+ pci_disable_pcie_error_reporting(phba->pcidev);
+
+-error:
+- phba->link_state = LPFC_HBA_ERROR;
++hba_down_queue:
+ lpfc_hba_down_post(phba);
+ lpfc_sli4_queue_destroy(phba);
+
+--
+2.16.4
+
diff --git a/patches.suse/scsi-lpfc-Fix-sg_seg_cnt-for-HBAs-that-don-t-support.patch b/patches.suse/scsi-lpfc-Fix-sg_seg_cnt-for-HBAs-that-don-t-support.patch
index ac1c711cb3..b817f5cc99 100644
--- a/patches.suse/scsi-lpfc-Fix-sg_seg_cnt-for-HBAs-that-don-t-support.patch
+++ b/patches.suse/scsi-lpfc-Fix-sg_seg_cnt-for-HBAs-that-don-t-support.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:56:49 -0700
Subject: scsi: lpfc: Fix sg_seg_cnt for HBAs that don't support NVME
Git-commit: c26c265b168bb09013922846a51447603bcdfdc4
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
On an SLI-3 adapter which does not support NVMe, but with the driver global
diff --git a/patches.suse/scsi-lpfc-Fix-sli4-adapter-initialization-with-MSI.patch b/patches.suse/scsi-lpfc-Fix-sli4-adapter-initialization-with-MSI.patch
index b44258705e..3b3a54534f 100644
--- a/patches.suse/scsi-lpfc-Fix-sli4-adapter-initialization-with-MSI.patch
+++ b/patches.suse/scsi-lpfc-Fix-sli4-adapter-initialization-with-MSI.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:56:58 -0700
Subject: scsi: lpfc: Fix sli4 adapter initialization with MSI
Git-commit: 07b1b91412c801030752da3d32a543c5522a79d6
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
When forcing the use of MSI (vs MSI-X) the driver is crashing in
diff --git a/patches.suse/scsi-lpfc-Fix-too-many-sg-segments-spamming-in-kerne.patch b/patches.suse/scsi-lpfc-Fix-too-many-sg-segments-spamming-in-kerne.patch
index 7012611585..6d1dfc3c75 100644
--- a/patches.suse/scsi-lpfc-Fix-too-many-sg-segments-spamming-in-kerne.patch
+++ b/patches.suse/scsi-lpfc-Fix-too-many-sg-segments-spamming-in-kerne.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:56:54 -0700
Subject: scsi: lpfc: Fix too many sg segments spamming in kernel log
Git-commit: 5e0e2318aa2a6fb8c2c693fb7ff995650e452054
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
This issue is specific to SLI-3 adapters, specifically when DIF is used.
diff --git a/patches.suse/scsi-lpfc-Fix-upcall-to-bsg-done-in-non-success-case.patch b/patches.suse/scsi-lpfc-Fix-upcall-to-bsg-done-in-non-success-case.patch
index 89e397b1fb..db3df3bc4d 100644
--- a/patches.suse/scsi-lpfc-Fix-upcall-to-bsg-done-in-non-success-case.patch
+++ b/patches.suse/scsi-lpfc-Fix-upcall-to-bsg-done-in-non-success-case.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:56:59 -0700
Subject: scsi: lpfc: Fix upcall to bsg done in non-success cases
Git-commit: 6db51abb8dc3919b85c5d2afd35b3871399e8a81
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
The scsi transport fc bsg interface does not expect the bsg_job_done()
diff --git a/patches.suse/scsi-lpfc-Limit-xri-count-for-kdump-environment.patch b/patches.suse/scsi-lpfc-Limit-xri-count-for-kdump-environment.patch
index d835096ee4..5073f2b9fc 100644
--- a/patches.suse/scsi-lpfc-Limit-xri-count-for-kdump-environment.patch
+++ b/patches.suse/scsi-lpfc-Limit-xri-count-for-kdump-environment.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:56:31 -0700
Subject: scsi: lpfc: Limit xri count for kdump environment
Git-commit: 31f06d2e73726160645f8d9976a0b3f42e136da7
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
scsi-mq operation inherently performs pre-allocation of resources for
diff --git a/patches.suse/scsi-lpfc-Migrate-to-px-and-pf-in-kernel-print-calls.patch b/patches.suse/scsi-lpfc-Migrate-to-px-and-pf-in-kernel-print-calls.patch
index 5ffe270a69..cbc0e18111 100644
--- a/patches.suse/scsi-lpfc-Migrate-to-px-and-pf-in-kernel-print-calls.patch
+++ b/patches.suse/scsi-lpfc-Migrate-to-px-and-pf-in-kernel-print-calls.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:57:06 -0700
Subject: scsi: lpfc: Migrate to %px and %pf in kernel print calls
Git-commit: 32350664497279f4ddd96164caafc8a1b573ca2a
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
In order to see real addresses, convert %p with %px for kernel addresses
diff --git a/patches.suse/scsi-lpfc-Resolve-checker-warning-for-lpfc_new_io_bu.patch b/patches.suse/scsi-lpfc-Resolve-checker-warning-for-lpfc_new_io_bu.patch
new file mode 100644
index 0000000000..82966684e3
--- /dev/null
+++ b/patches.suse/scsi-lpfc-Resolve-checker-warning-for-lpfc_new_io_bu.patch
@@ -0,0 +1,71 @@
+From: James Smart <jsmart2021@gmail.com>
+Date: Tue, 27 Aug 2019 14:27:46 -0700
+Subject: [PATCH] scsi: lpfc: Resolve checker warning for lpfc_new_io_buf()
+Patch-mainline: v5.4-rc1
+Git-commit: 7f9989bace91a7a36051d64cbf46f7760c52bbf0
+References: bsc#1144375
+
+Per Dan Carpenter:
+
+The patch d79c9e9d4b3d: "scsi: lpfc: Support dynamic unbounded SGL lists on
+G7 hardware." from Aug 14, 2019, leads to the following static checker
+warning:
+
+ drivers/scsi/lpfc/lpfc_init.c:4107 lpfc_new_io_buf()
+ error: not allocating enough data 784 vs 768
+
+There was no need to compare sizes nor to allocate size based on a define.
+
+Change allocation to use actual structure length
+
+Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
+Signed-off-by: James Smart <jsmart2021@gmail.com>
+CC: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/lpfc/lpfc_init.c | 11 +----------
+ drivers/scsi/lpfc/lpfc_sli4.h | 3 ---
+ 2 files changed, 1 insertion(+), 13 deletions(-)
+
+diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
+index 0bc04af1d2fb..de92eb86579a 100644
+--- a/drivers/scsi/lpfc/lpfc_init.c
++++ b/drivers/scsi/lpfc/lpfc_init.c
+@@ -4093,18 +4093,9 @@ lpfc_new_io_buf(struct lpfc_hba *phba, int num_to_alloc)
+ LIST_HEAD(post_nblist);
+ LIST_HEAD(nvme_nblist);
+
+- /* Sanity check to ensure our sizing is right for both SCSI and NVME */
+- if (sizeof(struct lpfc_io_buf) > LPFC_COMMON_IO_BUF_SZ) {
+- lpfc_printf_log(phba, KERN_ERR, LOG_FCP,
+- "6426 Common buffer size %zd exceeds %d\n",
+- sizeof(struct lpfc_io_buf),
+- LPFC_COMMON_IO_BUF_SZ);
+- return 0;
+- }
+-
+ phba->sli4_hba.io_xri_cnt = 0;
+ for (bcnt = 0; bcnt < num_to_alloc; bcnt++) {
+- lpfc_ncmd = kzalloc(LPFC_COMMON_IO_BUF_SZ, GFP_KERNEL);
++ lpfc_ncmd = kzalloc(sizeof(*lpfc_ncmd), GFP_KERNEL);
+ if (!lpfc_ncmd)
+ break;
+ /*
+diff --git a/drivers/scsi/lpfc/lpfc_sli4.h b/drivers/scsi/lpfc/lpfc_sli4.h
+index 11a72bbef8f7..4bdd58de4692 100644
+--- a/drivers/scsi/lpfc/lpfc_sli4.h
++++ b/drivers/scsi/lpfc/lpfc_sli4.h
+@@ -44,9 +44,6 @@
+ #define LPFC_HBA_HDWQ_MAX 128
+ #define LPFC_HBA_HDWQ_DEF 0
+
+-/* Common buffer size to accomidate SCSI and NVME IO buffers */
+-#define LPFC_COMMON_IO_BUF_SZ 768
+-
+ /*
+ * Provide the default FCF Record attributes used by the driver
+ * when nonFIP mode is configured and there is no other default
+--
+2.16.4
+
diff --git a/patches.suse/scsi-lpfc-Support-dynamic-unbounded-SGL-lists-on-G7-.patch b/patches.suse/scsi-lpfc-Support-dynamic-unbounded-SGL-lists-on-G7-.patch
index 413ac79100..4629c1b1ce 100644
--- a/patches.suse/scsi-lpfc-Support-dynamic-unbounded-SGL-lists-on-G7-.patch
+++ b/patches.suse/scsi-lpfc-Support-dynamic-unbounded-SGL-lists-on-G7-.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:57:09 -0700
Subject: scsi: lpfc: Support dynamic unbounded SGL lists on G7 hardware.
Git-commit: d79c9e9d4b3d9330ee38f392a7c98e0fc494f7f8
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
Typical SLI-4 hardware supports up to 2 4KB pages to be registered per XRI
diff --git a/patches.suse/scsi-lpfc-Update-lpfc-version-to-12.4.0.0.patch b/patches.suse/scsi-lpfc-Update-lpfc-version-to-12.4.0.0.patch
index 7e220ebf33..42ae9f4baa 100644
--- a/patches.suse/scsi-lpfc-Update-lpfc-version-to-12.4.0.0.patch
+++ b/patches.suse/scsi-lpfc-Update-lpfc-version-to-12.4.0.0.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:57:12 -0700
Subject: scsi: lpfc: Update lpfc version to 12.4.0.0
Git-commit: 10541f037bd925c6752250e0b37b1ea43de27068
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
Update lpfc version to 12.4.0.0
diff --git a/patches.suse/lpfc-fix-12.4.0.0-gpf-at-boot.patch b/patches.suse/scsi-lpfc-fix-12.4.0.0-GPF-at-boot.patch
index 5678da6960..0e07594083 100644
--- a/patches.suse/lpfc-fix-12.4.0.0-gpf-at-boot.patch
+++ b/patches.suse/scsi-lpfc-fix-12.4.0.0-GPF-at-boot.patch
@@ -1,15 +1,15 @@
From: James Smart <jsmart2021@gmail.com>
Date: Wed, 28 Aug 2019 16:19:11 -0700
-Subject: [PATCH] lpfc: fix 12.4.0.0 GPF at boot
-Patch-mainline: not yet, maintainer has not picked up the patch
+Subject: [PATCH] scsi: lpfc: fix 12.4.0.0 GPF at boot
+Patch-Mainline: v5.4-rc1
+Git-commit: 01f2ef6d18e70c92bbf3743be4b908f52a059263
References: bsc#1148308
The 12.4.0.0 patch that merged WQ/CQ pairs into single per-cpu pair
-contained a bug: a local variable was set to the queue pair by index.
-This should have allowed the local variable to be natively used.
-Instead, the code reused the index relative to the local variable,
-obtaining a random pointer value that when used eventually faulted
-the system
+contained a bug: a local variable was set to the queue pair by index. This
+should have allowed the local variable to be natively used. Instead, the
+code reused the index relative to the local variable, obtaining a random
+pointer value that when used eventually faulted the system
Convert offending code to use local variable.
@@ -17,6 +17,7 @@ Fixes: c00f62e6c546 ("scsi: lpfc: Merge per-protocol WQ/CQ pairs into single per
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Tested-by: Abdul Haleem <abdhalee@linux.vnet.ibm.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Daniel Wagner <dwagner@suse.de>
---
drivers/scsi/lpfc/lpfc_sli.c | 2 +-
diff --git a/patches.suse/scsi-lpfc-merge-per-protocol-wq-cq-pairs-into-single.patch b/patches.suse/scsi-lpfc-merge-per-protocol-wq-cq-pairs-into-single.patch
index 51a8f287a0..67287e13b7 100644
--- a/patches.suse/scsi-lpfc-merge-per-protocol-wq-cq-pairs-into-single.patch
+++ b/patches.suse/scsi-lpfc-merge-per-protocol-wq-cq-pairs-into-single.patch
@@ -2,8 +2,7 @@ From: James Smart <jsmart2021@gmail.com>
Date: Wed, 14 Aug 2019 16:57:11 -0700
Subject: [PATCH] scsi: lpfc: Merge per-protocol WQ/CQ pairs into single
per-cpu pair
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
Git-commit: c00f62e6c5468ed0673c583f1ff284274e817410
References: bsc#1146215
diff --git a/patches.suse/scsi-lpfc-remove-NULL-check-before-some-freeing-func.patch b/patches.suse/scsi-lpfc-remove-NULL-check-before-some-freeing-func.patch
index 700f8c152c..6c69057c2f 100644
--- a/patches.suse/scsi-lpfc-remove-NULL-check-before-some-freeing-func.patch
+++ b/patches.suse/scsi-lpfc-remove-NULL-check-before-some-freeing-func.patch
@@ -2,8 +2,7 @@ From: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Date: Sun, 21 Jul 2019 17:12:29 +0530
Subject: scsi: lpfc: remove NULL check before some freeing functions
Git-commit: a967783300bf2ba55a29255c0a591a554c651993
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+Patch-mainline: v5.4-rc1
References: bsc#1146215
As dma_pool_destroy and mempool_destroy functions has NULL check. We may
diff --git a/patches.suse/scsi-lpfc-remove-bg-debugfs-buffers.patch b/patches.suse/scsi-lpfc-remove-bg-debugfs-buffers.patch
new file mode 100644
index 0000000000..85813a1c30
--- /dev/null
+++ b/patches.suse/scsi-lpfc-remove-bg-debugfs-buffers.patch
@@ -0,0 +1,443 @@
+From: James Smart <jsmart2021@gmail.com>
+Date: Tue, 27 Aug 2019 14:28:05 -0700
+Subject: [PATCH] scsi: lpfc: Remove bg debugfs buffers
+Patch-mainline: v5.4-rc1
+Git-commit: 9db6c14c36fc8f7824ade95f53bcdad43df678b4
+References: bsc#1144375
+
+Capturing and downloading dif command data and dif data was done a dozen
+years ago and no longer being used. Also creates a potential security hole.
+
+Remove the debugfs buffer for dif debugging.
+
+Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
+Signed-off-by: James Smart <jsmart2021@gmail.com>
+CC: KyleMahlkuch <kmahlkuc@linux.vnet.ibm.com>
+CC: Hannes Reinecke <hare@suse.de>
+Reviewed-by: Hannes Reinecke <hare@suse.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Daniel Wagner <dwagner@suse.de>
+---
+ drivers/scsi/lpfc/lpfc.h | 2 -
+ drivers/scsi/lpfc/lpfc_crtn.h | 10 ---
+ drivers/scsi/lpfc/lpfc_debugfs.c | 134 ---------------------------------------
+ drivers/scsi/lpfc/lpfc_init.c | 70 --------------------
+ drivers/scsi/lpfc/lpfc_scsi.c | 79 -----------------------
+ 5 files changed, 295 deletions(-)
+
+diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
+index 11873f0d521c..d890564f00cc 100644
+--- a/drivers/scsi/lpfc/lpfc.h
++++ b/drivers/scsi/lpfc/lpfc.h
+@@ -1038,8 +1038,6 @@ struct lpfc_hba {
+ struct dentry *debug_hbqinfo;
+ struct dentry *debug_dumpHostSlim;
+ struct dentry *debug_dumpHBASlim;
+- struct dentry *debug_dumpData; /* BlockGuard BPL */
+- struct dentry *debug_dumpDif; /* BlockGuard BPL */
+ struct dentry *debug_InjErrLBA; /* LBA to inject errors at */
+ struct dentry *debug_InjErrNPortID; /* NPortID to inject errors at */
+ struct dentry *debug_InjErrWWPN; /* WWPN to inject errors at */
+diff --git a/drivers/scsi/lpfc/lpfc_crtn.h b/drivers/scsi/lpfc/lpfc_crtn.h
+index 8b84acc95a07..b2ad8c750486 100644
+--- a/drivers/scsi/lpfc/lpfc_crtn.h
++++ b/drivers/scsi/lpfc/lpfc_crtn.h
+@@ -433,16 +433,6 @@ int lpfc_sli4_get_allocated_extnts(struct lpfc_hba *, uint16_t,
+ int lpfc_sli4_get_avail_extnt_rsrc(struct lpfc_hba *, uint16_t,
+ uint16_t *, uint16_t *);
+
+-/* externs BlockGuard */
+-extern char *_dump_buf_data;
+-extern unsigned long _dump_buf_data_order;
+-extern char *_dump_buf_dif;
+-extern unsigned long _dump_buf_dif_order;
+-extern spinlock_t _dump_buf_lock;
+-extern int _dump_buf_done;
+-extern spinlock_t pgcnt_lock;
+-extern unsigned int pgcnt;
+-
+ /* Interface exported by fabric iocb scheduler */
+ void lpfc_fabric_abort_nport(struct lpfc_nodelist *);
+ void lpfc_fabric_abort_hba(struct lpfc_hba *);
+diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c
+index 45f431fbe0d2..8d34be60d379 100644
+--- a/drivers/scsi/lpfc/lpfc_debugfs.c
++++ b/drivers/scsi/lpfc/lpfc_debugfs.c
+@@ -2162,89 +2162,6 @@ lpfc_debugfs_dumpHostSlim_open(struct inode *inode, struct file *file)
+ return rc;
+ }
+
+-static int
+-lpfc_debugfs_dumpData_open(struct inode *inode, struct file *file)
+-{
+- struct lpfc_debug *debug;
+- int rc = -ENOMEM;
+-
+- if (!_dump_buf_data)
+- return -EBUSY;
+-
+- debug = kmalloc(sizeof(*debug), GFP_KERNEL);
+- if (!debug)
+- goto out;
+-
+- /* Round to page boundary */
+- pr_err("9059 BLKGRD: %s: _dump_buf_data=0x%p\n",
+- __func__, _dump_buf_data);
+- debug->buffer = _dump_buf_data;
+- if (!debug->buffer) {
+- kfree(debug);
+- goto out;
+- }
+-
+- debug->len = (1 << _dump_buf_data_order) << PAGE_SHIFT;
+- file->private_data = debug;
+-
+- rc = 0;
+-out:
+- return rc;
+-}
+-
+-static int
+-lpfc_debugfs_dumpDif_open(struct inode *inode, struct file *file)
+-{
+- struct lpfc_debug *debug;
+- int rc = -ENOMEM;
+-
+- if (!_dump_buf_dif)
+- return -EBUSY;
+-
+- debug = kmalloc(sizeof(*debug), GFP_KERNEL);
+- if (!debug)
+- goto out;
+-
+- /* Round to page boundary */
+- pr_err("9060 BLKGRD: %s: _dump_buf_dif=x%px file=%pD\n",
+- __func__, _dump_buf_dif, file);
+- debug->buffer = _dump_buf_dif;
+- if (!debug->buffer) {
+- kfree(debug);
+- goto out;
+- }
+-
+- debug->len = (1 << _dump_buf_dif_order) << PAGE_SHIFT;
+- file->private_data = debug;
+-
+- rc = 0;
+-out:
+- return rc;
+-}
+-
+-static ssize_t
+-lpfc_debugfs_dumpDataDif_write(struct file *file, const char __user *buf,
+- size_t nbytes, loff_t *ppos)
+-{
+- /*
+- * The Data/DIF buffers only save one failing IO
+- * The write op is used as a reset mechanism after an IO has
+- * already been saved to the next one can be saved
+- */
+- spin_lock(&_dump_buf_lock);
+-
+- memset((void *)_dump_buf_data, 0,
+- ((1 << PAGE_SHIFT) << _dump_buf_data_order));
+- memset((void *)_dump_buf_dif, 0,
+- ((1 << PAGE_SHIFT) << _dump_buf_dif_order));
+-
+- _dump_buf_done = 0;
+-
+- spin_unlock(&_dump_buf_lock);
+-
+- return nbytes;
+-}
+-
+ static ssize_t
+ lpfc_debugfs_dif_err_read(struct file *file, char __user *buf,
+ size_t nbytes, loff_t *ppos)
+@@ -2457,17 +2374,6 @@ lpfc_debugfs_release(struct inode *inode, struct file *file)
+ return 0;
+ }
+
+-static int
+-lpfc_debugfs_dumpDataDif_release(struct inode *inode, struct file *file)
+-{
+- struct lpfc_debug *debug = file->private_data;
+-
+- debug->buffer = NULL;
+- kfree(debug);
+-
+- return 0;
+-}
+-
+ /**
+ * lpfc_debugfs_multixripools_write - Clear multi-XRI pools statistics
+ * @file: The file pointer to read from.
+@@ -5448,26 +5354,6 @@ static const struct file_operations lpfc_debugfs_op_cpucheck = {
+ .release = lpfc_debugfs_release,
+ };
+
+-#undef lpfc_debugfs_op_dumpData
+-static const struct file_operations lpfc_debugfs_op_dumpData = {
+- .owner = THIS_MODULE,
+- .open = lpfc_debugfs_dumpData_open,
+- .llseek = lpfc_debugfs_lseek,
+- .read = lpfc_debugfs_read,
+- .write = lpfc_debugfs_dumpDataDif_write,
+- .release = lpfc_debugfs_dumpDataDif_release,
+-};
+-
+-#undef lpfc_debugfs_op_dumpDif
+-static const struct file_operations lpfc_debugfs_op_dumpDif = {
+- .owner = THIS_MODULE,
+- .open = lpfc_debugfs_dumpDif_open,
+- .llseek = lpfc_debugfs_lseek,
+- .read = lpfc_debugfs_read,
+- .write = lpfc_debugfs_dumpDataDif_write,
+- .release = lpfc_debugfs_dumpDataDif_release,
+-};
+-
+ #undef lpfc_debugfs_op_dif_err
+ static const struct file_operations lpfc_debugfs_op_dif_err = {
+ .owner = THIS_MODULE,
+@@ -5864,20 +5750,6 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
+ } else
+ phba->debug_dumpHostSlim = NULL;
+
+- /* Setup dumpData */
+- snprintf(name, sizeof(name), "dumpData");
+- phba->debug_dumpData =
+- debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
+- phba->hba_debugfs_root,
+- phba, &lpfc_debugfs_op_dumpData);
+-
+- /* Setup dumpDif */
+- snprintf(name, sizeof(name), "dumpDif");
+- phba->debug_dumpDif =
+- debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
+- phba->hba_debugfs_root,
+- phba, &lpfc_debugfs_op_dumpDif);
+-
+ /* Setup DIF Error Injections */
+ snprintf(name, sizeof(name), "InjErrLBA");
+ phba->debug_InjErrLBA =
+@@ -6255,12 +6127,6 @@ lpfc_debugfs_terminate(struct lpfc_vport *vport)
+ debugfs_remove(phba->debug_dumpHostSlim); /* HostSlim */
+ phba->debug_dumpHostSlim = NULL;
+
+- debugfs_remove(phba->debug_dumpData); /* dumpData */
+- phba->debug_dumpData = NULL;
+-
+- debugfs_remove(phba->debug_dumpDif); /* dumpDif */
+- phba->debug_dumpDif = NULL;
+-
+ debugfs_remove(phba->debug_InjErrLBA); /* InjErrLBA */
+ phba->debug_InjErrLBA = NULL;
+
+diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
+index de92eb86579a..de64880c6c60 100644
+--- a/drivers/scsi/lpfc/lpfc_init.c
++++ b/drivers/scsi/lpfc/lpfc_init.c
+@@ -66,12 +66,6 @@
+ #include "lpfc_version.h"
+ #include "lpfc_ids.h"
+
+-char *_dump_buf_data;
+-unsigned long _dump_buf_data_order;
+-char *_dump_buf_dif;
+-unsigned long _dump_buf_dif_order;
+-spinlock_t _dump_buf_lock;
+-
+ /* Used when mapping IRQ vectors in a driver centric manner */
+ static uint32_t lpfc_present_cpu;
+
+@@ -7617,7 +7611,6 @@ lpfc_setup_bg(struct lpfc_hba *phba, struct Scsi_Host *shost)
+ uint32_t old_mask;
+ uint32_t old_guard;
+
+- int pagecnt = 10;
+ if (phba->cfg_prot_mask && phba->cfg_prot_guard) {
+ lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
+ "1478 Registering BlockGuard with the "
+@@ -7654,56 +7647,6 @@ lpfc_setup_bg(struct lpfc_hba *phba, struct Scsi_Host *shost)
+ "layer, Bad protection parameters: %d %d\n",
+ old_mask, old_guard);
+ }
+-
+- if (!_dump_buf_data) {
+- while (pagecnt) {
+- spin_lock_init(&_dump_buf_lock);
+- _dump_buf_data =
+- (char *) __get_free_pages(GFP_KERNEL, pagecnt);
+- if (_dump_buf_data) {
+- lpfc_printf_log(phba, KERN_ERR, LOG_BG,
+- "9043 BLKGRD: allocated %d pages for "
+- "_dump_buf_data at x%px\n",
+- (1 << pagecnt), _dump_buf_data);
+- _dump_buf_data_order = pagecnt;
+- memset(_dump_buf_data, 0,
+- ((1 << PAGE_SHIFT) << pagecnt));
+- break;
+- } else
+- --pagecnt;
+- }
+- if (!_dump_buf_data_order)
+- lpfc_printf_log(phba, KERN_ERR, LOG_BG,
+- "9044 BLKGRD: ERROR unable to allocate "
+- "memory for hexdump\n");
+- } else
+- lpfc_printf_log(phba, KERN_ERR, LOG_BG,
+- "9045 BLKGRD: already allocated _dump_buf_data=x%px"
+- "\n", _dump_buf_data);
+- if (!_dump_buf_dif) {
+- while (pagecnt) {
+- _dump_buf_dif =
+- (char *) __get_free_pages(GFP_KERNEL, pagecnt);
+- if (_dump_buf_dif) {
+- lpfc_printf_log(phba, KERN_ERR, LOG_BG,
+- "9046 BLKGRD: allocated %d pages for "
+- "_dump_buf_dif at x%px\n",
+- (1 << pagecnt), _dump_buf_dif);
+- _dump_buf_dif_order = pagecnt;
+- memset(_dump_buf_dif, 0,
+- ((1 << PAGE_SHIFT) << pagecnt));
+- break;
+- } else
+- --pagecnt;
+- }
+- if (!_dump_buf_dif_order)
+- lpfc_printf_log(phba, KERN_ERR, LOG_BG,
+- "9047 BLKGRD: ERROR unable to allocate "
+- "memory for hexdump\n");
+- } else
+- lpfc_printf_log(phba, KERN_ERR, LOG_BG,
+- "9048 BLKGRD: already allocated _dump_buf_dif=x%px\n",
+- _dump_buf_dif);
+ }
+
+ /**
+@@ -13511,19 +13454,6 @@ lpfc_exit(void)
+ pci_unregister_driver(&lpfc_driver);
+ fc_release_transport(lpfc_transport_template);
+ fc_release_transport(lpfc_vport_transport_template);
+- if (_dump_buf_data) {
+- printk(KERN_ERR "9062 BLKGRD: freeing %lu pages for "
+- "_dump_buf_data at x%px\n",
+- (1L << _dump_buf_data_order), _dump_buf_data);
+- free_pages((unsigned long)_dump_buf_data, _dump_buf_data_order);
+- }
+-
+- if (_dump_buf_dif) {
+- printk(KERN_ERR "9049 BLKGRD: freeing %lu pages for "
+- "_dump_buf_dif at x%px\n",
+- (1L << _dump_buf_dif_order), _dump_buf_dif);
+- free_pages((unsigned long)_dump_buf_dif, _dump_buf_dif_order);
+- }
+ idr_destroy(&lpfc_hba_index);
+ }
+
+diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
+index 7c65bd652c4d..fe1097666de4 100644
+--- a/drivers/scsi/lpfc/lpfc_scsi.c
++++ b/drivers/scsi/lpfc/lpfc_scsi.c
+@@ -53,8 +53,6 @@
+ #define LPFC_RESET_WAIT 2
+ #define LPFC_ABORT_WAIT 2
+
+-int _dump_buf_done = 1;
+-
+ static char *dif_op_str[] = {
+ "PROT_NORMAL",
+ "PROT_READ_INSERT",
+@@ -89,63 +87,6 @@ lpfc_release_scsi_buf_s3(struct lpfc_hba *phba, struct lpfc_io_buf *psb);
+ static int
+ lpfc_prot_group_type(struct lpfc_hba *phba, struct scsi_cmnd *sc);
+
+-static void
+-lpfc_debug_save_data(struct lpfc_hba *phba, struct scsi_cmnd *cmnd)
+-{
+- void *src, *dst;
+- struct scatterlist *sgde = scsi_sglist(cmnd);
+-
+- if (!_dump_buf_data) {
+- lpfc_printf_log(phba, KERN_ERR, LOG_BG,
+- "9050 BLKGRD: ERROR %s _dump_buf_data is NULL\n",
+- __func__);
+- return;
+- }
+-
+-
+- if (!sgde) {
+- lpfc_printf_log(phba, KERN_ERR, LOG_BG,
+- "9051 BLKGRD: ERROR: data scatterlist is null\n");
+- return;
+- }
+-
+- dst = (void *) _dump_buf_data;
+- while (sgde) {
+- src = sg_virt(sgde);
+- memcpy(dst, src, sgde->length);
+- dst += sgde->length;
+- sgde = sg_next(sgde);
+- }
+-}
+-
+-static void
+-lpfc_debug_save_dif(struct lpfc_hba *phba, struct scsi_cmnd *cmnd)
+-{
+- void *src, *dst;
+- struct scatterlist *sgde = scsi_prot_sglist(cmnd);
+-
+- if (!_dump_buf_dif) {
+- lpfc_printf_log(phba, KERN_ERR, LOG_BG,
+- "9052 BLKGRD: ERROR %s _dump_buf_data is NULL\n",
+- __func__);
+- return;
+- }
+-
+- if (!sgde) {
+- lpfc_printf_log(phba, KERN_ERR, LOG_BG,
+- "9053 BLKGRD: ERROR: prot scatterlist is null\n");
+- return;
+- }
+-
+- dst = _dump_buf_dif;
+- while (sgde) {
+- src = sg_virt(sgde);
+- memcpy(dst, src, sgde->length);
+- dst += sgde->length;
+- sgde = sg_next(sgde);
+- }
+-}
+-
+ static inline unsigned
+ lpfc_cmd_blksize(struct scsi_cmnd *sc)
+ {
+@@ -2962,26 +2903,6 @@ lpfc_parse_bg_err(struct lpfc_hba *phba, struct lpfc_io_buf *lpfc_cmd,
+ uint32_t bgstat = bgf->bgstat;
+ uint64_t failing_sector = 0;
+
+- spin_lock(&_dump_buf_lock);
+- if (!_dump_buf_done) {
+- lpfc_printf_log(phba, KERN_ERR, LOG_BG, "9070 BLKGRD: Saving"
+- " Data for %u blocks to debugfs\n",
+- (cmd->cmnd[7] << 8 | cmd->cmnd[8]));
+- lpfc_debug_save_data(phba, cmd);
+-
+- /* If we have a prot sgl, save the DIF buffer */
+- if (lpfc_prot_group_type(phba, cmd) ==
+- LPFC_PG_TYPE_DIF_BUF) {
+- lpfc_printf_log(phba, KERN_ERR, LOG_BG, "9071 BLKGRD: "
+- "Saving DIF for %u blocks to debugfs\n",
+- (cmd->cmnd[7] << 8 | cmd->cmnd[8]));
+- lpfc_debug_save_dif(phba, cmd);
+- }
+-
+- _dump_buf_done = 1;
+- }
+- spin_unlock(&_dump_buf_lock);
+-
+ if (lpfc_bgs_get_invalid_prof(bgstat)) {
+ cmd->result = DID_ERROR << 16;
+ lpfc_printf_log(phba, KERN_WARNING, LOG_FCP | LOG_BG,
+--
+2.16.4
+
diff --git a/patches.suse/scsi-qla2xxx-Allow-NVMe-IO-to-resume-with-short-cabl.patch b/patches.suse/scsi-qla2xxx-Allow-NVMe-IO-to-resume-with-short-cabl.patch
index c4f4841465..4b4304f474 100644
--- a/patches.suse/scsi-qla2xxx-Allow-NVMe-IO-to-resume-with-short-cabl.patch
+++ b/patches.suse/scsi-qla2xxx-Allow-NVMe-IO-to-resume-with-short-cabl.patch
@@ -1,8 +1,7 @@
From: Quinn Tran <qutran@marvell.com>
Date: Fri, 26 Jul 2019 09:07:39 -0700
Subject: scsi: qla2xxx: Allow NVMe IO to resume with short cable pull
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
+Patch-mainline: v5.4-rc1
Git-commit: 03cc44bf682af289d6536eb911e928b415bd0e1f
References: bsc#1082635 bsc#1141340 bsc#1143706
diff --git a/patches.suse/scsi-qla2xxx-Correct-error-handling-during-initializ.patch b/patches.suse/scsi-qla2xxx-Correct-error-handling-during-initializ.patch
index 80aa495d64..5352589689 100644
--- a/patches.suse/scsi-qla2xxx-Correct-error-handling-during-initializ.patch
+++ b/patches.suse/scsi-qla2xxx-Correct-error-handling-during-initializ.patch
@@ -1,8 +1,7 @@
From: Andrew Vasquez <andrewv@marvell.com>
Date: Fri, 26 Jul 2019 09:07:35 -0700
Subject: scsi: qla2xxx: Correct error handling during initialization failures
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
+Patch-mainline: v5.4-rc1
Git-commit: 26a77799195f4ff105f877042012c7fb355b3da1
References: bsc#1082635 bsc#1141340 bsc#1143706
@@ -72,7 +71,7 @@ Acked-by: Daniel Wagner <dwagner@suse.de>
+ if (ql2xenabledif && ha->dif_bundl_pool) {
struct dsd_dma *dsd, *nxt;
- if (!ha->pool.unusable.head.next)
+ list_for_each_entry_safe(dsd, nxt, &ha->pool.unusable.head,
@@ -4828,7 +4834,7 @@ struct scsi_qla_host *qla2x00_create_hos
if (!vha->gnl.l) {
ql_log(ql_log_fatal, vha, 0xd04a,
diff --git a/patches.suse/scsi-qla2xxx-Fix-DMA-unmap-leak.patch b/patches.suse/scsi-qla2xxx-Fix-DMA-unmap-leak.patch
index a1c25eb683..84f9847abe 100644
--- a/patches.suse/scsi-qla2xxx-Fix-DMA-unmap-leak.patch
+++ b/patches.suse/scsi-qla2xxx-Fix-DMA-unmap-leak.patch
@@ -1,8 +1,7 @@
From: Himanshu Madhani <hmadhani@marvell.com>
Date: Fri, 26 Jul 2019 09:07:26 -0700
Subject: scsi: qla2xxx: Fix DMA unmap leak
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
+Patch-mainline: v5.4-rc1
Git-commit: 5d328de64d89400dcf9911125844d8adc0db697f
References: bsc#1082635 bsc#1141340 bsc#1143706
diff --git a/patches.suse/scsi-qla2xxx-Fix-NVMe-port-discovery-after-a-short-d.patch b/patches.suse/scsi-qla2xxx-Fix-NVMe-port-discovery-after-a-short-d.patch
index 1a0d90d23d..b2a42e83d3 100644
--- a/patches.suse/scsi-qla2xxx-Fix-NVMe-port-discovery-after-a-short-d.patch
+++ b/patches.suse/scsi-qla2xxx-Fix-NVMe-port-discovery-after-a-short-d.patch
@@ -1,8 +1,7 @@
From: Arun Easi <aeasi@marvell.com>
Date: Fri, 26 Jul 2019 09:07:36 -0700
Subject: scsi: qla2xxx: Fix NVMe port discovery after a short device port loss
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
+Patch-mainline: v5.4-rc1
Git-commit: 9e744591ef1b8df27c25c68dac858dada8688f77
References: bsc#1082635 bsc#1141340 bsc#1143706
diff --git a/patches.suse/scsi-qla2xxx-Fix-Relogin-to-prevent-modifying-scan_s.patch b/patches.suse/scsi-qla2xxx-Fix-Relogin-to-prevent-modifying-scan_s.patch
index 888f811f38..7872948507 100644
--- a/patches.suse/scsi-qla2xxx-Fix-Relogin-to-prevent-modifying-scan_s.patch
+++ b/patches.suse/scsi-qla2xxx-Fix-Relogin-to-prevent-modifying-scan_s.patch
@@ -1,8 +1,7 @@
From: Quinn Tran <qutran@marvell.com>
Date: Fri, 26 Jul 2019 09:07:32 -0700
Subject: scsi: qla2xxx: Fix Relogin to prevent modifying scan_state flag
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
+Patch-mainline: v5.4-rc1
Git-commit: 8b5292bcfcacf15182a77a973a98d310e76fd58b
References: bsc#1082635 bsc#1141340 bsc#1143706
diff --git a/patches.suse/scsi-qla2xxx-Fix-abort-timeout-race-condition.patch b/patches.suse/scsi-qla2xxx-Fix-abort-timeout-race-condition.patch
index e1b1326770..05d070082d 100644
--- a/patches.suse/scsi-qla2xxx-Fix-abort-timeout-race-condition.patch
+++ b/patches.suse/scsi-qla2xxx-Fix-abort-timeout-race-condition.patch
@@ -1,8 +1,7 @@
From: Quinn Tran <qutran@marvell.com>
Date: Fri, 26 Jul 2019 09:07:28 -0700
Subject: scsi: qla2xxx: Fix abort timeout race condition.
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
+Patch-mainline: v5.4-rc1
Git-commit: 0c6df59061b23c7a951836d23977be34e896d3da
References: bsc#1082635 bsc#1141340 bsc#1143706
diff --git a/patches.suse/scsi-qla2xxx-Fix-different-size-DMA-Alloc-Unmap.patch b/patches.suse/scsi-qla2xxx-Fix-different-size-DMA-Alloc-Unmap.patch
index eb0178baf5..3a6b37bb5a 100644
--- a/patches.suse/scsi-qla2xxx-Fix-different-size-DMA-Alloc-Unmap.patch
+++ b/patches.suse/scsi-qla2xxx-Fix-different-size-DMA-Alloc-Unmap.patch
@@ -1,8 +1,7 @@
From: Quinn Tran <qutran@marvell.com>
Date: Fri, 26 Jul 2019 09:07:27 -0700
Subject: scsi: qla2xxx: Fix different size DMA Alloc/Unmap
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
+Patch-mainline: v5.4-rc1
Git-commit: d376dbda187317d06d3a2d495b43a7983e4a3250
References: bsc#1082635 bsc#1141340 bsc#1143706
diff --git a/patches.suse/scsi-qla2xxx-Fix-hang-in-fcport-delete-path.patch b/patches.suse/scsi-qla2xxx-Fix-hang-in-fcport-delete-path.patch
index 31fa81cad9..f7d6b413d1 100644
--- a/patches.suse/scsi-qla2xxx-Fix-hang-in-fcport-delete-path.patch
+++ b/patches.suse/scsi-qla2xxx-Fix-hang-in-fcport-delete-path.patch
@@ -1,8 +1,7 @@
From: Quinn Tran <qutran@marvell.com>
Date: Fri, 26 Jul 2019 09:07:38 -0700
Subject: scsi: qla2xxx: Fix hang in fcport delete path
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
+Patch-mainline: v5.4-rc1
Git-commit: f00b3428a801758243693e046b34226e92bc56b3
References: bsc#1082635 bsc#1141340 bsc#1143706
diff --git a/patches.suse/scsi-qla2xxx-Fix-premature-timer-expiration.patch b/patches.suse/scsi-qla2xxx-Fix-premature-timer-expiration.patch
index c6d6e3ec0b..5c2c4685ed 100644
--- a/patches.suse/scsi-qla2xxx-Fix-premature-timer-expiration.patch
+++ b/patches.suse/scsi-qla2xxx-Fix-premature-timer-expiration.patch
@@ -1,8 +1,7 @@
From: Quinn Tran <qutran@marvell.com>
Date: Fri, 26 Jul 2019 09:07:33 -0700
Subject: scsi: qla2xxx: Fix premature timer expiration
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
+Patch-mainline: v5.4-rc1
Git-commit: 3a4b6cc7332130ac5cbf3b505d8cddf0aa2ea745
References: bsc#1082635 bsc#1141340 bsc#1143706
diff --git a/patches.suse/scsi-qla2xxx-Include-the-asm-unaligned.h-header-file.patch b/patches.suse/scsi-qla2xxx-Include-the-asm-unaligned.h-header-file.patch
new file mode 100644
index 0000000000..7f30bb0ec4
--- /dev/null
+++ b/patches.suse/scsi-qla2xxx-Include-the-asm-unaligned.h-header-file.patch
@@ -0,0 +1,38 @@
+From: Bart Van Assche <bvanassche@acm.org>
+Date: Thu, 8 Aug 2019 20:01:26 -0700
+Subject: [PATCH] scsi: qla2xxx: Include the <asm/unaligned.h> header file from
+ qla_dsd.h
+Git-commit: ba0cef2532717354d90ea81dc47837d61c98defc
+Patch-Mainline: v5.4-rc1
+References: bsc#1150973
+
+Since the put_unaligned_*() macros are used in this header file, include
+the header file that defines these macros.
+
+Cc: Himanshu Madhani <hmadhani@marvell.com>
+Fixes: 15b7a68c1d03 ("scsi: qla2xxx: Introduce the dsd32 and dsd64 data structures") # v5.2-rc1.
+Signed-off-by: Bart Van Assche <bvanassche@acm.org>
+Tested-by: Himanshu Madhani <hmadhani@marvell.com>
+Reviewed-by: Himanshu Madhani <hmadhani@marvell.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/qla2xxx/qla_dsd.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/scsi/qla2xxx/qla_dsd.h b/drivers/scsi/qla2xxx/qla_dsd.h
+index 7479924ba422..20788054b91b 100644
+--- a/drivers/scsi/qla2xxx/qla_dsd.h
++++ b/drivers/scsi/qla2xxx/qla_dsd.h
+@@ -1,6 +1,8 @@
+ #ifndef _QLA_DSD_H_
+ #define _QLA_DSD_H_
+
++#include <asm/unaligned.h>
++
+ /* 32-bit data segment descriptor (8 bytes) */
+ struct dsd32 {
+ __le32 address;
+--
+2.16.4
+
diff --git a/patches.suse/scsi-qla2xxx-Introduce-the-dsd32-and-dsd64-data-stru.patch b/patches.suse/scsi-qla2xxx-Introduce-the-dsd32-and-dsd64-data-stru.patch
new file mode 100644
index 0000000000..0234431f80
--- /dev/null
+++ b/patches.suse/scsi-qla2xxx-Introduce-the-dsd32-and-dsd64-data-stru.patch
@@ -0,0 +1,1443 @@
+From: Bart Van Assche <bvanassche@acm.org>
+Date: Wed, 17 Apr 2019 14:44:38 -0700
+Subject: [PATCH] scsi: qla2xxx: Introduce the dsd32 and dsd64 data structures
+Patch-mainline: v5.2-rc1
+Git-commit: 15b7a68c1d030b2365c823730d0eb9257f2aa60e
+References: bsc#1082635 bsc#1141340 bsc#1143706
+
+Introduce two structures for the (DMA address, length) combination instead
+of using separate structure members for the DMA address and length. This
+patch fixes several Coverity complaints about 'cur_dsd' being used to write
+outside the bounds of structure members.
+
+Cc: Himanshu Madhani <hmadhani@marvell.com>
+Cc: Giridhar Malavali <gmalavali@marvell.com>
+Signed-off-by: Bart Van Assche <bvanassche@acm.org>
+Acked-by: Himanshu Madhani <hmadhani@marvell.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/qla2xxx/qla_bsg.c | 10 +-
+ drivers/scsi/qla2xxx/qla_def.h | 58 ++-------
+ drivers/scsi/qla2xxx/qla_dsd.h | 30 +++++
+ drivers/scsi/qla2xxx/qla_fw.h | 22 ++--
+ drivers/scsi/qla2xxx/qla_gbl.h | 6 +-
+ drivers/scsi/qla2xxx/qla_gs.c | 44 +++----
+ drivers/scsi/qla2xxx/qla_iocb.c | 255 +++++++++++++++-----------------------
+ drivers/scsi/qla2xxx/qla_mr.c | 57 +++------
+ drivers/scsi/qla2xxx/qla_mr.h | 11 +-
+ drivers/scsi/qla2xxx/qla_nvme.c | 14 +--
+ drivers/scsi/qla2xxx/qla_nvme.h | 9 +-
+ drivers/scsi/qla2xxx/qla_target.c | 37 ++----
+ drivers/scsi/qla2xxx/qla_target.h | 13 +-
+ 13 files changed, 221 insertions(+), 345 deletions(-)
+ create mode 100644 drivers/scsi/qla2xxx/qla_dsd.h
+
+diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c
+index 45f26ea5f9d9..5441557b424b 100644
+--- a/drivers/scsi/qla2xxx/qla_bsg.c
++++ b/drivers/scsi/qla2xxx/qla_bsg.c
+@@ -1056,9 +1056,8 @@ qla84xx_updatefw(struct bsg_job *bsg_job)
+ mn->fw_ver = cpu_to_le32(fw_ver);
+ mn->fw_size = cpu_to_le32(data_len);
+ mn->fw_seq_size = cpu_to_le32(data_len);
+- mn->dseg_address[0] = cpu_to_le32(LSD(fw_dma));
+- mn->dseg_address[1] = cpu_to_le32(MSD(fw_dma));
+- mn->dseg_length = cpu_to_le32(data_len);
++ put_unaligned_le64(fw_dma, &mn->dsd.address);
++ mn->dsd.length = cpu_to_le32(data_len);
+ mn->data_seg_cnt = cpu_to_le16(1);
+
+ rval = qla2x00_issue_iocb_timeout(vha, mn, mn_dma, 0, 120);
+@@ -1237,9 +1236,8 @@ qla84xx_mgmt_cmd(struct bsg_job *bsg_job)
+ if (ql84_mgmt->mgmt.cmd != QLA84_MGMT_CHNG_CONFIG) {
+ mn->total_byte_cnt = cpu_to_le32(ql84_mgmt->mgmt.len);
+ mn->dseg_count = cpu_to_le16(1);
+- mn->dseg_address[0] = cpu_to_le32(LSD(mgmt_dma));
+- mn->dseg_address[1] = cpu_to_le32(MSD(mgmt_dma));
+- mn->dseg_length = cpu_to_le32(ql84_mgmt->mgmt.len);
++ put_unaligned_le64(mgmt_dma, &mn->dsd.address);
++ mn->dsd.length = cpu_to_le32(ql84_mgmt->mgmt.len);
+ }
+
+ rval = qla2x00_issue_iocb(vha, mn, mn_dma, 0);
+diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
+index 8acaeba98da1..502a4812bf51 100644
+--- a/drivers/scsi/qla2xxx/qla_def.h
++++ b/drivers/scsi/qla2xxx/qla_def.h
+@@ -35,6 +35,7 @@
+ #include <scsi/scsi_bsg_fc.h>
+
+ #include "qla_bsg.h"
++#include "qla_dsd.h"
+ #include "qla_nx.h"
+ #include "qla_nx2.h"
+ #include "qla_nvme.h"
+@@ -1754,12 +1755,10 @@ typedef struct {
+ uint16_t dseg_count; /* Data segment count. */
+ uint8_t scsi_cdb[MAX_CMDSZ]; /* SCSI command words. */
+ uint32_t byte_count; /* Total byte count. */
+- uint32_t dseg_0_address; /* Data segment 0 address. */
+- uint32_t dseg_0_length; /* Data segment 0 length. */
+- uint32_t dseg_1_address; /* Data segment 1 address. */
+- uint32_t dseg_1_length; /* Data segment 1 length. */
+- uint32_t dseg_2_address; /* Data segment 2 address. */
+- uint32_t dseg_2_length; /* Data segment 2 length. */
++ union {
++ struct dsd32 dsd32[3];
++ struct dsd64 dsd64[2];
++ };
+ } cmd_entry_t;
+
+ /*
+@@ -1780,10 +1779,7 @@ typedef struct {
+ uint16_t dseg_count; /* Data segment count. */
+ uint8_t scsi_cdb[MAX_CMDSZ]; /* SCSI command words. */
+ uint32_t byte_count; /* Total byte count. */
+- uint32_t dseg_0_address[2]; /* Data segment 0 address. */
+- uint32_t dseg_0_length; /* Data segment 0 length. */
+- uint32_t dseg_1_address[2]; /* Data segment 1 address. */
+- uint32_t dseg_1_length; /* Data segment 1 length. */
++ struct dsd64 dsd[2];
+ } cmd_a64_entry_t, request_t;
+
+ /*
+@@ -1796,20 +1792,7 @@ typedef struct {
+ uint8_t sys_define; /* System defined. */
+ uint8_t entry_status; /* Entry Status. */
+ uint32_t reserved;
+- uint32_t dseg_0_address; /* Data segment 0 address. */
+- uint32_t dseg_0_length; /* Data segment 0 length. */
+- uint32_t dseg_1_address; /* Data segment 1 address. */
+- uint32_t dseg_1_length; /* Data segment 1 length. */
+- uint32_t dseg_2_address; /* Data segment 2 address. */
+- uint32_t dseg_2_length; /* Data segment 2 length. */
+- uint32_t dseg_3_address; /* Data segment 3 address. */
+- uint32_t dseg_3_length; /* Data segment 3 length. */
+- uint32_t dseg_4_address; /* Data segment 4 address. */
+- uint32_t dseg_4_length; /* Data segment 4 length. */
+- uint32_t dseg_5_address; /* Data segment 5 address. */
+- uint32_t dseg_5_length; /* Data segment 5 length. */
+- uint32_t dseg_6_address; /* Data segment 6 address. */
+- uint32_t dseg_6_length; /* Data segment 6 length. */
++ struct dsd32 dsd[7];
+ } cont_entry_t;
+
+ /*
+@@ -1821,16 +1804,7 @@ typedef struct {
+ uint8_t entry_count; /* Entry count. */
+ uint8_t sys_define; /* System defined. */
+ uint8_t entry_status; /* Entry Status. */
+- uint32_t dseg_0_address[2]; /* Data segment 0 address. */
+- uint32_t dseg_0_length; /* Data segment 0 length. */
+- uint32_t dseg_1_address[2]; /* Data segment 1 address. */
+- uint32_t dseg_1_length; /* Data segment 1 length. */
+- uint32_t dseg_2_address [2]; /* Data segment 2 address. */
+- uint32_t dseg_2_length; /* Data segment 2 length. */
+- uint32_t dseg_3_address[2]; /* Data segment 3 address. */
+- uint32_t dseg_3_length; /* Data segment 3 length. */
+- uint32_t dseg_4_address[2]; /* Data segment 4 address. */
+- uint32_t dseg_4_length; /* Data segment 4 length. */
++ struct dsd64 dsd[5];
+ } cont_a64_entry_t;
+
+ #define PO_MODE_DIF_INSERT 0
+@@ -1874,8 +1848,7 @@ struct crc_context {
+ uint16_t reserved_2;
+ uint16_t reserved_3;
+ uint32_t reserved_4;
+- uint32_t data_address[2];
+- uint32_t data_length;
++ struct dsd64 data_dsd;
+ uint32_t reserved_5[2];
+ uint32_t reserved_6;
+ } nobundling;
+@@ -1885,11 +1858,8 @@ struct crc_context {
+ uint16_t reserved_1;
+ __le16 dseg_count; /* Data segment count */
+ uint32_t reserved_2;
+- uint32_t data_address[2];
+- uint32_t data_length;
+- uint32_t dif_address[2];
+- uint32_t dif_length; /* Data segment 0
+- * length */
++ struct dsd64 data_dsd;
++ struct dsd64 dif_dsd;
+ } bundling;
+ } u;
+
+@@ -2088,10 +2058,8 @@ typedef struct {
+ uint32_t handle2;
+ uint32_t rsp_bytecount;
+ uint32_t req_bytecount;
+- uint32_t dseg_req_address[2]; /* Data segment 0 address. */
+- uint32_t dseg_req_length; /* Data segment 0 length. */
+- uint32_t dseg_rsp_address[2]; /* Data segment 1 address. */
+- uint32_t dseg_rsp_length; /* Data segment 1 length. */
++ struct dsd64 req_dsd;
++ struct dsd64 rsp_dsd;
+ } ms_iocb_entry_t;
+
+
+diff --git a/drivers/scsi/qla2xxx/qla_dsd.h b/drivers/scsi/qla2xxx/qla_dsd.h
+new file mode 100644
+index 000000000000..7479924ba422
+--- /dev/null
++++ b/drivers/scsi/qla2xxx/qla_dsd.h
+@@ -0,0 +1,30 @@
++#ifndef _QLA_DSD_H_
++#define _QLA_DSD_H_
++
++/* 32-bit data segment descriptor (8 bytes) */
++struct dsd32 {
++ __le32 address;
++ __le32 length;
++};
++
++static inline void append_dsd32(struct dsd32 **dsd, struct scatterlist *sg)
++{
++ put_unaligned_le32(sg_dma_address(sg), &(*dsd)->address);
++ put_unaligned_le32(sg_dma_len(sg), &(*dsd)->length);
++ (*dsd)++;
++}
++
++/* 64-bit data segment descriptor (12 bytes) */
++struct dsd64 {
++ __le64 address;
++ __le32 length;
++} __packed;
++
++static inline void append_dsd64(struct dsd64 **dsd, struct scatterlist *sg)
++{
++ put_unaligned_le64(sg_dma_address(sg), &(*dsd)->address);
++ put_unaligned_le32(sg_dma_len(sg), &(*dsd)->length);
++ (*dsd)++;
++}
++
++#endif
+diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h
+index d53cd7875a85..604eb4682ac0 100644
+--- a/drivers/scsi/qla2xxx/qla_fw.h
++++ b/drivers/scsi/qla2xxx/qla_fw.h
+@@ -10,6 +10,8 @@
+ #include <linux/nvme.h>
+ #include <linux/nvme-fc.h>
+
++#include "qla_dsd.h"
++
+ #define MBS_CHECKSUM_ERROR 0x4010
+ #define MBS_INVALID_PRODUCT_KEY 0x4020
+
+@@ -463,8 +465,7 @@ struct cmd_bidir {
+ uint8_t port_id[3]; /* PortID of destination port.*/
+ uint8_t vp_index;
+
+- uint32_t fcp_data_dseg_address[2]; /* Data segment address. */
+- uint16_t fcp_data_dseg_len; /* Data segment length. */
++ struct dsd64 fcp_dsd;
+ };
+
+ #define COMMAND_TYPE_6 0x48 /* Command Type 6 entry */
+@@ -501,8 +502,7 @@ struct cmd_type_6 {
+ uint8_t port_id[3]; /* PortID of destination port. */
+ uint8_t vp_index;
+
+- uint32_t fcp_data_dseg_address[2]; /* Data segment address. */
+- uint32_t fcp_data_dseg_len; /* Data segment length. */
++ struct dsd64 fcp_dsd;
+ };
+
+ #define COMMAND_TYPE_7 0x18 /* Command Type 7 entry */
+@@ -548,8 +548,7 @@ struct cmd_type_7 {
+ uint8_t port_id[3]; /* PortID of destination port. */
+ uint8_t vp_index;
+
+- uint32_t dseg_0_address[2]; /* Data segment 0 address. */
+- uint32_t dseg_0_len; /* Data segment 0 length. */
++ struct dsd64 dsd;
+ };
+
+ #define COMMAND_TYPE_CRC_2 0x6A /* Command Type CRC_2 (Type 6)
+@@ -717,10 +716,7 @@ struct ct_entry_24xx {
+ uint32_t rsp_byte_count;
+ uint32_t cmd_byte_count;
+
+- uint32_t dseg_0_address[2]; /* Data segment 0 address. */
+- uint32_t dseg_0_len; /* Data segment 0 length. */
+- uint32_t dseg_1_address[2]; /* Data segment 1 address. */
+- uint32_t dseg_1_len; /* Data segment 1 length. */
++ struct dsd64 dsd[2];
+ };
+
+ /*
+@@ -1606,8 +1602,7 @@ struct verify_chip_entry_84xx {
+ uint32_t fw_seq_size;
+ uint32_t relative_offset;
+
+- uint32_t dseg_address[2];
+- uint32_t dseg_length;
++ struct dsd64 dsd;
+ };
+
+ struct verify_chip_rsp_84xx {
+@@ -1664,8 +1659,7 @@ struct access_chip_84xx {
+ uint32_t total_byte_cnt;
+ uint32_t reserved4;
+
+- uint32_t dseg_address[2];
+- uint32_t dseg_length;
++ struct dsd64 dsd;
+ };
+
+ struct access_chip_rsp_84xx {
+diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h
+index 9c7fbd4da9b8..bbe69ab5cf3f 100644
+--- a/drivers/scsi/qla2xxx/qla_gbl.h
++++ b/drivers/scsi/qla2xxx/qla_gbl.h
+@@ -287,11 +287,11 @@ extern void *qla2x00_alloc_iocbs(struct scsi_qla_host *, srb_t *);
+ extern void *__qla2x00_alloc_iocbs(struct qla_qpair *, srb_t *);
+ extern int qla2x00_issue_marker(scsi_qla_host_t *, int);
+ extern int qla24xx_walk_and_build_sglist_no_difb(struct qla_hw_data *, srb_t *,
+- uint32_t *, uint16_t, struct qla_tc_param *);
++ struct dsd64 *, uint16_t, struct qla_tc_param *);
+ extern int qla24xx_walk_and_build_sglist(struct qla_hw_data *, srb_t *,
+- uint32_t *, uint16_t, struct qla_tc_param *);
++ struct dsd64 *, uint16_t, struct qla_tc_param *);
+ extern int qla24xx_walk_and_build_prot_sglist(struct qla_hw_data *, srb_t *,
+- uint32_t *, uint16_t, struct qla_tgt_cmd *);
++ struct dsd64 *, uint16_t, struct qla_tgt_cmd *);
+ extern int qla24xx_get_one_block_sg(uint32_t, struct qla2_sgx *, uint32_t *);
+ extern int qla24xx_configure_prot_mode(srb_t *, uint16_t *);
+
+diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c
+index 4235769ec4cc..e2653bbc117d 100644
+--- a/drivers/scsi/qla2xxx/qla_gs.c
++++ b/drivers/scsi/qla2xxx/qla_gs.c
+@@ -45,13 +45,11 @@ qla2x00_prep_ms_iocb(scsi_qla_host_t *vha, struct ct_arg *arg)
+ ms_pkt->rsp_bytecount = cpu_to_le32(arg->rsp_size);
+ ms_pkt->req_bytecount = cpu_to_le32(arg->req_size);
+
+- ms_pkt->dseg_req_address[0] = cpu_to_le32(LSD(arg->req_dma));
+- ms_pkt->dseg_req_address[1] = cpu_to_le32(MSD(arg->req_dma));
+- ms_pkt->dseg_req_length = ms_pkt->req_bytecount;
++ put_unaligned_le64(arg->req_dma, &ms_pkt->req_dsd.address);
++ ms_pkt->req_dsd.length = ms_pkt->req_bytecount;
+
+- ms_pkt->dseg_rsp_address[0] = cpu_to_le32(LSD(arg->rsp_dma));
+- ms_pkt->dseg_rsp_address[1] = cpu_to_le32(MSD(arg->rsp_dma));
+- ms_pkt->dseg_rsp_length = ms_pkt->rsp_bytecount;
++ put_unaligned_le64(arg->rsp_dma, &ms_pkt->rsp_dsd.address);
++ ms_pkt->rsp_dsd.length = ms_pkt->rsp_bytecount;
+
+ vha->qla_stats.control_requests++;
+
+@@ -83,13 +81,11 @@ qla24xx_prep_ms_iocb(scsi_qla_host_t *vha, struct ct_arg *arg)
+ ct_pkt->rsp_byte_count = cpu_to_le32(arg->rsp_size);
+ ct_pkt->cmd_byte_count = cpu_to_le32(arg->req_size);
+
+- ct_pkt->dseg_0_address[0] = cpu_to_le32(LSD(arg->req_dma));
+- ct_pkt->dseg_0_address[1] = cpu_to_le32(MSD(arg->req_dma));
+- ct_pkt->dseg_0_len = ct_pkt->cmd_byte_count;
++ put_unaligned_le64(arg->req_dma, &ct_pkt->dsd[0].address);
++ ct_pkt->dsd[0].length = ct_pkt->cmd_byte_count;
+
+- ct_pkt->dseg_1_address[0] = cpu_to_le32(LSD(arg->rsp_dma));
+- ct_pkt->dseg_1_address[1] = cpu_to_le32(MSD(arg->rsp_dma));
+- ct_pkt->dseg_1_len = ct_pkt->rsp_byte_count;
++ put_unaligned_le64(arg->rsp_dma, &ct_pkt->dsd[1].address);
++ ct_pkt->dsd[1].length = ct_pkt->rsp_byte_count;
+ ct_pkt->vp_index = vha->vp_idx;
+
+ vha->qla_stats.control_requests++;
+@@ -1438,13 +1434,11 @@ qla2x00_prep_ms_fdmi_iocb(scsi_qla_host_t *vha, uint32_t req_size,
+ ms_pkt->rsp_bytecount = cpu_to_le32(rsp_size);
+ ms_pkt->req_bytecount = cpu_to_le32(req_size);
+
+- ms_pkt->dseg_req_address[0] = cpu_to_le32(LSD(ha->ct_sns_dma));
+- ms_pkt->dseg_req_address[1] = cpu_to_le32(MSD(ha->ct_sns_dma));
+- ms_pkt->dseg_req_length = ms_pkt->req_bytecount;
++ put_unaligned_le64(ha->ct_sns_dma, &ms_pkt->req_dsd.address);
++ ms_pkt->req_dsd.length = ms_pkt->req_bytecount;
+
+- ms_pkt->dseg_rsp_address[0] = cpu_to_le32(LSD(ha->ct_sns_dma));
+- ms_pkt->dseg_rsp_address[1] = cpu_to_le32(MSD(ha->ct_sns_dma));
+- ms_pkt->dseg_rsp_length = ms_pkt->rsp_bytecount;
++ put_unaligned_le64(ha->ct_sns_dma, &ms_pkt->rsp_dsd.address);
++ ms_pkt->rsp_dsd.length = ms_pkt->rsp_bytecount;
+
+ return ms_pkt;
+ }
+@@ -1476,13 +1470,11 @@ qla24xx_prep_ms_fdmi_iocb(scsi_qla_host_t *vha, uint32_t req_size,
+ ct_pkt->rsp_byte_count = cpu_to_le32(rsp_size);
+ ct_pkt->cmd_byte_count = cpu_to_le32(req_size);
+
+- ct_pkt->dseg_0_address[0] = cpu_to_le32(LSD(ha->ct_sns_dma));
+- ct_pkt->dseg_0_address[1] = cpu_to_le32(MSD(ha->ct_sns_dma));
+- ct_pkt->dseg_0_len = ct_pkt->cmd_byte_count;
++ put_unaligned_le64(ha->ct_sns_dma, &ct_pkt->dsd[0].address);
++ ct_pkt->dsd[0].length = ct_pkt->cmd_byte_count;
+
+- ct_pkt->dseg_1_address[0] = cpu_to_le32(LSD(ha->ct_sns_dma));
+- ct_pkt->dseg_1_address[1] = cpu_to_le32(MSD(ha->ct_sns_dma));
+- ct_pkt->dseg_1_len = ct_pkt->rsp_byte_count;
++ put_unaligned_le64(ha->ct_sns_dma, &ct_pkt->dsd[1].address);
++ ct_pkt->dsd[1].length = ct_pkt->rsp_byte_count;
+ ct_pkt->vp_index = vha->vp_idx;
+
+ return ct_pkt;
+@@ -1497,10 +1489,10 @@ qla2x00_update_ms_fdmi_iocb(scsi_qla_host_t *vha, uint32_t req_size)
+
+ if (IS_FWI2_CAPABLE(ha)) {
+ ct_pkt->cmd_byte_count = cpu_to_le32(req_size);
+- ct_pkt->dseg_0_len = ct_pkt->cmd_byte_count;
++ ct_pkt->dsd[0].length = ct_pkt->cmd_byte_count;
+ } else {
+ ms_pkt->req_bytecount = cpu_to_le32(req_size);
+- ms_pkt->dseg_req_length = ms_pkt->req_bytecount;
++ ms_pkt->req_dsd.length = ms_pkt->req_bytecount;
+ }
+
+ return ms_pkt;
+diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c
+index 19eb18be2316..ef895e1142c9 100644
+--- a/drivers/scsi/qla2xxx/qla_iocb.c
++++ b/drivers/scsi/qla2xxx/qla_iocb.c
+@@ -192,7 +192,7 @@ void qla2x00_build_scsi_iocbs_32(srb_t *sp, cmd_entry_t *cmd_pkt,
+ uint16_t tot_dsds)
+ {
+ uint16_t avail_dsds;
+- uint32_t *cur_dsd;
++ struct dsd32 *cur_dsd;
+ scsi_qla_host_t *vha;
+ struct scsi_cmnd *cmd;
+ struct scatterlist *sg;
+@@ -213,8 +213,8 @@ void qla2x00_build_scsi_iocbs_32(srb_t *sp, cmd_entry_t *cmd_pkt,
+ cmd_pkt->control_flags |= cpu_to_le16(qla2x00_get_cmd_direction(sp));
+
+ /* Three DSDs are available in the Command Type 2 IOCB */
+- avail_dsds = 3;
+- cur_dsd = (uint32_t *)&cmd_pkt->dseg_0_address;
++ avail_dsds = ARRAY_SIZE(cmd_pkt->dsd32);
++ cur_dsd = cmd_pkt->dsd32;
+
+ /* Load data segments */
+ scsi_for_each_sg(cmd, sg, tot_dsds, i) {
+@@ -227,12 +227,11 @@ void qla2x00_build_scsi_iocbs_32(srb_t *sp, cmd_entry_t *cmd_pkt,
+ * Type 0 IOCB.
+ */
+ cont_pkt = qla2x00_prep_cont_type0_iocb(vha);
+- cur_dsd = (uint32_t *)&cont_pkt->dseg_0_address;
+- avail_dsds = 7;
++ cur_dsd = cont_pkt->dsd;
++ avail_dsds = ARRAY_SIZE(cont_pkt->dsd);
+ }
+
+- *cur_dsd++ = cpu_to_le32(sg_dma_address(sg));
+- *cur_dsd++ = cpu_to_le32(sg_dma_len(sg));
++ append_dsd32(&cur_dsd, sg);
+ avail_dsds--;
+ }
+ }
+@@ -249,7 +248,7 @@ void qla2x00_build_scsi_iocbs_64(srb_t *sp, cmd_entry_t *cmd_pkt,
+ uint16_t tot_dsds)
+ {
+ uint16_t avail_dsds;
+- uint32_t *cur_dsd;
++ struct dsd64 *cur_dsd;
+ scsi_qla_host_t *vha;
+ struct scsi_cmnd *cmd;
+ struct scatterlist *sg;
+@@ -270,12 +269,11 @@ void qla2x00_build_scsi_iocbs_64(srb_t *sp, cmd_entry_t *cmd_pkt,
+ cmd_pkt->control_flags |= cpu_to_le16(qla2x00_get_cmd_direction(sp));
+
+ /* Two DSDs are available in the Command Type 3 IOCB */
+- avail_dsds = 2;
+- cur_dsd = (uint32_t *)&cmd_pkt->dseg_0_address;
++ avail_dsds = ARRAY_SIZE(cmd_pkt->dsd64);
++ cur_dsd = cmd_pkt->dsd64;
+
+ /* Load data segments */
+ scsi_for_each_sg(cmd, sg, tot_dsds, i) {
+- dma_addr_t sle_dma;
+ cont_a64_entry_t *cont_pkt;
+
+ /* Allocate additional continuation packets? */
+@@ -285,14 +283,11 @@ void qla2x00_build_scsi_iocbs_64(srb_t *sp, cmd_entry_t *cmd_pkt,
+ * Type 1 IOCB.
+ */
+ cont_pkt = qla2x00_prep_cont_type1_iocb(vha, vha->req);
+- cur_dsd = (uint32_t *)cont_pkt->dseg_0_address;
+- avail_dsds = 5;
++ cur_dsd = cont_pkt->dsd;
++ avail_dsds = ARRAY_SIZE(cont_pkt->dsd);
+ }
+
+- sle_dma = sg_dma_address(sg);
+- *cur_dsd++ = cpu_to_le32(LSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(MSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(sg_dma_len(sg));
++ append_dsd64(&cur_dsd, sg);
+ avail_dsds--;
+ }
+ }
+@@ -578,13 +573,11 @@ static inline int
+ qla24xx_build_scsi_type_6_iocbs(srb_t *sp, struct cmd_type_6 *cmd_pkt,
+ uint16_t tot_dsds)
+ {
+- uint32_t *cur_dsd = NULL;
++ struct dsd64 *cur_dsd = NULL, *next_dsd;
+ scsi_qla_host_t *vha;
+ struct qla_hw_data *ha;
+ struct scsi_cmnd *cmd;
+ struct scatterlist *cur_seg;
+- uint32_t *dsd_seg;
+- void *next_dsd;
+ uint8_t avail_dsds;
+ uint8_t first_iocb = 1;
+ uint32_t dsd_list_len;
+@@ -636,32 +629,27 @@ qla24xx_build_scsi_type_6_iocbs(srb_t *sp, struct cmd_type_6 *cmd_pkt,
+
+ if (first_iocb) {
+ first_iocb = 0;
+- dsd_seg = (uint32_t *)&cmd_pkt->fcp_data_dseg_address;
+- *dsd_seg++ = cpu_to_le32(LSD(dsd_ptr->dsd_list_dma));
+- *dsd_seg++ = cpu_to_le32(MSD(dsd_ptr->dsd_list_dma));
+- cmd_pkt->fcp_data_dseg_len = cpu_to_le32(dsd_list_len);
++ put_unaligned_le64(dsd_ptr->dsd_list_dma,
++ &cmd_pkt->fcp_dsd.address);
++ cmd_pkt->fcp_dsd.length = cpu_to_le32(dsd_list_len);
+ } else {
+- *cur_dsd++ = cpu_to_le32(LSD(dsd_ptr->dsd_list_dma));
+- *cur_dsd++ = cpu_to_le32(MSD(dsd_ptr->dsd_list_dma));
+- *cur_dsd++ = cpu_to_le32(dsd_list_len);
++ put_unaligned_le64(dsd_ptr->dsd_list_dma,
++ &cur_dsd->address);
++ cur_dsd->length = cpu_to_le32(dsd_list_len);
++ cur_dsd++;
+ }
+- cur_dsd = (uint32_t *)next_dsd;
++ cur_dsd = next_dsd;
+ while (avail_dsds) {
+- dma_addr_t sle_dma;
+-
+- sle_dma = sg_dma_address(cur_seg);
+- *cur_dsd++ = cpu_to_le32(LSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(MSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(sg_dma_len(cur_seg));
++ append_dsd64(&cur_dsd, cur_seg);
+ cur_seg = sg_next(cur_seg);
+ avail_dsds--;
+ }
+ }
+
+ /* Null termination */
+- *cur_dsd++ = 0;
+- *cur_dsd++ = 0;
+- *cur_dsd++ = 0;
++ cur_dsd->address = 0;
++ cur_dsd->length = 0;
++ cur_dsd++;
+ cmd_pkt->control_flags |= CF_DATA_SEG_DESCR_ENABLE;
+ return 0;
+ }
+@@ -700,7 +688,7 @@ qla24xx_build_scsi_iocbs(srb_t *sp, struct cmd_type_7 *cmd_pkt,
+ uint16_t tot_dsds, struct req_que *req)
+ {
+ uint16_t avail_dsds;
+- uint32_t *cur_dsd;
++ struct dsd64 *cur_dsd;
+ scsi_qla_host_t *vha;
+ struct scsi_cmnd *cmd;
+ struct scatterlist *sg;
+@@ -732,12 +720,11 @@ qla24xx_build_scsi_iocbs(srb_t *sp, struct cmd_type_7 *cmd_pkt,
+
+ /* One DSD is available in the Command Type 3 IOCB */
+ avail_dsds = 1;
+- cur_dsd = (uint32_t *)&cmd_pkt->dseg_0_address;
++ cur_dsd = &cmd_pkt->dsd;
+
+ /* Load data segments */
+
+ scsi_for_each_sg(cmd, sg, tot_dsds, i) {
+- dma_addr_t sle_dma;
+ cont_a64_entry_t *cont_pkt;
+
+ /* Allocate additional continuation packets? */
+@@ -747,14 +734,11 @@ qla24xx_build_scsi_iocbs(srb_t *sp, struct cmd_type_7 *cmd_pkt,
+ * Type 1 IOCB.
+ */
+ cont_pkt = qla2x00_prep_cont_type1_iocb(vha, req);
+- cur_dsd = (uint32_t *)cont_pkt->dseg_0_address;
+- avail_dsds = 5;
++ cur_dsd = cont_pkt->dsd;
++ avail_dsds = ARRAY_SIZE(cont_pkt->dsd);
+ }
+
+- sle_dma = sg_dma_address(sg);
+- *cur_dsd++ = cpu_to_le32(LSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(MSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(sg_dma_len(sg));
++ append_dsd64(&cur_dsd, sg);
+ avail_dsds--;
+ }
+ }
+@@ -890,14 +874,14 @@ qla24xx_get_one_block_sg(uint32_t blk_sz, struct qla2_sgx *sgx,
+
+ int
+ qla24xx_walk_and_build_sglist_no_difb(struct qla_hw_data *ha, srb_t *sp,
+- uint32_t *dsd, uint16_t tot_dsds, struct qla_tc_param *tc)
++ struct dsd64 *dsd, uint16_t tot_dsds, struct qla_tc_param *tc)
+ {
+ void *next_dsd;
+ uint8_t avail_dsds = 0;
+ uint32_t dsd_list_len;
+ struct dsd_dma *dsd_ptr;
+ struct scatterlist *sg_prot;
+- uint32_t *cur_dsd = dsd;
++ struct dsd64 *cur_dsd = dsd;
+ uint16_t used_dsds = tot_dsds;
+ uint32_t prot_int; /* protection interval */
+ uint32_t partial;
+@@ -971,14 +955,14 @@ qla24xx_walk_and_build_sglist_no_difb(struct qla_hw_data *ha, srb_t *sp,
+
+
+ /* add new list to cmd iocb or last list */
+- *cur_dsd++ = cpu_to_le32(LSD(dsd_ptr->dsd_list_dma));
+- *cur_dsd++ = cpu_to_le32(MSD(dsd_ptr->dsd_list_dma));
+- *cur_dsd++ = cpu_to_le32(dsd_list_len);
+- cur_dsd = (uint32_t *)next_dsd;
++ put_unaligned_le64(dsd_ptr->dsd_list_dma,
++ &cur_dsd->address);
++ cur_dsd->length = cpu_to_le32(dsd_list_len);
++ cur_dsd = next_dsd;
+ }
+- *cur_dsd++ = cpu_to_le32(LSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(MSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(sle_dma_len);
++ put_unaligned_le64(sle_dma, &cur_dsd->address);
++ cur_dsd->length = cpu_to_le32(sle_dma_len);
++ cur_dsd++;
+ avail_dsds--;
+
+ if (partial == 0) {
+@@ -997,22 +981,22 @@ qla24xx_walk_and_build_sglist_no_difb(struct qla_hw_data *ha, srb_t *sp,
+ }
+ }
+ /* Null termination */
+- *cur_dsd++ = 0;
+- *cur_dsd++ = 0;
+- *cur_dsd++ = 0;
++ cur_dsd->address = 0;
++ cur_dsd->length = 0;
++ cur_dsd++;
+ return 0;
+ }
+
+ int
+-qla24xx_walk_and_build_sglist(struct qla_hw_data *ha, srb_t *sp, uint32_t *dsd,
+- uint16_t tot_dsds, struct qla_tc_param *tc)
++qla24xx_walk_and_build_sglist(struct qla_hw_data *ha, srb_t *sp,
++ struct dsd64 *dsd, uint16_t tot_dsds, struct qla_tc_param *tc)
+ {
+ void *next_dsd;
+ uint8_t avail_dsds = 0;
+ uint32_t dsd_list_len;
+ struct dsd_dma *dsd_ptr;
+ struct scatterlist *sg, *sgl;
+- uint32_t *cur_dsd = dsd;
++ struct dsd64 *cur_dsd = dsd;
+ int i;
+ uint16_t used_dsds = tot_dsds;
+ struct scsi_cmnd *cmd;
+@@ -1029,8 +1013,6 @@ qla24xx_walk_and_build_sglist(struct qla_hw_data *ha, srb_t *sp, uint32_t *dsd,
+
+
+ for_each_sg(sgl, sg, tot_dsds, i) {
+- dma_addr_t sle_dma;
+-
+ /* Allocate additional continuation packets? */
+ if (avail_dsds == 0) {
+ avail_dsds = (used_dsds > QLA_DSDS_PER_IOCB) ?
+@@ -1070,29 +1052,25 @@ qla24xx_walk_and_build_sglist(struct qla_hw_data *ha, srb_t *sp, uint32_t *dsd,
+ }
+
+ /* add new list to cmd iocb or last list */
+- *cur_dsd++ = cpu_to_le32(LSD(dsd_ptr->dsd_list_dma));
+- *cur_dsd++ = cpu_to_le32(MSD(dsd_ptr->dsd_list_dma));
+- *cur_dsd++ = cpu_to_le32(dsd_list_len);
+- cur_dsd = (uint32_t *)next_dsd;
++ put_unaligned_le64(dsd_ptr->dsd_list_dma,
++ &cur_dsd->address);
++ cur_dsd->length = cpu_to_le32(dsd_list_len);
++ cur_dsd = next_dsd;
+ }
+- sle_dma = sg_dma_address(sg);
+-
+- *cur_dsd++ = cpu_to_le32(LSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(MSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(sg_dma_len(sg));
++ append_dsd64(&cur_dsd, sg);
+ avail_dsds--;
+
+ }
+ /* Null termination */
+- *cur_dsd++ = 0;
+- *cur_dsd++ = 0;
+- *cur_dsd++ = 0;
++ cur_dsd->address = 0;
++ cur_dsd->length = 0;
++ cur_dsd++;
+ return 0;
+ }
+
+ int
+ qla24xx_walk_and_build_prot_sglist(struct qla_hw_data *ha, srb_t *sp,
+- uint32_t *cur_dsd, uint16_t tot_dsds, struct qla_tgt_cmd *tc)
++ struct dsd64 *cur_dsd, uint16_t tot_dsds, struct qla_tgt_cmd *tc)
+ {
+ struct dsd_dma *dsd_ptr = NULL, *dif_dsd, *nxt_dsd;
+ struct scatterlist *sg, *sgl;
+@@ -1313,16 +1291,15 @@ qla24xx_walk_and_build_prot_sglist(struct qla_hw_data *ha, srb_t *sp,
+ }
+
+ /* add new list to cmd iocb or last list */
+- *cur_dsd++ =
+- cpu_to_le32(LSD(dsd_ptr->dsd_list_dma));
+- *cur_dsd++ =
+- cpu_to_le32(MSD(dsd_ptr->dsd_list_dma));
+- *cur_dsd++ = cpu_to_le32(dsd_list_len);
++ put_unaligned_le64(dsd_ptr->dsd_list_dma,
++ &cur_dsd->address);
++ cur_dsd->length = cpu_to_le32(dsd_list_len);
+ cur_dsd = dsd_ptr->dsd_addr;
+ }
+- *cur_dsd++ = cpu_to_le32(LSD(dif_dsd->dsd_list_dma));
+- *cur_dsd++ = cpu_to_le32(MSD(dif_dsd->dsd_list_dma));
+- *cur_dsd++ = cpu_to_le32(sglen);
++ put_unaligned_le64(dif_dsd->dsd_list_dma,
++ &cur_dsd->address);
++ cur_dsd->length = cpu_to_le32(sglen);
++ cur_dsd++;
+ avail_dsds--;
+ difctx->dif_bundl_len -= sglen;
+ track_difbundl_buf--;
+@@ -1333,8 +1310,6 @@ qla24xx_walk_and_build_prot_sglist(struct qla_hw_data *ha, srb_t *sp,
+ difctx->no_ldif_dsd, difctx->no_dif_bundl);
+ } else {
+ for_each_sg(sgl, sg, tot_dsds, i) {
+- dma_addr_t sle_dma;
+-
+ /* Allocate additional continuation packets? */
+ if (avail_dsds == 0) {
+ avail_dsds = (used_dsds > QLA_DSDS_PER_IOCB) ?
+@@ -1374,24 +1349,19 @@ qla24xx_walk_and_build_prot_sglist(struct qla_hw_data *ha, srb_t *sp,
+ }
+
+ /* add new list to cmd iocb or last list */
+- *cur_dsd++ =
+- cpu_to_le32(LSD(dsd_ptr->dsd_list_dma));
+- *cur_dsd++ =
+- cpu_to_le32(MSD(dsd_ptr->dsd_list_dma));
+- *cur_dsd++ = cpu_to_le32(dsd_list_len);
++ put_unaligned_le64(dsd_ptr->dsd_list_dma,
++ &cur_dsd->address);
++ cur_dsd->length = cpu_to_le32(dsd_list_len);
+ cur_dsd = dsd_ptr->dsd_addr;
+ }
+- sle_dma = sg_dma_address(sg);
+- *cur_dsd++ = cpu_to_le32(LSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(MSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(sg_dma_len(sg));
++ append_dsd64(&cur_dsd, sg);
+ avail_dsds--;
+ }
+ }
+ /* Null termination */
+- *cur_dsd++ = 0;
+- *cur_dsd++ = 0;
+- *cur_dsd++ = 0;
++ cur_dsd->address = 0;
++ cur_dsd->length = 0;
++ cur_dsd++;
+ return 0;
+ }
+ /**
+@@ -1408,7 +1378,8 @@ static inline int
+ qla24xx_build_scsi_crc_2_iocbs(srb_t *sp, struct cmd_type_crc_2 *cmd_pkt,
+ uint16_t tot_dsds, uint16_t tot_prot_dsds, uint16_t fw_prot_opts)
+ {
+- uint32_t *cur_dsd, *fcp_dl;
++ struct dsd64 *cur_dsd;
++ uint32_t *fcp_dl;
+ scsi_qla_host_t *vha;
+ struct scsi_cmnd *cmd;
+ uint32_t total_bytes = 0;
+@@ -1547,7 +1518,7 @@ qla24xx_build_scsi_crc_2_iocbs(srb_t *sp, struct cmd_type_crc_2 *cmd_pkt,
+ }
+
+ if (!bundling) {
+- cur_dsd = (uint32_t *) &crc_ctx_pkt->u.nobundling.data_address;
++ cur_dsd = &crc_ctx_pkt->u.nobundling.data_dsd;
+ } else {
+ /*
+ * Configure Bundling if we need to fetch interlaving
+@@ -1557,7 +1528,7 @@ qla24xx_build_scsi_crc_2_iocbs(srb_t *sp, struct cmd_type_crc_2 *cmd_pkt,
+ crc_ctx_pkt->u.bundling.dif_byte_count = cpu_to_le32(dif_bytes);
+ crc_ctx_pkt->u.bundling.dseg_count = cpu_to_le16(tot_dsds -
+ tot_prot_dsds);
+- cur_dsd = (uint32_t *) &crc_ctx_pkt->u.bundling.data_address;
++ cur_dsd = &crc_ctx_pkt->u.bundling.data_dsd;
+ }
+
+ /* Finish the common fields of CRC pkt */
+@@ -1590,7 +1561,7 @@ qla24xx_build_scsi_crc_2_iocbs(srb_t *sp, struct cmd_type_crc_2 *cmd_pkt,
+ if (bundling && tot_prot_dsds) {
+ /* Walks dif segments */
+ cmd_pkt->control_flags |= cpu_to_le16(CF_DIF_SEG_DESCR_ENABLE);
+- cur_dsd = (uint32_t *) &crc_ctx_pkt->u.bundling.dif_address;
++ cur_dsd = &crc_ctx_pkt->u.bundling.dif_dsd;
+ if (qla24xx_walk_and_build_prot_sglist(ha, sp, cur_dsd,
+ tot_prot_dsds, NULL))
+ goto crc_queuing_error;
+@@ -3007,7 +2978,7 @@ static void
+ qla2x00_ct_iocb(srb_t *sp, ms_iocb_entry_t *ct_iocb)
+ {
+ uint16_t avail_dsds;
+- uint32_t *cur_dsd;
++ struct dsd64 *cur_dsd;
+ struct scatterlist *sg;
+ int index;
+ uint16_t tot_dsds;
+@@ -3033,25 +3004,20 @@ qla2x00_ct_iocb(srb_t *sp, ms_iocb_entry_t *ct_iocb)
+ ct_iocb->rsp_bytecount =
+ cpu_to_le32(bsg_job->reply_payload.payload_len);
+
+- ct_iocb->dseg_req_address[0] = cpu_to_le32(LSD(sg_dma_address
+- (bsg_job->request_payload.sg_list)));
+- ct_iocb->dseg_req_address[1] = cpu_to_le32(MSD(sg_dma_address
+- (bsg_job->request_payload.sg_list)));
+- ct_iocb->dseg_req_length = ct_iocb->req_bytecount;
++ ct_iocb->req_dsd.address =
++ cpu_to_le64(sg_dma_address(bsg_job->request_payload.sg_list));
++ ct_iocb->req_dsd.length = ct_iocb->req_bytecount;
+
+- ct_iocb->dseg_rsp_address[0] = cpu_to_le32(LSD(sg_dma_address
+- (bsg_job->reply_payload.sg_list)));
+- ct_iocb->dseg_rsp_address[1] = cpu_to_le32(MSD(sg_dma_address
+- (bsg_job->reply_payload.sg_list)));
+- ct_iocb->dseg_rsp_length = ct_iocb->rsp_bytecount;
++ ct_iocb->rsp_dsd.address =
++ cpu_to_le64(sg_dma_address(bsg_job->reply_payload.sg_list));
++ ct_iocb->rsp_dsd.length = ct_iocb->rsp_bytecount;
+
+ avail_dsds = 1;
+- cur_dsd = (uint32_t *)ct_iocb->dseg_rsp_address;
++ cur_dsd = &ct_iocb->rsp_dsd;
+ index = 0;
+ tot_dsds = bsg_job->reply_payload.sg_cnt;
+
+ for_each_sg(bsg_job->reply_payload.sg_list, sg, tot_dsds, index) {
+- dma_addr_t sle_dma;
+ cont_a64_entry_t *cont_pkt;
+
+ /* Allocate additional continuation packets? */
+@@ -3062,15 +3028,12 @@ qla2x00_ct_iocb(srb_t *sp, ms_iocb_entry_t *ct_iocb)
+ */
+ cont_pkt = qla2x00_prep_cont_type1_iocb(vha,
+ vha->hw->req_q_map[0]);
+- cur_dsd = (uint32_t *) cont_pkt->dseg_0_address;
++ cur_dsd = cont_pkt->dsd;
+ avail_dsds = 5;
+ entry_count++;
+ }
+
+- sle_dma = sg_dma_address(sg);
+- *cur_dsd++ = cpu_to_le32(LSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(MSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(sg_dma_len(sg));
++ append_dsd64(&cur_dsd, sg);
+ avail_dsds--;
+ }
+ ct_iocb->entry_count = entry_count;
+@@ -3082,7 +3045,7 @@ static void
+ qla24xx_ct_iocb(srb_t *sp, struct ct_entry_24xx *ct_iocb)
+ {
+ uint16_t avail_dsds;
+- uint32_t *cur_dsd;
++ struct dsd64 *cur_dsd;
+ struct scatterlist *sg;
+ int index;
+ uint16_t cmd_dsds, rsp_dsds;
+@@ -3111,12 +3074,10 @@ qla24xx_ct_iocb(srb_t *sp, struct ct_entry_24xx *ct_iocb)
+ cpu_to_le32(bsg_job->request_payload.payload_len);
+
+ avail_dsds = 2;
+- cur_dsd = (uint32_t *)ct_iocb->dseg_0_address;
++ cur_dsd = ct_iocb->dsd;
+ index = 0;
+
+ for_each_sg(bsg_job->request_payload.sg_list, sg, cmd_dsds, index) {
+- dma_addr_t sle_dma;
+-
+ /* Allocate additional continuation packets? */
+ if (avail_dsds == 0) {
+ /*
+@@ -3125,23 +3086,18 @@ qla24xx_ct_iocb(srb_t *sp, struct ct_entry_24xx *ct_iocb)
+ */
+ cont_pkt = qla2x00_prep_cont_type1_iocb(
+ vha, ha->req_q_map[0]);
+- cur_dsd = (uint32_t *) cont_pkt->dseg_0_address;
++ cur_dsd = cont_pkt->dsd;
+ avail_dsds = 5;
+ entry_count++;
+ }
+
+- sle_dma = sg_dma_address(sg);
+- *cur_dsd++ = cpu_to_le32(LSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(MSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(sg_dma_len(sg));
++ append_dsd64(&cur_dsd, sg);
+ avail_dsds--;
+ }
+
+ index = 0;
+
+ for_each_sg(bsg_job->reply_payload.sg_list, sg, rsp_dsds, index) {
+- dma_addr_t sle_dma;
+-
+ /* Allocate additional continuation packets? */
+ if (avail_dsds == 0) {
+ /*
+@@ -3150,15 +3106,12 @@ qla24xx_ct_iocb(srb_t *sp, struct ct_entry_24xx *ct_iocb)
+ */
+ cont_pkt = qla2x00_prep_cont_type1_iocb(vha,
+ ha->req_q_map[0]);
+- cur_dsd = (uint32_t *) cont_pkt->dseg_0_address;
++ cur_dsd = cont_pkt->dsd;
+ avail_dsds = 5;
+ entry_count++;
+ }
+
+- sle_dma = sg_dma_address(sg);
+- *cur_dsd++ = cpu_to_le32(LSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(MSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(sg_dma_len(sg));
++ append_dsd64(&cur_dsd, sg);
+ avail_dsds--;
+ }
+ ct_iocb->entry_count = entry_count;
+@@ -3599,15 +3552,13 @@ qla_nvme_ls(srb_t *sp, struct pt_ls4_request *cmd_pkt)
+
+ cmd_pkt->tx_dseg_count = 1;
+ cmd_pkt->tx_byte_count = nvme->u.nvme.cmd_len;
+- cmd_pkt->dseg0_len = nvme->u.nvme.cmd_len;
+- cmd_pkt->dseg0_address[0] = cpu_to_le32(LSD(nvme->u.nvme.cmd_dma));
+- cmd_pkt->dseg0_address[1] = cpu_to_le32(MSD(nvme->u.nvme.cmd_dma));
++ cmd_pkt->dsd[0].length = nvme->u.nvme.cmd_len;
++ put_unaligned_le64(nvme->u.nvme.cmd_dma, &cmd_pkt->dsd[0].address);
+
+ cmd_pkt->rx_dseg_count = 1;
+ cmd_pkt->rx_byte_count = nvme->u.nvme.rsp_len;
+- cmd_pkt->dseg1_len = nvme->u.nvme.rsp_len;
+- cmd_pkt->dseg1_address[0] = cpu_to_le32(LSD(nvme->u.nvme.rsp_dma));
+- cmd_pkt->dseg1_address[1] = cpu_to_le32(MSD(nvme->u.nvme.rsp_dma));
++ cmd_pkt->dsd[1].length = nvme->u.nvme.rsp_len;
++ put_unaligned_le64(nvme->u.nvme.rsp_dma, &cmd_pkt->dsd[1].address);
+
+ return rval;
+ }
+@@ -3746,7 +3697,7 @@ qla25xx_build_bidir_iocb(srb_t *sp, struct scsi_qla_host *vha,
+ struct cmd_bidir *cmd_pkt, uint32_t tot_dsds)
+ {
+ uint16_t avail_dsds;
+- uint32_t *cur_dsd;
++ struct dsd64 *cur_dsd;
+ uint32_t req_data_len = 0;
+ uint32_t rsp_data_len = 0;
+ struct scatterlist *sg;
+@@ -3781,13 +3732,12 @@ qla25xx_build_bidir_iocb(srb_t *sp, struct scsi_qla_host *vha,
+ * are bundled in continuation iocb
+ */
+ avail_dsds = 1;
+- cur_dsd = (uint32_t *)&cmd_pkt->fcp_data_dseg_address;
++ cur_dsd = &cmd_pkt->fcp_dsd;
+
+ index = 0;
+
+ for_each_sg(bsg_job->request_payload.sg_list, sg,
+ bsg_job->request_payload.sg_cnt, index) {
+- dma_addr_t sle_dma;
+ cont_a64_entry_t *cont_pkt;
+
+ /* Allocate additional continuation packets */
+@@ -3796,14 +3746,11 @@ qla25xx_build_bidir_iocb(srb_t *sp, struct scsi_qla_host *vha,
+ * 5 DSDS
+ */
+ cont_pkt = qla2x00_prep_cont_type1_iocb(vha, vha->req);
+- cur_dsd = (uint32_t *) cont_pkt->dseg_0_address;
++ cur_dsd = cont_pkt->dsd;
+ avail_dsds = 5;
+ entry_count++;
+ }
+- sle_dma = sg_dma_address(sg);
+- *cur_dsd++ = cpu_to_le32(LSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(MSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(sg_dma_len(sg));
++ append_dsd64(&cur_dsd, sg);
+ avail_dsds--;
+ }
+ /* For read request DSD will always goes to continuation IOCB
+@@ -3813,7 +3760,6 @@ qla25xx_build_bidir_iocb(srb_t *sp, struct scsi_qla_host *vha,
+ */
+ for_each_sg(bsg_job->reply_payload.sg_list, sg,
+ bsg_job->reply_payload.sg_cnt, index) {
+- dma_addr_t sle_dma;
+ cont_a64_entry_t *cont_pkt;
+
+ /* Allocate additional continuation packets */
+@@ -3822,14 +3768,11 @@ qla25xx_build_bidir_iocb(srb_t *sp, struct scsi_qla_host *vha,
+ * 5 DSDS
+ */
+ cont_pkt = qla2x00_prep_cont_type1_iocb(vha, vha->req);
+- cur_dsd = (uint32_t *) cont_pkt->dseg_0_address;
++ cur_dsd = cont_pkt->dsd;
+ avail_dsds = 5;
+ entry_count++;
+ }
+- sle_dma = sg_dma_address(sg);
+- *cur_dsd++ = cpu_to_le32(LSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(MSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(sg_dma_len(sg));
++ append_dsd64(&cur_dsd, sg);
+ avail_dsds--;
+ }
+ /* This value should be same as number of IOCB required for this cmd */
+diff --git a/drivers/scsi/qla2xxx/qla_mr.c b/drivers/scsi/qla2xxx/qla_mr.c
+index 783f24db89f7..a08d83dbcece 100644
+--- a/drivers/scsi/qla2xxx/qla_mr.c
++++ b/drivers/scsi/qla2xxx/qla_mr.c
+@@ -2993,7 +2993,7 @@ qlafx00_build_scsi_iocbs(srb_t *sp, struct cmd_type_7_fx00 *cmd_pkt,
+ uint16_t tot_dsds, struct cmd_type_7_fx00 *lcmd_pkt)
+ {
+ uint16_t avail_dsds;
+- __le32 *cur_dsd;
++ struct dsd64 *cur_dsd;
+ scsi_qla_host_t *vha;
+ struct scsi_cmnd *cmd;
+ struct scatterlist *sg;
+@@ -3029,12 +3029,10 @@ qlafx00_build_scsi_iocbs(srb_t *sp, struct cmd_type_7_fx00 *cmd_pkt,
+
+ /* One DSD is available in the Command Type 3 IOCB */
+ avail_dsds = 1;
+- cur_dsd = (__le32 *)&lcmd_pkt->dseg_0_address;
++ cur_dsd = &lcmd_pkt->dsd;
+
+ /* Load data segments */
+ scsi_for_each_sg(cmd, sg, tot_dsds, i) {
+- dma_addr_t sle_dma;
+-
+ /* Allocate additional continuation packets? */
+ if (avail_dsds == 0) {
+ /*
+@@ -3044,15 +3042,12 @@ qlafx00_build_scsi_iocbs(srb_t *sp, struct cmd_type_7_fx00 *cmd_pkt,
+ memset(&lcont_pkt, 0, REQUEST_ENTRY_SIZE);
+ cont_pkt =
+ qlafx00_prep_cont_type1_iocb(req, &lcont_pkt);
+- cur_dsd = (__le32 *)lcont_pkt.dseg_0_address;
++ cur_dsd = lcont_pkt.dsd;
+ avail_dsds = 5;
+ cont = 1;
+ }
+
+- sle_dma = sg_dma_address(sg);
+- *cur_dsd++ = cpu_to_le32(LSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(MSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(sg_dma_len(sg));
++ append_dsd64(&cur_dsd, sg);
+ avail_dsds--;
+ if (avail_dsds == 0 && cont == 1) {
+ cont = 0;
+@@ -3283,11 +3278,9 @@ qlafx00_fxdisc_iocb(srb_t *sp, struct fxdisc_entry_fx00 *pfxiocb)
+ fx_iocb.req_dsdcnt = cpu_to_le16(1);
+ fx_iocb.req_xfrcnt =
+ cpu_to_le16(fxio->u.fxiocb.req_len);
+- fx_iocb.dseg_rq_address[0] =
+- cpu_to_le32(LSD(fxio->u.fxiocb.req_dma_handle));
+- fx_iocb.dseg_rq_address[1] =
+- cpu_to_le32(MSD(fxio->u.fxiocb.req_dma_handle));
+- fx_iocb.dseg_rq_len =
++ fx_iocb.dseg_rq.address =
++ cpu_to_le64(fxio->u.fxiocb.req_dma_handle);
++ fx_iocb.dseg_rq.length =
+ cpu_to_le32(fxio->u.fxiocb.req_len);
+ }
+
+@@ -3295,11 +3288,9 @@ qlafx00_fxdisc_iocb(srb_t *sp, struct fxdisc_entry_fx00 *pfxiocb)
+ fx_iocb.rsp_dsdcnt = cpu_to_le16(1);
+ fx_iocb.rsp_xfrcnt =
+ cpu_to_le16(fxio->u.fxiocb.rsp_len);
+- fx_iocb.dseg_rsp_address[0] =
+- cpu_to_le32(LSD(fxio->u.fxiocb.rsp_dma_handle));
+- fx_iocb.dseg_rsp_address[1] =
+- cpu_to_le32(MSD(fxio->u.fxiocb.rsp_dma_handle));
+- fx_iocb.dseg_rsp_len =
++ fx_iocb.dseg_rsp.address =
++ cpu_to_le64(fxio->u.fxiocb.rsp_dma_handle);
++ fx_iocb.dseg_rsp.length =
+ cpu_to_le32(fxio->u.fxiocb.rsp_len);
+ }
+
+@@ -3329,19 +3320,17 @@ qlafx00_fxdisc_iocb(srb_t *sp, struct fxdisc_entry_fx00 *pfxiocb)
+ int avail_dsds, tot_dsds;
+ cont_a64_entry_t lcont_pkt;
+ cont_a64_entry_t *cont_pkt = NULL;
+- __le32 *cur_dsd;
++ struct dsd64 *cur_dsd;
+ int index = 0, cont = 0;
+
+ fx_iocb.req_dsdcnt =
+ cpu_to_le16(bsg_job->request_payload.sg_cnt);
+ tot_dsds =
+ bsg_job->request_payload.sg_cnt;
+- cur_dsd = (__le32 *)&fx_iocb.dseg_rq_address[0];
++ cur_dsd = &fx_iocb.dseg_rq;
+ avail_dsds = 1;
+ for_each_sg(bsg_job->request_payload.sg_list, sg,
+ tot_dsds, index) {
+- dma_addr_t sle_dma;
+-
+ /* Allocate additional continuation packets? */
+ if (avail_dsds == 0) {
+ /*
+@@ -3353,17 +3342,13 @@ qlafx00_fxdisc_iocb(srb_t *sp, struct fxdisc_entry_fx00 *pfxiocb)
+ cont_pkt =
+ qlafx00_prep_cont_type1_iocb(
+ sp->vha->req, &lcont_pkt);
+- cur_dsd = (__le32 *)
+- lcont_pkt.dseg_0_address;
++ cur_dsd = lcont_pkt.dsd;
+ avail_dsds = 5;
+ cont = 1;
+ entry_cnt++;
+ }
+
+- sle_dma = sg_dma_address(sg);
+- *cur_dsd++ = cpu_to_le32(LSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(MSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(sg_dma_len(sg));
++ append_dsd64(&cur_dsd, sg);
+ avail_dsds--;
+
+ if (avail_dsds == 0 && cont == 1) {
+@@ -3391,19 +3376,17 @@ qlafx00_fxdisc_iocb(srb_t *sp, struct fxdisc_entry_fx00 *pfxiocb)
+ int avail_dsds, tot_dsds;
+ cont_a64_entry_t lcont_pkt;
+ cont_a64_entry_t *cont_pkt = NULL;
+- __le32 *cur_dsd;
++ struct dsd64 *cur_dsd;
+ int index = 0, cont = 0;
+
+ fx_iocb.rsp_dsdcnt =
+ cpu_to_le16(bsg_job->reply_payload.sg_cnt);
+ tot_dsds = bsg_job->reply_payload.sg_cnt;
+- cur_dsd = (__le32 *)&fx_iocb.dseg_rsp_address[0];
++ cur_dsd = &fx_iocb.dseg_rsp;
+ avail_dsds = 1;
+
+ for_each_sg(bsg_job->reply_payload.sg_list, sg,
+ tot_dsds, index) {
+- dma_addr_t sle_dma;
+-
+ /* Allocate additional continuation packets? */
+ if (avail_dsds == 0) {
+ /*
+@@ -3415,17 +3398,13 @@ qlafx00_fxdisc_iocb(srb_t *sp, struct fxdisc_entry_fx00 *pfxiocb)
+ cont_pkt =
+ qlafx00_prep_cont_type1_iocb(
+ sp->vha->req, &lcont_pkt);
+- cur_dsd = (__le32 *)
+- lcont_pkt.dseg_0_address;
++ cur_dsd = lcont_pkt.dsd;
+ avail_dsds = 5;
+ cont = 1;
+ entry_cnt++;
+ }
+
+- sle_dma = sg_dma_address(sg);
+- *cur_dsd++ = cpu_to_le32(LSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(MSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(sg_dma_len(sg));
++ append_dsd64(&cur_dsd, sg);
+ avail_dsds--;
+
+ if (avail_dsds == 0 && cont == 1) {
+diff --git a/drivers/scsi/qla2xxx/qla_mr.h b/drivers/scsi/qla2xxx/qla_mr.h
+index aeaa1b40b1fc..4567f0c42486 100644
+--- a/drivers/scsi/qla2xxx/qla_mr.h
++++ b/drivers/scsi/qla2xxx/qla_mr.h
+@@ -7,6 +7,8 @@
+ #ifndef __QLA_MR_H
+ #define __QLA_MR_H
+
++#include "qla_dsd.h"
++
+ /*
+ * The PCI VendorID and DeviceID for our board.
+ */
+@@ -46,8 +48,7 @@ struct cmd_type_7_fx00 {
+ uint8_t fcp_cdb[MAX_CMDSZ]; /* SCSI command words. */
+ __le32 byte_count; /* Total byte count. */
+
+- uint32_t dseg_0_address[2]; /* Data segment 0 address. */
+- uint32_t dseg_0_len; /* Data segment 0 length. */
++ struct dsd64 dsd;
+ };
+
+ #define STATUS_TYPE_FX00 0x01 /* Status entry. */
+@@ -176,10 +177,8 @@ struct fxdisc_entry_fx00 {
+ uint8_t flags;
+ uint8_t reserved_1;
+
+- __le32 dseg_rq_address[2]; /* Data segment 0 address. */
+- __le32 dseg_rq_len; /* Data segment 0 length. */
+- __le32 dseg_rsp_address[2]; /* Data segment 1 address. */
+- __le32 dseg_rsp_len; /* Data segment 1 length. */
++ struct dsd64 dseg_rq;
++ struct dsd64 dseg_rsp;
+
+ __le32 dataword;
+ __le32 adapid;
+diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c
+index 0829ab7f0d54..29b30df97c58 100644
+--- a/drivers/scsi/qla2xxx/qla_nvme.c
++++ b/drivers/scsi/qla2xxx/qla_nvme.c
+@@ -305,7 +305,7 @@ static inline int qla2x00_start_nvme_mq(srb_t *sp)
+ uint16_t req_cnt;
+ uint16_t tot_dsds;
+ uint16_t avail_dsds;
+- uint32_t *cur_dsd;
++ struct dsd64 *cur_dsd;
+ struct req_que *req = NULL;
+ struct scsi_qla_host *vha = sp->fcport->vha;
+ struct qla_hw_data *ha = vha->hw;
+@@ -423,12 +423,11 @@ static inline int qla2x00_start_nvme_mq(srb_t *sp)
+
+ /* One DSD is available in the Command Type NVME IOCB */
+ avail_dsds = 1;
+- cur_dsd = (uint32_t *)&cmd_pkt->nvme_data_dseg_address[0];
++ cur_dsd = &cmd_pkt->nvme_dsd;
+ sgl = fd->first_sgl;
+
+ /* Load data segments */
+ for_each_sg(sgl, sg, tot_dsds, i) {
+- dma_addr_t sle_dma;
+ cont_a64_entry_t *cont_pkt;
+
+ /* Allocate additional continuation packets? */
+@@ -450,14 +449,11 @@ static inline int qla2x00_start_nvme_mq(srb_t *sp)
+ put_unaligned_le32(CONTINUE_A64_TYPE,
+ &cont_pkt->entry_type);
+
+- cur_dsd = (uint32_t *)cont_pkt->dseg_0_address;
+- avail_dsds = 5;
++ cur_dsd = cont_pkt->dsd;
++ avail_dsds = ARRAY_SIZE(cont_pkt->dsd);
+ }
+
+- sle_dma = sg_dma_address(sg);
+- *cur_dsd++ = cpu_to_le32(LSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(MSD(sle_dma));
+- *cur_dsd++ = cpu_to_le32(sg_dma_len(sg));
++ append_dsd64(&cur_dsd, sg);
+ avail_dsds--;
+ }
+
+diff --git a/drivers/scsi/qla2xxx/qla_nvme.h b/drivers/scsi/qla2xxx/qla_nvme.h
+index 0db04f0a4d5d..b67aa271f6cc 100644
+--- a/drivers/scsi/qla2xxx/qla_nvme.h
++++ b/drivers/scsi/qla2xxx/qla_nvme.h
+@@ -13,6 +13,7 @@
+ #include <linux/nvme-fc-driver.h>
+
+ #include "qla_def.h"
++#include "qla_dsd.h"
+
+ /* default dev loss time (seconds) before transport tears down ctrl */
+ #define NVME_FC_DEV_LOSS_TMO 30
+@@ -72,8 +73,7 @@ struct cmd_nvme {
+ uint8_t port_id[3]; /* PortID of destination port. */
+ uint8_t vp_index;
+
+- uint32_t nvme_data_dseg_address[2]; /* Data segment address. */
+- uint32_t nvme_data_dseg_len; /* Data segment length. */
++ struct dsd64 nvme_dsd;
+ };
+
+ #define PT_LS4_REQUEST 0x89 /* Link Service pass-through IOCB (request) */
+@@ -101,10 +101,7 @@ struct pt_ls4_request {
+ uint32_t rsvd3;
+ uint32_t rx_byte_count;
+ uint32_t tx_byte_count;
+- uint32_t dseg0_address[2];
+- uint32_t dseg0_len;
+- uint32_t dseg1_address[2];
+- uint32_t dseg1_len;
++ struct dsd64 dsd[2];
+ };
+
+ #define PT_LS4_UNSOL 0x56 /* pass-up unsolicited rec FC-NVMe request */
+diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
+index 420c6cd0a7ea..4ee54b13a612 100644
+--- a/drivers/scsi/qla2xxx/qla_target.c
++++ b/drivers/scsi/qla2xxx/qla_target.c
+@@ -2640,7 +2640,7 @@ static int qlt_24xx_build_ctio_pkt(struct qla_qpair *qpair,
+ static void qlt_load_cont_data_segments(struct qla_tgt_prm *prm)
+ {
+ int cnt;
+- uint32_t *dword_ptr;
++ struct dsd64 *cur_dsd;
+
+ /* Build continuation packets */
+ while (prm->seg_cnt > 0) {
+@@ -2661,19 +2661,13 @@ static void qlt_load_cont_data_segments(struct qla_tgt_prm *prm)
+ cont_pkt64->sys_define = 0;
+
+ cont_pkt64->entry_type = CONTINUE_A64_TYPE;
+- dword_ptr = (uint32_t *)&cont_pkt64->dseg_0_address;
++ cur_dsd = cont_pkt64->dsd;
+
+ /* Load continuation entry data segments */
+ for (cnt = 0;
+ cnt < QLA_TGT_DATASEGS_PER_CONT_24XX && prm->seg_cnt;
+ cnt++, prm->seg_cnt--) {
+- *dword_ptr++ =
+- cpu_to_le32(lower_32_bits
+- (sg_dma_address(prm->sg)));
+- *dword_ptr++ = cpu_to_le32(upper_32_bits
+- (sg_dma_address(prm->sg)));
+- *dword_ptr++ = cpu_to_le32(sg_dma_len(prm->sg));
+-
++ append_dsd64(&cur_dsd, prm->sg);
+ prm->sg = sg_next(prm->sg);
+ }
+ }
+@@ -2686,13 +2680,13 @@ static void qlt_load_cont_data_segments(struct qla_tgt_prm *prm)
+ static void qlt_load_data_segments(struct qla_tgt_prm *prm)
+ {
+ int cnt;
+- uint32_t *dword_ptr;
++ struct dsd64 *cur_dsd;
+ struct ctio7_to_24xx *pkt24 = (struct ctio7_to_24xx *)prm->pkt;
+
+ pkt24->u.status0.transfer_length = cpu_to_le32(prm->cmd->bufflen);
+
+ /* Setup packet address segment pointer */
+- dword_ptr = pkt24->u.status0.dseg_0_address;
++ cur_dsd = &pkt24->u.status0.dsd;
+
+ /* Set total data segment count */
+ if (prm->seg_cnt)
+@@ -2700,8 +2694,8 @@ static void qlt_load_data_segments(struct qla_tgt_prm *prm)
+
+ if (prm->seg_cnt == 0) {
+ /* No data transfer */
+- *dword_ptr++ = 0;
+- *dword_ptr = 0;
++ cur_dsd->address = 0;
++ cur_dsd->length = 0;
+ return;
+ }
+
+@@ -2711,14 +2705,7 @@ static void qlt_load_data_segments(struct qla_tgt_prm *prm)
+ for (cnt = 0;
+ (cnt < QLA_TGT_DATASEGS_PER_CMD_24XX) && prm->seg_cnt;
+ cnt++, prm->seg_cnt--) {
+- *dword_ptr++ =
+- cpu_to_le32(lower_32_bits(sg_dma_address(prm->sg)));
+-
+- *dword_ptr++ = cpu_to_le32(upper_32_bits(
+- sg_dma_address(prm->sg)));
+-
+- *dword_ptr++ = cpu_to_le32(sg_dma_len(prm->sg));
+-
++ append_dsd64(&cur_dsd, prm->sg);
+ prm->sg = sg_next(prm->sg);
+ }
+
+@@ -3042,7 +3029,7 @@ qla_tgt_set_dif_tags(struct qla_tgt_cmd *cmd, struct crc_context *ctx,
+ static inline int
+ qlt_build_ctio_crc2_pkt(struct qla_qpair *qpair, struct qla_tgt_prm *prm)
+ {
+- uint32_t *cur_dsd;
++ struct dsd64 *cur_dsd;
+ uint32_t transfer_length = 0;
+ uint32_t data_bytes;
+ uint32_t dif_bytes;
+@@ -3193,7 +3180,7 @@ qlt_build_ctio_crc2_pkt(struct qla_qpair *qpair, struct qla_tgt_prm *prm)
+ pkt->crc_context_len = CRC_CONTEXT_LEN_FW;
+
+ if (!bundling) {
+- cur_dsd = (uint32_t *) &crc_ctx_pkt->u.nobundling.data_address;
++ cur_dsd = &crc_ctx_pkt->u.nobundling.data_dsd;
+ } else {
+ /*
+ * Configure Bundling if we need to fetch interlaving
+@@ -3203,7 +3190,7 @@ qlt_build_ctio_crc2_pkt(struct qla_qpair *qpair, struct qla_tgt_prm *prm)
+ crc_ctx_pkt->u.bundling.dif_byte_count = cpu_to_le32(dif_bytes);
+ crc_ctx_pkt->u.bundling.dseg_count =
+ cpu_to_le16(prm->tot_dsds - prm->prot_seg_cnt);
+- cur_dsd = (uint32_t *) &crc_ctx_pkt->u.bundling.data_address;
++ cur_dsd = &crc_ctx_pkt->u.bundling.data_dsd;
+ }
+
+ /* Finish the common fields of CRC pkt */
+@@ -3236,7 +3223,7 @@ qlt_build_ctio_crc2_pkt(struct qla_qpair *qpair, struct qla_tgt_prm *prm)
+ /* Walks dif segments */
+ pkt->add_flags |= CTIO_CRC2_AF_DIF_DSD_ENA;
+
+- cur_dsd = (uint32_t *) &crc_ctx_pkt->u.bundling.dif_address;
++ cur_dsd = &crc_ctx_pkt->u.bundling.dif_dsd;
+ if (qla24xx_walk_and_build_prot_sglist(ha, NULL, cur_dsd,
+ prm->prot_seg_cnt, cmd))
+ goto crc_queuing_error;
+diff --git a/drivers/scsi/qla2xxx/qla_target.h b/drivers/scsi/qla2xxx/qla_target.h
+index 262fc33fb473..b09a9232b817 100644
+--- a/drivers/scsi/qla2xxx/qla_target.h
++++ b/drivers/scsi/qla2xxx/qla_target.h
+@@ -29,6 +29,7 @@
+ #define __QLA_TARGET_H
+
+ #include "qla_def.h"
++#include "qla_dsd.h"
+
+ /*
+ * Must be changed on any change in any initiator visible interfaces or
+@@ -224,12 +225,7 @@ struct ctio_to_2xxx {
+ uint16_t reserved_1[3];
+ uint16_t scsi_status;
+ uint32_t transfer_length;
+- uint32_t dseg_0_address; /* Data segment 0 address. */
+- uint32_t dseg_0_length; /* Data segment 0 length. */
+- uint32_t dseg_1_address; /* Data segment 1 address. */
+- uint32_t dseg_1_length; /* Data segment 1 length. */
+- uint32_t dseg_2_address; /* Data segment 2 address. */
+- uint32_t dseg_2_length; /* Data segment 2 length. */
++ struct dsd32 dsd[3];
+ } __packed;
+ #define ATIO_PATH_INVALID 0x07
+ #define ATIO_CANT_PROV_CAP 0x16
+@@ -429,10 +425,7 @@ struct ctio7_to_24xx {
+ uint32_t reserved2;
+ uint32_t transfer_length;
+ uint32_t reserved3;
+- /* Data segment 0 address. */
+- uint32_t dseg_0_address[2];
+- /* Data segment 0 length. */
+- uint32_t dseg_0_length;
++ struct dsd64 dsd;
+ } status0;
+ struct {
+ uint16_t sense_length;
+--
+2.16.4
+
diff --git a/patches.suse/scsi-qla2xxx-Reject-EH_-abort-device_reset-target_re.patch b/patches.suse/scsi-qla2xxx-Reject-EH_-abort-device_reset-target_re.patch
index 85a75e0584..61963a96e1 100644
--- a/patches.suse/scsi-qla2xxx-Reject-EH_-abort-device_reset-target_re.patch
+++ b/patches.suse/scsi-qla2xxx-Reject-EH_-abort-device_reset-target_re.patch
@@ -1,8 +1,7 @@
From: Quinn Tran <qutran@marvell.com>
Date: Fri, 26 Jul 2019 09:07:31 -0700
Subject: scsi: qla2xxx: Reject EH_{abort|device_reset|target_request}
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
+Patch-mainline: v5.4-rc1
Git-commit: 7f4374e67b3046c9628cf0ab93a117704a38e95d
References: bsc#1082635 bsc#1141340 bsc#1143706
diff --git a/patches.suse/scsi-qla2xxx-Remove-unnecessary-null-check.patch b/patches.suse/scsi-qla2xxx-Remove-unnecessary-null-check.patch
index a13275e733..75c3be6b50 100644
--- a/patches.suse/scsi-qla2xxx-Remove-unnecessary-null-check.patch
+++ b/patches.suse/scsi-qla2xxx-Remove-unnecessary-null-check.patch
@@ -1,8 +1,7 @@
From: YueHaibing <yuehaibing@huawei.com>
Date: Thu, 11 Jul 2019 22:13:17 +0800
Subject: scsi: qla2xxx: Remove unnecessary null check
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
+Patch-mainline: v5.4-rc1
Git-commit: 0b3b6fe299c471e44ed8713b7a602882626e693f
References: bsc#1082635 bsc#1141340 bsc#1143706
@@ -20,7 +19,7 @@ Acked-by: Daniel Wagner <dwagner@suse.de>
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -4747,8 +4747,7 @@ qla2x00_mem_free(struct qla_hw_data *ha)
- }
+ }
}
- if (ha->dif_bundl_pool)
diff --git a/patches.suse/scsi-qla2xxx-Replace-vmalloc-memset-with-vzalloc.patch b/patches.suse/scsi-qla2xxx-Replace-vmalloc-memset-with-vzalloc.patch
index 82b336b3e5..0dc0a63e47 100644
--- a/patches.suse/scsi-qla2xxx-Replace-vmalloc-memset-with-vzalloc.patch
+++ b/patches.suse/scsi-qla2xxx-Replace-vmalloc-memset-with-vzalloc.patch
@@ -1,8 +1,7 @@
From: Chuhong Yuan <hslester96@gmail.com>
Date: Thu, 18 Jul 2019 15:45:18 +0800
Subject: scsi: qla2xxx: Replace vmalloc + memset with vzalloc
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
+Patch-mainline: v5.4-rc1
Git-commit: 56cc8fae5f7e9f38cb367754c52491ba1645d1bf
References: bsc#1082635 bsc#1141340 bsc#1143706
diff --git a/patches.suse/scsi-qla2xxx-Retry-fabric-Scan-on-IOCB-queue-full.patch b/patches.suse/scsi-qla2xxx-Retry-fabric-Scan-on-IOCB-queue-full.patch
index 5a4aac81c6..0ee2354a8d 100644
--- a/patches.suse/scsi-qla2xxx-Retry-fabric-Scan-on-IOCB-queue-full.patch
+++ b/patches.suse/scsi-qla2xxx-Retry-fabric-Scan-on-IOCB-queue-full.patch
@@ -1,8 +1,7 @@
From: Quinn Tran <qutran@marvell.com>
Date: Fri, 26 Jul 2019 09:07:34 -0700
Subject: scsi: qla2xxx: Retry fabric Scan on IOCB queue full
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
+Patch-mainline: v5.4-rc1
Git-commit: f0cecc1eec0c24e790a4daac71858f1f14e6f7b5
References: bsc#1082635 bsc#1141340 bsc#1143706
diff --git a/patches.suse/scsi-qla2xxx-Skip-FW-dump-on-LOOP-initialization-err.patch b/patches.suse/scsi-qla2xxx-Skip-FW-dump-on-LOOP-initialization-err.patch
index 04f30f52d4..8a3d4c6ff1 100644
--- a/patches.suse/scsi-qla2xxx-Skip-FW-dump-on-LOOP-initialization-err.patch
+++ b/patches.suse/scsi-qla2xxx-Skip-FW-dump-on-LOOP-initialization-err.patch
@@ -1,8 +1,7 @@
From: Quinn Tran <qutran@marvell.com>
Date: Fri, 26 Jul 2019 09:07:30 -0700
Subject: scsi: qla2xxx: Skip FW dump on LOOP initialization error
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
+Patch-mainline: v5.4-rc1
Git-commit: 5e5402c147083786db2238302e25c44b7a7dc5e9
References: bsc#1082635 bsc#1141340 bsc#1143706
diff --git a/patches.suse/scsi-qla2xxx-Update-driver-version-to-10.01.00.18-k.patch b/patches.suse/scsi-qla2xxx-Update-driver-version-to-10.01.00.18-k.patch
index 93a7c32965..0e10af8cf9 100644
--- a/patches.suse/scsi-qla2xxx-Update-driver-version-to-10.01.00.18-k.patch
+++ b/patches.suse/scsi-qla2xxx-Update-driver-version-to-10.01.00.18-k.patch
@@ -1,8 +1,7 @@
From: Himanshu Madhani <hmadhani@marvell.com>
Date: Fri, 26 Jul 2019 09:07:40 -0700
Subject: scsi: qla2xxx: Update driver version to 10.01.00.18-k
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
+Patch-mainline: v5.4-rc1
Git-commit: 4d0b32b853f52760bf70288f2751d2ca86581352
References: bsc#1082635 bsc#1141340 bsc#1143706
diff --git a/patches.suse/scsi-qla2xxx-Use-Correct-index-for-Q-Pair-array.patch b/patches.suse/scsi-qla2xxx-Use-Correct-index-for-Q-Pair-array.patch
index c82bca3612..83fa62be59 100644
--- a/patches.suse/scsi-qla2xxx-Use-Correct-index-for-Q-Pair-array.patch
+++ b/patches.suse/scsi-qla2xxx-Use-Correct-index-for-Q-Pair-array.patch
@@ -1,8 +1,7 @@
From: Quinn Tran <qutran@marvell.com>
Date: Fri, 26 Jul 2019 09:07:29 -0700
Subject: scsi: qla2xxx: Use Correct index for Q-Pair array
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
+Patch-mainline: v5.4-rc1
Git-commit: 178235f43ea142cf0f07dba67657494fcec21254
References: bsc#1082635 bsc#1141340 bsc#1143706
diff --git a/patches.suse/scsi-qla2xxx-Use-__le64-instead-of-uint32_t-2-for-se.patch b/patches.suse/scsi-qla2xxx-Use-__le64-instead-of-uint32_t-2-for-se.patch
new file mode 100644
index 0000000000..7d95b77e48
--- /dev/null
+++ b/patches.suse/scsi-qla2xxx-Use-__le64-instead-of-uint32_t-2-for-se.patch
@@ -0,0 +1,456 @@
+From: Bart Van Assche <bvanassche@acm.org>
+Date: Wed, 17 Apr 2019 14:44:39 -0700
+Subject: [PATCH] scsi: qla2xxx: Use __le64 instead of uint32_t[2] for sending
+ DMA addresses to firmware
+Patch-mainline: v5.2-rc1
+Git-commit: d4556a4932a54613fd766df6879e39d0342f49a0
+References: bsc#1082635 bsc#1141340 bsc#1143706
+
+This patch makes the code easier to read and more compact.
+
+Cc: Himanshu Madhani <hmadhani@marvell.com>
+Cc: Giridhar Malavali <gmalavali@marvell.com>
+Signed-off-by: Bart Van Assche <bvanassche@acm.org>
+Acked-by: Himanshu Madhani <hmadhani@marvell.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/qla2xxx/qla_def.h | 6 ++---
+ drivers/scsi/qla2xxx/qla_fw.h | 45 ++++++++++++++++---------------
+ drivers/scsi/qla2xxx/qla_gs.c | 3 +--
+ drivers/scsi/qla2xxx/qla_init.c | 15 ++++-------
+ drivers/scsi/qla2xxx/qla_iocb.c | 57 ++++++++++++++-------------------------
+ drivers/scsi/qla2xxx/qla_mr.c | 8 +++---
+ drivers/scsi/qla2xxx/qla_nvme.c | 6 ++---
+ drivers/scsi/qla2xxx/qla_nvme.h | 4 +--
+ drivers/scsi/qla2xxx/qla_nx.c | 6 ++---
+ drivers/scsi/qla2xxx/qla_target.c | 3 +--
+ drivers/scsi/qla2xxx/qla_target.h | 4 +--
+ 11 files changed, 65 insertions(+), 92 deletions(-)
+
+diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
+index 502a4812bf51..1a4095c56eee 100644
+--- a/drivers/scsi/qla2xxx/qla_def.h
++++ b/drivers/scsi/qla2xxx/qla_def.h
+@@ -1329,8 +1329,8 @@ typedef struct {
+ uint16_t response_q_inpointer;
+ uint16_t request_q_length;
+ uint16_t response_q_length;
+- uint32_t request_q_address[2];
+- uint32_t response_q_address[2];
++ __le64 request_q_address __packed;
++ __le64 response_q_address __packed;
+
+ uint16_t lun_enables;
+ uint8_t command_resource_count;
+@@ -3031,7 +3031,7 @@ struct sns_cmd_pkt {
+ struct {
+ uint16_t buffer_length;
+ uint16_t reserved_1;
+- uint32_t buffer_address[2];
++ __le64 buffer_address __packed;
+ uint16_t subcommand_length;
+ uint16_t reserved_2;
+ uint16_t subcommand;
+diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h
+index 604eb4682ac0..df079a8c2b33 100644
+--- a/drivers/scsi/qla2xxx/qla_fw.h
++++ b/drivers/scsi/qla2xxx/qla_fw.h
+@@ -341,9 +341,9 @@ struct init_cb_24xx {
+
+ uint16_t prio_request_q_length;
+
+- uint32_t request_q_address[2];
+- uint32_t response_q_address[2];
+- uint32_t prio_request_q_address[2];
++ __le64 request_q_address __packed;
++ __le64 response_q_address __packed;
++ __le64 prio_request_q_address __packed;
+
+ uint16_t msix;
+ uint16_t msix_atio;
+@@ -351,7 +351,7 @@ struct init_cb_24xx {
+
+ uint16_t atio_q_inpointer;
+ uint16_t atio_q_length;
+- uint32_t atio_q_address[2];
++ __le64 atio_q_address __packed;
+
+ uint16_t interrupt_delay_timer; /* 100us increments. */
+ uint16_t login_timeout;
+@@ -455,7 +455,7 @@ struct cmd_bidir {
+ #define BD_WRITE_DATA BIT_0
+
+ uint16_t fcp_cmnd_dseg_len; /* Data segment length. */
+- uint32_t fcp_cmnd_dseg_address[2]; /* Data segment address. */
++ __le64 fcp_cmnd_dseg_address __packed;/* Data segment address. */
+
+ uint16_t reserved[2]; /* Reserved */
+
+@@ -492,10 +492,11 @@ struct cmd_type_6 {
+ #define CF_READ_DATA BIT_1
+ #define CF_WRITE_DATA BIT_0
+
+- uint16_t fcp_cmnd_dseg_len; /* Data segment length. */
+- uint32_t fcp_cmnd_dseg_address[2]; /* Data segment address. */
+-
+- uint32_t fcp_rsp_dseg_address[2]; /* Data segment address. */
++ uint16_t fcp_cmnd_dseg_len; /* Data segment length. */
++ /* Data segment address. */
++ __le64 fcp_cmnd_dseg_address __packed;
++ /* Data segment address. */
++ __le64 fcp_rsp_dseg_address __packed;
+
+ uint32_t byte_count; /* Total byte count. */
+
+@@ -572,17 +573,17 @@ struct cmd_type_crc_2 {
+
+ uint16_t control_flags; /* Control flags. */
+
+- uint16_t fcp_cmnd_dseg_len; /* Data segment length. */
+- uint32_t fcp_cmnd_dseg_address[2]; /* Data segment address. */
+-
+- uint32_t fcp_rsp_dseg_address[2]; /* Data segment address. */
++ uint16_t fcp_cmnd_dseg_len; /* Data segment length. */
++ __le64 fcp_cmnd_dseg_address __packed;
++ /* Data segment address. */
++ __le64 fcp_rsp_dseg_address __packed;
+
+ uint32_t byte_count; /* Total byte count. */
+
+ uint8_t port_id[3]; /* PortID of destination port. */
+ uint8_t vp_index;
+
+- uint32_t crc_context_address[2]; /* Data segment address. */
++ __le64 crc_context_address __packed; /* Data segment address. */
+ uint16_t crc_context_len; /* Data segment length. */
+ uint16_t reserved_1; /* MUST be set to 0. */
+ };
+@@ -763,9 +764,9 @@ struct els_entry_24xx {
+ uint32_t rx_byte_count;
+ uint32_t tx_byte_count;
+
+- uint32_t tx_address[2]; /* Data segment 0 address. */
++ __le64 tx_address __packed; /* Data segment 0 address. */
+ uint32_t tx_len; /* Data segment 0 length. */
+- uint32_t rx_address[2]; /* Data segment 1 address. */
++ __le64 rx_address __packed; /* Data segment 1 address. */
+ uint32_t rx_len; /* Data segment 1 length. */
+ };
+
+@@ -1418,9 +1419,9 @@ struct vf_evfp_entry_24xx {
+ uint16_t control_flags;
+ uint32_t io_parameter_0;
+ uint32_t io_parameter_1;
+- uint32_t tx_address[2]; /* Data segment 0 address. */
++ __le64 tx_address __packed; /* Data segment 0 address. */
+ uint32_t tx_len; /* Data segment 0 length. */
+- uint32_t rx_address[2]; /* Data segment 1 address. */
++ __le64 rx_address __packed; /* Data segment 1 address. */
+ uint32_t rx_len; /* Data segment 1 length. */
+ };
+
+@@ -1927,15 +1928,15 @@ struct init_cb_81xx {
+
+ uint16_t prio_request_q_length;
+
+- uint32_t request_q_address[2];
+- uint32_t response_q_address[2];
+- uint32_t prio_request_q_address[2];
++ __le64 request_q_address __packed;
++ __le64 response_q_address __packed;
++ __le64 prio_request_q_address __packed;
+
+ uint8_t reserved_4[8];
+
+ uint16_t atio_q_inpointer;
+ uint16_t atio_q_length;
+- uint32_t atio_q_address[2];
++ __le64 atio_q_address __packed;
+
+ uint16_t interrupt_delay_timer; /* 100us increments. */
+ uint16_t login_timeout;
+diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c
+index e2653bbc117d..9f58e591666d 100644
+--- a/drivers/scsi/qla2xxx/qla_gs.c
++++ b/drivers/scsi/qla2xxx/qla_gs.c
+@@ -996,8 +996,7 @@ qla2x00_prep_sns_cmd(scsi_qla_host_t *vha, uint16_t cmd, uint16_t scmd_len,
+ memset(sns_cmd, 0, sizeof(struct sns_cmd_pkt));
+ wc = data_size / 2; /* Size in 16bit words. */
+ sns_cmd->p.cmd.buffer_length = cpu_to_le16(wc);
+- sns_cmd->p.cmd.buffer_address[0] = cpu_to_le32(LSD(ha->sns_cmd_dma));
+- sns_cmd->p.cmd.buffer_address[1] = cpu_to_le32(MSD(ha->sns_cmd_dma));
++ put_unaligned_le64(ha->sns_cmd_dma, &sns_cmd->p.cmd.buffer_address);
+ sns_cmd->p.cmd.subcommand_length = cpu_to_le16(scmd_len);
+ sns_cmd->p.cmd.subcommand = cpu_to_le16(cmd);
+ wc = (data_size - 16) / 4; /* Size in 32bit words. */
+diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
+index 8945278ff0be..54772d4c377f 100644
+--- a/drivers/scsi/qla2xxx/qla_init.c
++++ b/drivers/scsi/qla2xxx/qla_init.c
+@@ -3941,10 +3941,8 @@ qla2x00_config_rings(struct scsi_qla_host *vha)
+ ha->init_cb->response_q_inpointer = cpu_to_le16(0);
+ ha->init_cb->request_q_length = cpu_to_le16(req->length);
+ ha->init_cb->response_q_length = cpu_to_le16(rsp->length);
+- ha->init_cb->request_q_address[0] = cpu_to_le32(LSD(req->dma));
+- ha->init_cb->request_q_address[1] = cpu_to_le32(MSD(req->dma));
+- ha->init_cb->response_q_address[0] = cpu_to_le32(LSD(rsp->dma));
+- ha->init_cb->response_q_address[1] = cpu_to_le32(MSD(rsp->dma));
++ put_unaligned_le64(req->dma, &ha->init_cb->request_q_address);
++ put_unaligned_le64(rsp->dma, &ha->init_cb->response_q_address);
+
+ WRT_REG_WORD(ISP_REQ_Q_IN(ha, reg), 0);
+ WRT_REG_WORD(ISP_REQ_Q_OUT(ha, reg), 0);
+@@ -3971,16 +3969,13 @@ qla24xx_config_rings(struct scsi_qla_host *vha)
+ icb->response_q_inpointer = cpu_to_le16(0);
+ icb->request_q_length = cpu_to_le16(req->length);
+ icb->response_q_length = cpu_to_le16(rsp->length);
+- icb->request_q_address[0] = cpu_to_le32(LSD(req->dma));
+- icb->request_q_address[1] = cpu_to_le32(MSD(req->dma));
+- icb->response_q_address[0] = cpu_to_le32(LSD(rsp->dma));
+- icb->response_q_address[1] = cpu_to_le32(MSD(rsp->dma));
++ put_unaligned_le64(req->dma, &icb->request_q_address);
++ put_unaligned_le64(rsp->dma, &icb->response_q_address);
+
+ /* Setup ATIO queue dma pointers for target mode */
+ icb->atio_q_inpointer = cpu_to_le16(0);
+ icb->atio_q_length = cpu_to_le16(ha->tgt.atio_q_length);
+- icb->atio_q_address[0] = cpu_to_le32(LSD(ha->tgt.atio_dma));
+- icb->atio_q_address[1] = cpu_to_le32(MSD(ha->tgt.atio_dma));
++ put_unaligned_le64(ha->tgt.atio_dma, &icb->atio_q_address);
+
+ if (IS_SHADOW_REG_CAPABLE(ha))
+ icb->firmware_options_2 |= cpu_to_le32(BIT_30|BIT_29);
+diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c
+index ef895e1142c9..9312b19ed708 100644
+--- a/drivers/scsi/qla2xxx/qla_iocb.c
++++ b/drivers/scsi/qla2xxx/qla_iocb.c
+@@ -1445,8 +1445,7 @@ qla24xx_build_scsi_crc_2_iocbs(srb_t *sp, struct cmd_type_crc_2 *cmd_pkt,
+ qla24xx_set_t10dif_tags(sp, (struct fw_dif_context *)
+ &crc_ctx_pkt->ref_tag, tot_prot_dsds);
+
+- cmd_pkt->crc_context_address[0] = cpu_to_le32(LSD(crc_ctx_dma));
+- cmd_pkt->crc_context_address[1] = cpu_to_le32(MSD(crc_ctx_dma));
++ put_unaligned_le64(crc_ctx_dma, &cmd_pkt->crc_context_address);
+ cmd_pkt->crc_context_len = CRC_CONTEXT_LEN_FW;
+
+ /* Determine SCSI command length -- align to 4 byte boundary */
+@@ -1473,10 +1472,8 @@ qla24xx_build_scsi_crc_2_iocbs(srb_t *sp, struct cmd_type_crc_2 *cmd_pkt,
+ int_to_scsilun(cmd->device->lun, &fcp_cmnd->lun);
+ memcpy(fcp_cmnd->cdb, cmd->cmnd, cmd->cmd_len);
+ cmd_pkt->fcp_cmnd_dseg_len = cpu_to_le16(fcp_cmnd_len);
+- cmd_pkt->fcp_cmnd_dseg_address[0] = cpu_to_le32(
+- LSD(crc_ctx_dma + CRC_CONTEXT_FCPCMND_OFF));
+- cmd_pkt->fcp_cmnd_dseg_address[1] = cpu_to_le32(
+- MSD(crc_ctx_dma + CRC_CONTEXT_FCPCMND_OFF));
++ put_unaligned_le64(crc_ctx_dma + CRC_CONTEXT_FCPCMND_OFF,
++ &cmd_pkt->fcp_cmnd_dseg_address);
+ fcp_cmnd->task_management = 0;
+ fcp_cmnd->task_attribute = TSK_SIMPLE;
+
+@@ -2707,18 +2704,13 @@ qla24xx_els_logo_iocb(srb_t *sp, struct els_entry_24xx *els_iocb)
+ if (elsio->u.els_logo.els_cmd == ELS_DCMD_PLOGI) {
+ els_iocb->tx_byte_count = els_iocb->tx_len =
+ sizeof(struct els_plogi_payload);
+- els_iocb->tx_address[0] =
+- cpu_to_le32(LSD(elsio->u.els_plogi.els_plogi_pyld_dma));
+- els_iocb->tx_address[1] =
+- cpu_to_le32(MSD(elsio->u.els_plogi.els_plogi_pyld_dma));
+-
++ put_unaligned_le64(elsio->u.els_plogi.els_plogi_pyld_dma,
++ &els_iocb->tx_address);
+ els_iocb->rx_dsd_count = 1;
+ els_iocb->rx_byte_count = els_iocb->rx_len =
+ sizeof(struct els_plogi_payload);
+- els_iocb->rx_address[0] =
+- cpu_to_le32(LSD(elsio->u.els_plogi.els_resp_pyld_dma));
+- els_iocb->rx_address[1] =
+- cpu_to_le32(MSD(elsio->u.els_plogi.els_resp_pyld_dma));
++ put_unaligned_le64(elsio->u.els_plogi.els_resp_pyld_dma,
++ &els_iocb->rx_address);
+
+ ql_dbg(ql_dbg_io + ql_dbg_buffer, vha, 0x3073,
+ "PLOGI ELS IOCB:\n");
+@@ -2726,15 +2718,12 @@ qla24xx_els_logo_iocb(srb_t *sp, struct els_entry_24xx *els_iocb)
+ (uint8_t *)els_iocb, 0x70);
+ } else {
+ els_iocb->tx_byte_count = sizeof(struct els_logo_payload);
+- els_iocb->tx_address[0] =
+- cpu_to_le32(LSD(elsio->u.els_logo.els_logo_pyld_dma));
+- els_iocb->tx_address[1] =
+- cpu_to_le32(MSD(elsio->u.els_logo.els_logo_pyld_dma));
++ put_unaligned_le64(elsio->u.els_logo.els_logo_pyld_dma,
++ &els_iocb->tx_address);
+ els_iocb->tx_len = cpu_to_le32(sizeof(struct els_logo_payload));
+
+ els_iocb->rx_byte_count = 0;
+- els_iocb->rx_address[0] = 0;
+- els_iocb->rx_address[1] = 0;
++ els_iocb->rx_address = 0;
+ els_iocb->rx_len = 0;
+ }
+
+@@ -2957,17 +2946,13 @@ qla24xx_els_iocb(srb_t *sp, struct els_entry_24xx *els_iocb)
+ els_iocb->tx_byte_count =
+ cpu_to_le32(bsg_job->request_payload.payload_len);
+
+- els_iocb->tx_address[0] = cpu_to_le32(LSD(sg_dma_address
+- (bsg_job->request_payload.sg_list)));
+- els_iocb->tx_address[1] = cpu_to_le32(MSD(sg_dma_address
+- (bsg_job->request_payload.sg_list)));
++ put_unaligned_le64(sg_dma_address(bsg_job->request_payload.sg_list),
++ &els_iocb->tx_address);
+ els_iocb->tx_len = cpu_to_le32(sg_dma_len
+ (bsg_job->request_payload.sg_list));
+
+- els_iocb->rx_address[0] = cpu_to_le32(LSD(sg_dma_address
+- (bsg_job->reply_payload.sg_list)));
+- els_iocb->rx_address[1] = cpu_to_le32(MSD(sg_dma_address
+- (bsg_job->reply_payload.sg_list)));
++ put_unaligned_le64(sg_dma_address(bsg_job->reply_payload.sg_list),
++ &els_iocb->rx_address);
+ els_iocb->rx_len = cpu_to_le32(sg_dma_len
+ (bsg_job->reply_payload.sg_list));
+
+@@ -3004,12 +2989,12 @@ qla2x00_ct_iocb(srb_t *sp, ms_iocb_entry_t *ct_iocb)
+ ct_iocb->rsp_bytecount =
+ cpu_to_le32(bsg_job->reply_payload.payload_len);
+
+- ct_iocb->req_dsd.address =
+- cpu_to_le64(sg_dma_address(bsg_job->request_payload.sg_list));
++ put_unaligned_le64(sg_dma_address(bsg_job->request_payload.sg_list),
++ &ct_iocb->req_dsd.address);
+ ct_iocb->req_dsd.length = ct_iocb->req_bytecount;
+
+- ct_iocb->rsp_dsd.address =
+- cpu_to_le64(sg_dma_address(bsg_job->reply_payload.sg_list));
++ put_unaligned_le64(sg_dma_address(bsg_job->reply_payload.sg_list),
++ &ct_iocb->rsp_dsd.address);
+ ct_iocb->rsp_dsd.length = ct_iocb->rsp_bytecount;
+
+ avail_dsds = 1;
+@@ -3332,10 +3317,8 @@ qla82xx_start_scsi(srb_t *sp)
+ *fcp_dl = htonl((uint32_t)scsi_bufflen(cmd));
+
+ cmd_pkt->fcp_cmnd_dseg_len = cpu_to_le16(ctx->fcp_cmnd_len);
+- cmd_pkt->fcp_cmnd_dseg_address[0] =
+- cpu_to_le32(LSD(ctx->fcp_cmnd_dma));
+- cmd_pkt->fcp_cmnd_dseg_address[1] =
+- cpu_to_le32(MSD(ctx->fcp_cmnd_dma));
++ put_unaligned_le64(ctx->fcp_cmnd_dma,
++ &cmd_pkt->fcp_cmnd_dseg_address);
+
+ sp->flags |= SRB_FCP_CMND_DMA_VALID;
+ cmd_pkt->byte_count = cpu_to_le32((uint32_t)scsi_bufflen(cmd));
+diff --git a/drivers/scsi/qla2xxx/qla_mr.c b/drivers/scsi/qla2xxx/qla_mr.c
+index a08d83dbcece..942ee13b96a4 100644
+--- a/drivers/scsi/qla2xxx/qla_mr.c
++++ b/drivers/scsi/qla2xxx/qla_mr.c
+@@ -3278,8 +3278,8 @@ qlafx00_fxdisc_iocb(srb_t *sp, struct fxdisc_entry_fx00 *pfxiocb)
+ fx_iocb.req_dsdcnt = cpu_to_le16(1);
+ fx_iocb.req_xfrcnt =
+ cpu_to_le16(fxio->u.fxiocb.req_len);
+- fx_iocb.dseg_rq.address =
+- cpu_to_le64(fxio->u.fxiocb.req_dma_handle);
++ put_unaligned_le64(fxio->u.fxiocb.req_dma_handle,
++ &fx_iocb.dseg_rq.address);
+ fx_iocb.dseg_rq.length =
+ cpu_to_le32(fxio->u.fxiocb.req_len);
+ }
+@@ -3288,8 +3288,8 @@ qlafx00_fxdisc_iocb(srb_t *sp, struct fxdisc_entry_fx00 *pfxiocb)
+ fx_iocb.rsp_dsdcnt = cpu_to_le16(1);
+ fx_iocb.rsp_xfrcnt =
+ cpu_to_le16(fxio->u.fxiocb.rsp_len);
+- fx_iocb.dseg_rsp.address =
+- cpu_to_le64(fxio->u.fxiocb.rsp_dma_handle);
++ put_unaligned_le64(fxio->u.fxiocb.rsp_dma_handle,
++ &fx_iocb.dseg_rsp.address);
+ fx_iocb.dseg_rsp.length =
+ cpu_to_le32(fxio->u.fxiocb.rsp_len);
+ }
+diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c
+index 29b30df97c58..4c1112107e88 100644
+--- a/drivers/scsi/qla2xxx/qla_nvme.c
++++ b/drivers/scsi/qla2xxx/qla_nvme.c
+@@ -410,13 +410,11 @@ static inline int qla2x00_start_nvme_mq(srb_t *sp)
+
+ /* NVME RSP IU */
+ cmd_pkt->nvme_rsp_dsd_len = cpu_to_le16(fd->rsplen);
+- cmd_pkt->nvme_rsp_dseg_address[0] = cpu_to_le32(LSD(fd->rspdma));
+- cmd_pkt->nvme_rsp_dseg_address[1] = cpu_to_le32(MSD(fd->rspdma));
++ put_unaligned_le64(fd->rspdma, &cmd_pkt->nvme_rsp_dseg_address);
+
+ /* NVME CNMD IU */
+ cmd_pkt->nvme_cmnd_dseg_len = cpu_to_le16(fd->cmdlen);
+- cmd_pkt->nvme_cmnd_dseg_address[0] = cpu_to_le32(LSD(fd->cmddma));
+- cmd_pkt->nvme_cmnd_dseg_address[1] = cpu_to_le32(MSD(fd->cmddma));
++ cmd_pkt->nvme_cmnd_dseg_address = cpu_to_le64(fd->cmddma);
+
+ cmd_pkt->dseg_count = cpu_to_le16(tot_dsds);
+ cmd_pkt->byte_count = cpu_to_le32(fd->payload_length);
+diff --git a/drivers/scsi/qla2xxx/qla_nvme.h b/drivers/scsi/qla2xxx/qla_nvme.h
+index b67aa271f6cc..d3b8a6440113 100644
+--- a/drivers/scsi/qla2xxx/qla_nvme.h
++++ b/drivers/scsi/qla2xxx/qla_nvme.h
+@@ -65,8 +65,8 @@ struct cmd_nvme {
+ #define CF_WRITE_DATA BIT_0
+
+ uint16_t nvme_cmnd_dseg_len; /* Data segment length. */
+- uint32_t nvme_cmnd_dseg_address[2]; /* Data segment address. */
+- uint32_t nvme_rsp_dseg_address[2]; /* Data segment address. */
++ __le64 nvme_cmnd_dseg_address __packed;/* Data segment address. */
++ __le64 nvme_rsp_dseg_address __packed; /* Data segment address. */
+
+ uint32_t byte_count; /* Total byte count. */
+
+diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c
+index c12db16c3cf4..c760ae354174 100644
+--- a/drivers/scsi/qla2xxx/qla_nx.c
++++ b/drivers/scsi/qla2xxx/qla_nx.c
+@@ -1788,10 +1788,8 @@ void qla82xx_config_rings(struct scsi_qla_host *vha)
+ icb->response_q_inpointer = cpu_to_le16(0);
+ icb->request_q_length = cpu_to_le16(req->length);
+ icb->response_q_length = cpu_to_le16(rsp->length);
+- icb->request_q_address[0] = cpu_to_le32(LSD(req->dma));
+- icb->request_q_address[1] = cpu_to_le32(MSD(req->dma));
+- icb->response_q_address[0] = cpu_to_le32(LSD(rsp->dma));
+- icb->response_q_address[1] = cpu_to_le32(MSD(rsp->dma));
++ put_unaligned_le64(req->dma, &icb->request_q_address);
++ put_unaligned_le64(rsp->dma, &icb->response_q_address);
+
+ WRT_REG_DWORD(&reg->req_q_out[0], 0);
+ WRT_REG_DWORD(&reg->rsp_q_in[0], 0);
+diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
+index 4ee54b13a612..739a48301429 100644
+--- a/drivers/scsi/qla2xxx/qla_target.c
++++ b/drivers/scsi/qla2xxx/qla_target.c
+@@ -3175,8 +3175,7 @@ qlt_build_ctio_crc2_pkt(struct qla_qpair *qpair, struct qla_tgt_prm *prm)
+
+ qla_tgt_set_dif_tags(cmd, crc_ctx_pkt, &fw_prot_opts);
+
+- pkt->crc_context_address[0] = cpu_to_le32(LSD(crc_ctx_dma));
+- pkt->crc_context_address[1] = cpu_to_le32(MSD(crc_ctx_dma));
++ put_unaligned_le64(crc_ctx_dma, &pkt->crc_context_address);
+ pkt->crc_context_len = CRC_CONTEXT_LEN_FW;
+
+ if (!bundling) {
+diff --git a/drivers/scsi/qla2xxx/qla_target.h b/drivers/scsi/qla2xxx/qla_target.h
+index b09a9232b817..89ceffa7d4fd 100644
+--- a/drivers/scsi/qla2xxx/qla_target.h
++++ b/drivers/scsi/qla2xxx/qla_target.h
+@@ -519,10 +519,10 @@ struct ctio_crc2_to_fw {
+ uint32_t reserved5;
+ __le32 transfer_length; /* total fc transfer length */
+ uint32_t reserved6;
+- __le32 crc_context_address[2];/* Data segment address. */
++ __le64 crc_context_address __packed; /* Data segment address. */
+ uint16_t crc_context_len; /* Data segment length. */
+ uint16_t reserved_1; /* MUST be set to 0. */
+-} __packed;
++};
+
+ /* CTIO Type CRC_x Status IOCB */
+ struct ctio_crc_from_fw {
+--
+2.16.4
+
diff --git a/patches.suse/scsi-qla2xxx-Use-common-update-firmware-options-rout.patch b/patches.suse/scsi-qla2xxx-Use-common-update-firmware-options-rout.patch
index 1cfae178a8..81bce43d25 100644
--- a/patches.suse/scsi-qla2xxx-Use-common-update-firmware-options-rout.patch
+++ b/patches.suse/scsi-qla2xxx-Use-common-update-firmware-options-rout.patch
@@ -2,8 +2,7 @@ From: Andrew Vasquez <andrewv@marvell.com>
Date: Fri, 26 Jul 2019 09:07:37 -0700
Subject: scsi: qla2xxx: Use common update-firmware-options routine for
ISP27xx+
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
+Patch-mainline: v5.4-rc1
Git-commit: a36f1443e6fc738c1bcfc4be80d6f1609163c614
References: bsc#1082635 bsc#1141340 bsc#1143706
diff --git a/patches.suse/scsi-qla2xxx-do-not-crash-on-uninitialized-pool-list.patch b/patches.suse/scsi-qla2xxx-do-not-crash-on-uninitialized-pool-list.patch
deleted file mode 100644
index 22b44e3c46..0000000000
--- a/patches.suse/scsi-qla2xxx-do-not-crash-on-uninitialized-pool-list.patch
+++ /dev/null
@@ -1,149 +0,0 @@
-From ab00eb22174338ce5c58e24b44070f83c5c807e7 Mon Sep 17 00:00:00 2001
-From: Michal Suchanek <msuchanek@suse.de>
-Date: Wed, 3 Jul 2019 19:28:47 +0200
-Subject: [PATCH] scsi: qla2xxx: do not crash on uninitialized pool list.
-
-References: boo#1138874
-Patch-mainline: no, under development
-
-There is a crash reported in qla2x00_mem_free that points at
-pool.unusable.head being uninitialized.
-
-It is not clear if we are missing a fix that would prevent this issue or if this
-is expected and the log spam should be just removed from this patch.
-
-With this patch these mesages are printed:
-
-[ 5.818807] qla2xxx [0000:18:00.0]-00ba:3: -> fwdt1 no template
-[ 5.882435] scsi host3: qla2xxx
-[ 7.702749] qla2xxx [0000:18:00.0]-500a:3: LOOP UP detected (16 Gbps).
-[ 7.942351] qla2xxx [0000:18:00.0]-00fb:3: QLogic QLE2742 - QLogic 32Gb 2-port FC to PCIe Gen3 x8 Adapter.
-[ 7.942364] qla2xxx [0000:18:00.0]-00fc:3: ISP2261: PCIe (8.0GT/s x8) @ 0000:18:00.0 hdma+ host#=3 fw=8.03.07 (d0d5).
-[ 7.942832] qla2xxx [0000:18:00.1]-011c: : MSI-X vector count: 16.
-[ 7.942836] qla2xxx [0000:18:00.1]-001d: : Found an ISP2261 irq 115 iobase 0xffffc9000c77d000.
-[ 7.978557] qla2xxx [0000:18:00.1]-0075:12: ZIO mode 6 enabled; timer delay (200 us).
-[ 9.746809] qla2xxx [0000:18:00.1]-00ba:12: -> fwdt1 no template
-[ 9.806488] scsi host12: qla2xxx
-[ 11.618946] qla2xxx [0000:18:00.1]-500a:12: LOOP UP detected (16 Gbps).
-[ 11.846362] qla2xxx [0000:18:00.1]-00fb:12: QLogic QLE2742 - QLogic 32Gb 2-port FC to PCIe Gen3 x8 Adapter.
-[ 11.846374] qla2xxx [0000:18:00.1]-00fc:12: ISP2261: PCIe (8.0GT/s x8) @ 0000:18:00.1 hdma+ host#=12 fw=8.03.07 (d0d5).
-[ 11.846785] qla2xxx [0000:5e:00.0]-011c: : MSI-X vector count: 16.
-[ 11.846789] qla2xxx [0000:5e:00.0]-001d: : Found an ISP2261 irq 132 iobase 0xffffc9000c78d000.
-[ 11.879969] qla2xxx [0000:5e:00.0]-0075:13: ZIO mode 6 enabled; timer delay (200 us).
-[ 13.842810] qla2xxx [0000:5e:00.0]-00ba:13: -> fwdt1 no template
-[ 13.982488] scsi host13: qla2xxx
-[ 15.714982] qla2xxx [0000:5e:00.0]-500a:13: LOOP UP detected (16 Gbps).
-[ 16.002302] qla2xxx [0000:5e:00.0]-00fb:13: QLogic QLE2742 - QLogic 32Gb 2-port FC to PCIe Gen3 x8 Adapter.
-[ 16.002314] qla2xxx [0000:5e:00.0]-00fc:13: ISP2261: PCIe (8.0GT/s x8) @ 0000:5e:00.0 hdma+ host#=13 fw=8.05.61 (d0d5).
-[ 16.002675] qla2xxx [0000:5e:00.1]-011c: : MSI-X vector count: 16.
-[ 16.002679] qla2xxx [0000:5e:00.1]-001d: : Found an ISP2261 irq 149 iobase 0xffffc9000c7a5000.
-[ 16.035896] qla2xxx [0000:5e:00.1]-0075:14: ZIO mode 6 enabled; timer delay (200 us).
-[ 17.838808] qla2xxx [0000:5e:00.1]-00ba:14: -> fwdt1 no template
-[ 17.978487] scsi host14: qla2xxx
-[ 19.739357] qla2xxx [0000:5e:00.1]-500a:14: LOOP UP detected (16 Gbps).
-[ 20.038359] qla2xxx [0000:5e:00.1]-00fb:14: QLogic QLE2742 - QLogic 32Gb 2-port FC to PCIe Gen3 x8 Adapter.
-[ 20.038371] qla2xxx [0000:5e:00.1]-00fc:14: ISP2261: PCIe (8.0GT/s x8) @ 0000:5e:00.1 hdma+ host#=14 fw=8.05.61 (d0d5).
-[ 20.038873] qla2xxx [0000:d8:00.0]-011c: : MSI-X vector count: 16.
-[ 20.038879] qla2xxx [0000:d8:00.0]-001d: : Found an ISP2261 irq 166 iobase 0xffffc9000c7b5000.
-[ 20.072175] qla2xxx [0000:d8:00.0]-0075:15: ZIO mode 6 enabled; timer delay (200 us).
-[ 21.978814] qla2xxx [0000:d8:00.0]-00ba:15: -> fwdt1 no template
-[ 22.038445] scsi host15: qla2xxx
-[ 23.839169] qla2xxx [0000:d8:00.0]-500a:15: LOOP UP detected (16 Gbps).
-[ 24.098368] qla2xxx [0000:d8:00.0]-00fb:15: QLogic QLE2742 - QLogic 32Gb 2-port FC to PCIe Gen3 x8 Adapter.
-[ 24.098380] qla2xxx [0000:d8:00.0]-00fc:15: ISP2261: PCIe (8.0GT/s x8) @ 0000:d8:00.0 hdma+ host#=15 fw=8.03.07 (d0d5).
-[ 24.098668] qla2xxx [0000:d8:00.1]-011c: : MSI-X vector count: 16.
-[ 24.098672] qla2xxx [0000:d8:00.1]-001d: : Found an ISP2261 irq 183 iobase 0xffffc9000c7c5000.
-[ 24.132307] qla2xxx [0000:d8:00.1]-0075:16: ZIO mode 6 enabled; timer delay (200 us).
-[ 25.886807] qla2xxx [0000:d8:00.1]-00ba:16: -> fwdt1 no template
-[ 25.946505] scsi host16: qla2xxx
-[ 27.751267] qla2xxx [0000:d8:00.1]-500a:16: LOOP UP detected (16 Gbps).
-[ 28.006371] qla2xxx [0000:d8:00.1]-00fb:16: QLogic QLE2742 - QLogic 32Gb 2-port FC to PCIe Gen3 x8 Adapter.
-[ 28.006383] qla2xxx [0000:d8:00.1]-00fc:16: ISP2261: PCIe (8.0GT/s x8) @ 0000:d8:00.1 hdma+ host#=16 fw=8.03.07 (d0d5).
-...
-[ 198.322711] qla2xxx [0000:18:00.0]-b079:3: Removing driver
-[ 198.322718] qla2xxx [0000:18:00.0]-00af:3: Performing ISP error recovery - ha=ffff881fefd1b000.
-[ 198.324535] qla2xxx 0000:18:00.0: ha->pool.unusable.head not initialized
-[ 198.324539] qla2xxx 0000:18:00.0: ha->pool.good.head not initialized
-[ 198.419694] qla2xxx [0000:18:00.1]-b079:12: Removing driver
-[ 198.419701] qla2xxx [0000:18:00.1]-00af:12: Performing ISP error recovery - ha=ffff881fe3f28000.
-[ 198.421348] qla2xxx 0000:18:00.1: ha->pool.unusable.head not initialized
-[ 198.421352] qla2xxx 0000:18:00.1: ha->pool.good.head not initialized
-[ 198.520414] qla2xxx [0000:5e:00.0]-b079:13: Removing driver
-[ 198.520420] qla2xxx [0000:5e:00.0]-00af:13: Performing ISP error recovery - ha=ffff881fe3f15000.
-[ 198.522136] qla2xxx 0000:5e:00.0: ha->pool.unusable.head not initialized
-[ 198.522139] qla2xxx 0000:5e:00.0: ha->pool.good.head not initialized
-[ 198.622507] qla2xxx [0000:5e:00.1]-b079:14: Removing driver
-[ 198.622514] qla2xxx [0000:5e:00.1]-00af:14: Performing ISP error recovery - ha=ffff881fe3f09000.
-[ 198.623942] qla2xxx 0000:5e:00.1: ha->pool.unusable.head not initialized
-[ 198.623945] qla2xxx 0000:5e:00.1: ha->pool.good.head not initialized
-[ 198.713427] qla2xxx [0000:d8:00.0]-b079:15: Removing driver
-[ 198.713433] qla2xxx [0000:d8:00.0]-00af:15: Performing ISP error recovery - ha=ffff8820f0dd4000.
-[ 198.714699] qla2xxx 0000:d8:00.0: ha->pool.unusable.head not initialized
-[ 198.714702] qla2xxx 0000:d8:00.0: ha->pool.good.head not initialized
-[ 198.812400] qla2xxx [0000:d8:00.1]-b079:16: Removing driver
-[ 198.812406] qla2xxx [0000:d8:00.1]-00af:16: Performing ISP error recovery - ha=ffff8820f0dce000.
-[ 198.813711] qla2xxx 0000:d8:00.1: ha->pool.unusable.head not initialized
-[ 198.813714] qla2xxx 0000:d8:00.1: ha->pool.good.head not initialized
-
-Signed-off-by: Michal Suchanek <msuchanek@suse.de>
----
- drivers/scsi/qla2xxx/qla_os.c | 43 ++++++++++++++++++++---------------
- 1 file changed, 25 insertions(+), 18 deletions(-)
-
-diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
-index 19f88908f734..c2a11d434af2 100644
---- a/drivers/scsi/qla2xxx/qla_os.c
-+++ b/drivers/scsi/qla2xxx/qla_os.c
-@@ -4777,24 +4777,31 @@ qla2x00_mem_free(struct qla_hw_data *ha)
- if (ql2xenabledif) {
- struct dsd_dma *dsd, *nxt;
-
-- list_for_each_entry_safe(dsd, nxt, &ha->pool.unusable.head,
-- list) {
-- list_del(&dsd->list);
-- dma_pool_free(ha->dif_bundl_pool, dsd->dsd_addr,
-- dsd->dsd_list_dma);
-- ha->dif_bundle_dma_allocs--;
-- kfree(dsd);
-- ha->dif_bundle_kallocs--;
-- ha->pool.unusable.count--;
-- }
-- list_for_each_entry_safe(dsd, nxt, &ha->pool.good.head, list) {
-- list_del(&dsd->list);
-- dma_pool_free(ha->dif_bundl_pool, dsd->dsd_addr,
-- dsd->dsd_list_dma);
-- ha->dif_bundle_dma_allocs--;
-- kfree(dsd);
-- ha->dif_bundle_kallocs--;
-- }
-+ if (!ha->pool.unusable.head.next)
-+ pci_warn(ha->pdev, "ha->pool.unusable.head not initialized\n");
-+ else
-+ list_for_each_entry_safe(dsd, nxt, &ha->pool.unusable.head,
-+ list) {
-+ list_del(&dsd->list);
-+ dma_pool_free(ha->dif_bundl_pool, dsd->dsd_addr,
-+ dsd->dsd_list_dma);
-+ ha->dif_bundle_dma_allocs--;
-+ kfree(dsd);
-+ ha->dif_bundle_kallocs--;
-+ ha->pool.unusable.count--;
-+ }
-+ if (!ha->pool.good.head.next)
-+ pci_warn(ha->pdev, "ha->pool.good.head not initialized\n");
-+ else
-+ list_for_each_entry_safe(dsd, nxt, &ha->pool.good.head, list) {
-+ list_del(&dsd->list);
-+ dma_pool_free(ha->dif_bundl_pool, dsd->dsd_addr,
-+ dsd->dsd_list_dma);
-+ ha->dif_bundle_dma_allocs--;
-+ kfree(dsd);
-+ ha->dif_bundle_kallocs--;
-+ ha->pool.good.count--;
-+ }
- }
-
- if (ha->dif_bundl_pool)
---
-2.21.0
-
diff --git a/patches.suse/scsi-qla2xxx-qla2x00_alloc_fw_dump-set-ha-eft.patch b/patches.suse/scsi-qla2xxx-qla2x00_alloc_fw_dump-set-ha-eft.patch
index cdbd72cefc..7331047194 100644
--- a/patches.suse/scsi-qla2xxx-qla2x00_alloc_fw_dump-set-ha-eft.patch
+++ b/patches.suse/scsi-qla2xxx-qla2x00_alloc_fw_dump-set-ha-eft.patch
@@ -1,9 +1,8 @@
From: Martin Wilck <mwilck@suse.com>
Date: Wed, 14 Aug 2019 13:28:27 +0000
Subject: scsi: qla2xxx: qla2x00_alloc_fw_dump: set ha->eft
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
-Git-commit: 530106fa95c998ff16fb80a6ad10829396083931
+Patch-mainline: v5.4-rc1
+Git-commit: edbd56472a636ab396f5ee6783e8438fa725a6ee
References: bsc#1134476
In qla2x00_alloc_fw_dump(), an existing EFT buffer (e.g. from previous
@@ -22,12 +21,14 @@ Reviewed-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Daniel Wagner <dwagner@suse.de>
---
- drivers/scsi/qla2xxx/qla_init.c | 2 ++
+ drivers/scsi/qla2xxx/qla_init.c | 2 ++
1 file changed, 2 insertions(+)
+diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
+index 535dc21ef56e..6dd68be611ef 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
-@@ -3249,6 +3249,8 @@ try_eft:
+@@ -3197,6 +3197,8 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha)
ql_dbg(ql_dbg_init, vha, 0x00c3,
"Allocated (%d KB) EFT ...\n", EFT_SIZE / 1024);
eft_size = EFT_SIZE;
@@ -36,3 +37,6 @@ Acked-by: Daniel Wagner <dwagner@suse.de>
}
if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) {
+--
+2.16.4
+
diff --git a/patches.suse/x86-kconfig-remove-x86_direct_gbpages-dependency-on-debug_pagealloc.patch b/patches.suse/x86-kconfig-remove-x86_direct_gbpages-dependency-on-debug_pagealloc.patch
index da591eae1b..da03b7dfb0 100644
--- a/patches.suse/x86-kconfig-remove-x86_direct_gbpages-dependency-on-debug_pagealloc.patch
+++ b/patches.suse/x86-kconfig-remove-x86_direct_gbpages-dependency-on-debug_pagealloc.patch
@@ -2,8 +2,7 @@ From: Vlastimil Babka <vbabka@suse.cz>
Date: Wed, 7 Aug 2019 15:02:58 +0200
Subject: x86/kconfig: Remove X86_DIRECT_GBPAGES dependency on !DEBUG_PAGEALLOC
Git-commit: 2e1da13fba4cb529c2c8c1d9f657690d1e853d7d
-Patch-mainline: Queued in subsystem maintainer repository
-Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
+Patch-mainline: v5.4-rc1
References: PM-1168, bsc#1144653, VM Debug Functionality
These days CONFIG_DEBUG_PAGEALLOC just compiles in the code that has to be
diff --git a/series.conf b/series.conf
index 6e21ea86b8..b28bb57c9a 100644
--- a/series.conf
+++ b/series.conf
@@ -48142,6 +48142,8 @@
patches.suse/scsi-qla2xxx-Fix-race-conditions-in-the-code-for-abo.patch
patches.suse/scsi-qla2xxx-Pass-little-endian-values-to-the-firmwa.patch
patches.suse/scsi-qla2xxx-Check-the-size-of-firmware-data-structu.patch
+ patches.suse/scsi-qla2xxx-Introduce-the-dsd32-and-dsd64-data-stru.patch
+ patches.suse/scsi-qla2xxx-Use-__le64-instead-of-uint32_t-2-for-se.patch
patches.suse/scsi-qla2xxx-Complain-loudly-about-reference-count-u.patch
patches.suse/scsi-qla2xxx-Fix-hardirq-unsafe-locking.patch
patches.suse/scsi-qla2xxx-Avoid-that-qlt_send_resp_ctio-corrupts-.patch
@@ -49251,10 +49253,7 @@
patches.suse/scsi-lpfc-use-sg-helper-to-iterate-over-scatterlist.patch
patches.suse/scsi-pmcraid-use-sg-helper-to-iterate-over-scatterli.patch
patches.suse/scsi-lib-sg_pool.c-improve-APIs-for-allocating-sg-po.patch
- patches.suse/scsi-core-avoid-preallocating-big-SGL-for-protection.patch
- patches.suse/scsi-core-avoid-preallocating-big-SGL-for-data.patch
patches.suse/scsi-lib-sg_pool.c-clear-first_chunk-in-case-of-no-p.patch
- patches.suse/scsi-core-don-t-preallocate-small-SGL-in-case-of-NO_.patch
patches.suse/livepatch-use-static-buffer-for-debugging-messages-under-rq-lock.patch
patches.suse/revert-livepatch-remove-reliable-stacktrace-check-in-klp_try_switch_task.patch
patches.suse/livepatch-remove-duplicate-warning-about-missing-reliable-stacktrace-support.patch
@@ -49771,14 +49770,39 @@
patches.suse/usb-host-xhci-rcar-Fix-typo-in-compatible-string-mat.patch
patches.suse/USB-cdc-wdm-fix-race-between-write-and-disconnect-du.patch
patches.suse/VMCI-Release-resource-if-the-work-is-already-queued.patch
+ patches.suse/powerpc-tm-Fix-FP-VMX-unavailable-exceptions-inside-.patch
+ patches.suse/powerpc-tm-Fix-restoring-FP-VMX-facility-incorrectly.patch
patches.suse/iommu-amd-flush-old-domains-in-kdump-kernel
patches.suse/iommu-amd-fix-race-in-increase_address_space
patches.suse/vhost-make-sure-log_num-in_num.patch
patches.suse/iommu-iova-avoid-false-sharing-on-fq_timer_on
patches.suse/iommu-dma-fix-for-dereferencing-before-null-checking
-
- # jejb/scsi for-next
+ patches.suse/x86-kconfig-remove-x86_direct_gbpages-dependency-on-debug_pagealloc.patch
+ patches.suse/powerpc-xmon-Check-for-HV-mode-when-dumping-XIVE-inf.patch
+ patches.suse/powerpc-xive-Fix-dump-of-XIVE-interrupt-under-pserie.patch
+ patches.suse/powerpc-xmon-Add-a-dump-of-all-XIVE-interrupts.patch
+ patches.suse/powerpc-rtas-use-device-model-APIs-and-serialization.patch
+ patches.suse/powerpc-64s-support-nospectre_v2-cmdline-option.patch
+ patches.suse/scsi-qla2xxx-Remove-unnecessary-null-check.patch
+ patches.suse/scsi-qla2xxx-Replace-vmalloc-memset-with-vzalloc.patch
patches.suse/scsi-cxlflash-Mark-expected-switch-fall-throughs.patch
+ patches.suse/scsi-qla2xxx-Fix-DMA-unmap-leak.patch
+ patches.suse/scsi-qla2xxx-Fix-different-size-DMA-Alloc-Unmap.patch
+ patches.suse/scsi-qla2xxx-Fix-abort-timeout-race-condition.patch
+ patches.suse/scsi-qla2xxx-Use-Correct-index-for-Q-Pair-array.patch
+ patches.suse/scsi-qla2xxx-Skip-FW-dump-on-LOOP-initialization-err.patch
+ patches.suse/scsi-qla2xxx-Reject-EH_-abort-device_reset-target_re.patch
+ patches.suse/scsi-qla2xxx-Fix-Relogin-to-prevent-modifying-scan_s.patch
+ patches.suse/scsi-qla2xxx-Fix-premature-timer-expiration.patch
+ patches.suse/scsi-qla2xxx-Retry-fabric-Scan-on-IOCB-queue-full.patch
+ patches.suse/scsi-qla2xxx-Correct-error-handling-during-initializ.patch
+ patches.suse/scsi-qla2xxx-Fix-NVMe-port-discovery-after-a-short-d.patch
+ patches.suse/scsi-qla2xxx-Use-common-update-firmware-options-rout.patch
+ patches.suse/scsi-qla2xxx-Fix-hang-in-fcport-delete-path.patch
+ patches.suse/scsi-qla2xxx-Allow-NVMe-IO-to-resume-with-short-cabl.patch
+ patches.suse/scsi-qla2xxx-Update-driver-version-to-10.01.00.18-k.patch
+ patches.suse/scsi-qla2xxx-Include-the-asm-unaligned.h-header-file.patch
+ patches.suse/scsi-qla2xxx-qla2x00_alloc_fw_dump-set-ha-eft.patch
patches.suse/scsi-lpfc-remove-NULL-check-before-some-freeing-func.patch
patches.suse/scsi-lpfc-Limit-xri-count-for-kdump-environment.patch
patches.suse/scsi-lpfc-Fix-PLOGI-failure-with-high-remoteport-cou.patch
@@ -49821,20 +49845,10 @@
patches.suse/scsi-lpfc-Add-NVMe-sequence-level-error-recovery-sup.patch
patches.suse/scsi-lpfc-merge-per-protocol-wq-cq-pairs-into-single.patch
patches.suse/scsi-lpfc-Update-lpfc-version-to-12.4.0.0.patch
-
- # powerpc/linux next
- patches.suse/powerpc-xmon-Check-for-HV-mode-when-dumping-XIVE-inf.patch
- patches.suse/powerpc-xive-Fix-dump-of-XIVE-interrupt-under-pserie.patch
- patches.suse/powerpc-xmon-Add-a-dump-of-all-XIVE-interrupts.patch
- patches.suse/powerpc-rtas-use-device-model-APIs-and-serialization.patch
- patches.suse/powerpc-64s-support-nospectre_v2-cmdline-option.patch
-
- # powerpc/linux fixes
- patches.suse/powerpc-tm-Fix-FP-VMX-unavailable-exceptions-inside-.patch
- patches.suse/powerpc-tm-Fix-restoring-FP-VMX-facility-incorrectly.patch
-
- # tip/tip
- patches.suse/x86-kconfig-remove-x86_direct_gbpages-dependency-on-debug_pagealloc.patch
+ patches.suse/scsi-lpfc-Resolve-checker-warning-for-lpfc_new_io_bu.patch
+ patches.suse/scsi-lpfc-remove-bg-debugfs-buffers.patch
+ patches.suse/scsi-lpfc-fix-12.4.0.0-GPF-at-boot.patch
+ patches.suse/scsi-lpfc-Fix-reset-recovery-paths-that-are-not-reco.patch
# dhowells/linux-fs keys-uefi
patches.suse/0001-KEYS-Allow-unrestricted-boot-time-addition-of-keys-t.patch
@@ -49861,7 +49875,6 @@
patches.suse/nvme-multipath-fix-ana-log-nsid-lookup-when-nsid-is-.patch
patches.suse/block-Fix-a-NULL-pointer-dereference-in-generic_make.patch
patches.suse/dasd_fba-Display-00000000-for-zero-page-when-dumping.patch
- patches.suse/scsi-qla2xxx-do-not-crash-on-uninitialized-pool-list.patch
patches.suse/qlge-Fix-irq-masking-in-INTx-mode.patch
patches.suse/qlge-Remove-irq_cnt.patch
patches.suse/qlge-Remove-page_chunk.last_flag.patch
@@ -50140,31 +50153,6 @@
patches.suse/sphinx-1.2-doc-build-fix.patch
- # bsc#1082635 bsc#1141340 bsc#1143706 bsc#1134476
- # not yet in mainline, in subsystem maintainer's tree
- patches.suse/scsi-qla2xxx-Remove-unnecessary-null-check.patch
- patches.suse/scsi-qla2xxx-Replace-vmalloc-memset-with-vzalloc.patch
- patches.suse/scsi-qla2xxx-Fix-DMA-unmap-leak.patch
- patches.suse/scsi-qla2xxx-Fix-different-size-DMA-Alloc-Unmap.patch
- patches.suse/scsi-qla2xxx-Fix-abort-timeout-race-condition.patch
- patches.suse/scsi-qla2xxx-Use-Correct-index-for-Q-Pair-array.patch
- patches.suse/scsi-qla2xxx-Skip-FW-dump-on-LOOP-initialization-err.patch
- patches.suse/scsi-qla2xxx-Reject-EH_-abort-device_reset-target_re.patch
- patches.suse/scsi-qla2xxx-Fix-Relogin-to-prevent-modifying-scan_s.patch
- patches.suse/scsi-qla2xxx-Fix-premature-timer-expiration.patch
- patches.suse/scsi-qla2xxx-Retry-fabric-Scan-on-IOCB-queue-full.patch
- patches.suse/scsi-qla2xxx-Correct-error-handling-during-initializ.patch
- patches.suse/scsi-qla2xxx-Fix-NVMe-port-discovery-after-a-short-d.patch
- patches.suse/scsi-qla2xxx-Use-common-update-firmware-options-rout.patch
- patches.suse/scsi-qla2xxx-Fix-hang-in-fcport-delete-path.patch
- patches.suse/scsi-qla2xxx-Allow-NVMe-IO-to-resume-with-short-cabl.patch
- patches.suse/scsi-qla2xxx-Update-driver-version-to-10.01.00.18-k.patch
- patches.suse/scsi-qla2xxx-qla2x00_alloc_fw_dump-set-ha-eft.patch
-
- # bsc#1148308
- # not yet in mainline, in subsystem maintainer's tree
- patches.suse/lpfc-fix-12.4.0.0-gpf-at-boot.patch
-
########################################################
# ACPI patches
########################################################