From: Greg Kroah-Hartman Date: Sat, 2 Apr 2022 14:23:11 +0000 (+0200) Subject: 5.10-stable patches X-Git-Tag: v5.17.2~166 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b6f3cbb448715687700c61af9790f5101c4a61a7;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: kvm-x86-mmu-check-for-present-spte-when-clearing-dirty-bit-in-tdp-mmu.patch powerpc-fix-build-errors-with-newer-binutils.patch powerpc-kasan-fix-early-region-not-updated-correctly.patch powerpc-lib-sstep-fix-build-errors-with-newer-binutils.patch powerpc-lib-sstep-fix-sthcx-instruction.patch scsi-qla2xxx-add-devids-and-conditionals-for-28xx.patch scsi-qla2xxx-check-for-firmware-dump-already-collected.patch scsi-qla2xxx-fix-device-reconnect-in-loop-topology.patch scsi-qla2xxx-fix-disk-failure-to-rediscover.patch scsi-qla2xxx-fix-hang-due-to-session-stuck.patch scsi-qla2xxx-fix-incorrect-reporting-of-task-management-failure.patch scsi-qla2xxx-fix-missed-dma-unmap-for-nvme-ls-requests.patch scsi-qla2xxx-fix-n2n-inconsistent-plogi.patch scsi-qla2xxx-fix-scheduling-while-atomic.patch scsi-qla2xxx-fix-stuck-session-in-gpdb.patch scsi-qla2xxx-fix-warning-for-missing-error-code.patch scsi-qla2xxx-fix-wrong-fdmi-data-for-64g-adapter.patch scsi-qla2xxx-reduce-false-trigger-to-login.patch scsi-qla2xxx-suppress-a-kernel-complaint-in-qla_create_qpair.patch scsi-qla2xxx-use-correct-feature-type-field-during-rff_id-processing.patch --- diff --git a/queue-5.10/kvm-x86-mmu-check-for-present-spte-when-clearing-dirty-bit-in-tdp-mmu.patch b/queue-5.10/kvm-x86-mmu-check-for-present-spte-when-clearing-dirty-bit-in-tdp-mmu.patch new file mode 100644 index 00000000000..3e1fe3644ef --- /dev/null +++ b/queue-5.10/kvm-x86-mmu-check-for-present-spte-when-clearing-dirty-bit-in-tdp-mmu.patch @@ -0,0 +1,39 @@ +From 3354ef5a592d219364cf442c2f784ce7ad7629fd Mon Sep 17 00:00:00 2001 +From: Sean Christopherson +Date: Sat, 26 Feb 2022 00:15:20 +0000 +Subject: KVM: x86/mmu: Check for present SPTE when clearing dirty bit in TDP MMU + +From: Sean Christopherson + +commit 3354ef5a592d219364cf442c2f784ce7ad7629fd upstream. + +Explicitly check for present SPTEs when clearing dirty bits in the TDP +MMU. This isn't strictly required for correctness, as setting the dirty +bit in a defunct SPTE will not change the SPTE from !PRESENT to PRESENT. +However, the guarded MMU_WARN_ON() in spte_ad_need_write_protect() would +complain if anyone actually turned on KVM's MMU debugging. + +Fixes: a6a0b05da9f3 ("kvm: x86/mmu: Support dirty logging for the TDP MMU") +Cc: Ben Gardon +Signed-off-by: Sean Christopherson +Reviewed-by: Ben Gardon +Message-Id: <20220226001546.360188-3-seanjc@google.com> +Cc: stable@vger.kernel.org +Signed-off-by: Paolo Bonzini +Signed-off-by: Greg Kroah-Hartman +--- + arch/x86/kvm/mmu/tdp_mmu.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/arch/x86/kvm/mmu/tdp_mmu.c ++++ b/arch/x86/kvm/mmu/tdp_mmu.c +@@ -902,6 +902,9 @@ static bool clear_dirty_gfn_range(struct + if (tdp_mmu_iter_cond_resched(kvm, &iter, false)) + continue; + ++ if (!is_shadow_present_pte(iter.old_spte)) ++ continue; ++ + if (spte_ad_need_write_protect(iter.old_spte)) { + if (is_writable_pte(iter.old_spte)) + new_spte = iter.old_spte & ~PT_WRITABLE_MASK; diff --git a/queue-5.10/powerpc-fix-build-errors-with-newer-binutils.patch b/queue-5.10/powerpc-fix-build-errors-with-newer-binutils.patch new file mode 100644 index 00000000000..b74980f55da --- /dev/null +++ b/queue-5.10/powerpc-fix-build-errors-with-newer-binutils.patch @@ -0,0 +1,164 @@ +From 8667d0d64dd1f84fd41b5897fd87fa9113ae05e3 Mon Sep 17 00:00:00 2001 +From: Anders Roxell +Date: Thu, 24 Feb 2022 17:22:14 +0100 +Subject: powerpc: Fix build errors with newer binutils + +From: Anders Roxell + +commit 8667d0d64dd1f84fd41b5897fd87fa9113ae05e3 upstream. + +Building tinyconfig with gcc (Debian 11.2.0-16) and assembler (Debian +2.37.90.20220207) the following build error shows up: + + {standard input}: Assembler messages: + {standard input}:1190: Error: unrecognized opcode: `stbcix' + {standard input}:1433: Error: unrecognized opcode: `lwzcix' + {standard input}:1453: Error: unrecognized opcode: `stbcix' + {standard input}:1460: Error: unrecognized opcode: `stwcix' + {standard input}:1596: Error: unrecognized opcode: `stbcix' + ... + +Rework to add assembler directives [1] around the instruction. Going +through them one by one shows that the changes should be safe. Like +__get_user_atomic_128_aligned() is only called in p9_hmi_special_emu(), +which according to the name is specific to power9. And __raw_rm_read*() +are only called in things that are powernv or book3s_hv specific. + +[1] https://sourceware.org/binutils/docs/as/PowerPC_002dPseudo.html#PowerPC_002dPseudo + +Cc: stable@vger.kernel.org +Co-developed-by: Arnd Bergmann +Signed-off-by: Arnd Bergmann +Signed-off-by: Anders Roxell +Reviewed-by: Segher Boessenkool +[mpe: Make commit subject more descriptive] +Signed-off-by: Michael Ellerman +Link: https://lore.kernel.org/r/20220224162215.3406642-2-anders.roxell@linaro.org +Signed-off-by: Greg Kroah-Hartman +--- + arch/powerpc/include/asm/io.h | 40 ++++++++++++++++++++++++++++------- + arch/powerpc/include/asm/uaccess.h | 3 ++ + arch/powerpc/platforms/powernv/rng.c | 6 ++++- + 3 files changed, 40 insertions(+), 9 deletions(-) + +--- a/arch/powerpc/include/asm/io.h ++++ b/arch/powerpc/include/asm/io.h +@@ -344,25 +344,37 @@ static inline void __raw_writeq_be(unsig + */ + static inline void __raw_rm_writeb(u8 val, volatile void __iomem *paddr) + { +- __asm__ __volatile__("stbcix %0,0,%1" ++ __asm__ __volatile__(".machine push; \ ++ .machine power6; \ ++ stbcix %0,0,%1; \ ++ .machine pop;" + : : "r" (val), "r" (paddr) : "memory"); + } + + static inline void __raw_rm_writew(u16 val, volatile void __iomem *paddr) + { +- __asm__ __volatile__("sthcix %0,0,%1" ++ __asm__ __volatile__(".machine push; \ ++ .machine power6; \ ++ sthcix %0,0,%1; \ ++ .machine pop;" + : : "r" (val), "r" (paddr) : "memory"); + } + + static inline void __raw_rm_writel(u32 val, volatile void __iomem *paddr) + { +- __asm__ __volatile__("stwcix %0,0,%1" ++ __asm__ __volatile__(".machine push; \ ++ .machine power6; \ ++ stwcix %0,0,%1; \ ++ .machine pop;" + : : "r" (val), "r" (paddr) : "memory"); + } + + static inline void __raw_rm_writeq(u64 val, volatile void __iomem *paddr) + { +- __asm__ __volatile__("stdcix %0,0,%1" ++ __asm__ __volatile__(".machine push; \ ++ .machine power6; \ ++ stdcix %0,0,%1; \ ++ .machine pop;" + : : "r" (val), "r" (paddr) : "memory"); + } + +@@ -374,7 +386,10 @@ static inline void __raw_rm_writeq_be(u6 + static inline u8 __raw_rm_readb(volatile void __iomem *paddr) + { + u8 ret; +- __asm__ __volatile__("lbzcix %0,0, %1" ++ __asm__ __volatile__(".machine push; \ ++ .machine power6; \ ++ lbzcix %0,0, %1; \ ++ .machine pop;" + : "=r" (ret) : "r" (paddr) : "memory"); + return ret; + } +@@ -382,7 +397,10 @@ static inline u8 __raw_rm_readb(volatile + static inline u16 __raw_rm_readw(volatile void __iomem *paddr) + { + u16 ret; +- __asm__ __volatile__("lhzcix %0,0, %1" ++ __asm__ __volatile__(".machine push; \ ++ .machine power6; \ ++ lhzcix %0,0, %1; \ ++ .machine pop;" + : "=r" (ret) : "r" (paddr) : "memory"); + return ret; + } +@@ -390,7 +408,10 @@ static inline u16 __raw_rm_readw(volatil + static inline u32 __raw_rm_readl(volatile void __iomem *paddr) + { + u32 ret; +- __asm__ __volatile__("lwzcix %0,0, %1" ++ __asm__ __volatile__(".machine push; \ ++ .machine power6; \ ++ lwzcix %0,0, %1; \ ++ .machine pop;" + : "=r" (ret) : "r" (paddr) : "memory"); + return ret; + } +@@ -398,7 +419,10 @@ static inline u32 __raw_rm_readl(volatil + static inline u64 __raw_rm_readq(volatile void __iomem *paddr) + { + u64 ret; +- __asm__ __volatile__("ldcix %0,0, %1" ++ __asm__ __volatile__(".machine push; \ ++ .machine power6; \ ++ ldcix %0,0, %1; \ ++ .machine pop;" + : "=r" (ret) : "r" (paddr) : "memory"); + return ret; + } +--- a/arch/powerpc/include/asm/uaccess.h ++++ b/arch/powerpc/include/asm/uaccess.h +@@ -229,8 +229,11 @@ extern long __get_user_bad(void); + */ + #define __get_user_atomic_128_aligned(kaddr, uaddr, err) \ + __asm__ __volatile__( \ ++ ".machine push\n" \ ++ ".machine altivec\n" \ + "1: lvx 0,0,%1 # get user\n" \ + " stvx 0,0,%2 # put kernel\n" \ ++ ".machine pop\n" \ + "2:\n" \ + ".section .fixup,\"ax\"\n" \ + "3: li %0,%3\n" \ +--- a/arch/powerpc/platforms/powernv/rng.c ++++ b/arch/powerpc/platforms/powernv/rng.c +@@ -43,7 +43,11 @@ static unsigned long rng_whiten(struct p + unsigned long parity; + + /* Calculate the parity of the value */ +- asm ("popcntd %0,%1" : "=r" (parity) : "r" (val)); ++ asm (".machine push; \ ++ .machine power7; \ ++ popcntd %0,%1; \ ++ .machine pop;" ++ : "=r" (parity) : "r" (val)); + + /* xor our value with the previous mask */ + val ^= rng->mask; diff --git a/queue-5.10/powerpc-kasan-fix-early-region-not-updated-correctly.patch b/queue-5.10/powerpc-kasan-fix-early-region-not-updated-correctly.patch new file mode 100644 index 00000000000..857cadf1bd4 --- /dev/null +++ b/queue-5.10/powerpc-kasan-fix-early-region-not-updated-correctly.patch @@ -0,0 +1,86 @@ +From dd75080aa8409ce10d50fb58981c6b59bf8707d3 Mon Sep 17 00:00:00 2001 +From: Chen Jingwen +Date: Wed, 29 Dec 2021 11:52:26 +0800 +Subject: powerpc/kasan: Fix early region not updated correctly + +From: Chen Jingwen + +commit dd75080aa8409ce10d50fb58981c6b59bf8707d3 upstream. + +The shadow's page table is not updated when PTE_RPN_SHIFT is 24 +and PAGE_SHIFT is 12. It not only causes false positives but +also false negative as shown the following text. + +Fix it by bringing the logic of kasan_early_shadow_page_entry here. + +1. False Positive: +================================================================== +BUG: KASAN: vmalloc-out-of-bounds in pcpu_alloc+0x508/0xa50 +Write of size 16 at addr f57f3be0 by task swapper/0/1 + +CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.15.0-12267-gdebe436e77c7 #1 +Call Trace: +[c80d1c20] [c07fe7b8] dump_stack_lvl+0x4c/0x6c (unreliable) +[c80d1c40] [c02ff668] print_address_description.constprop.0+0x88/0x300 +[c80d1c70] [c02ff45c] kasan_report+0x1ec/0x200 +[c80d1cb0] [c0300b20] kasan_check_range+0x160/0x2f0 +[c80d1cc0] [c03018a4] memset+0x34/0x90 +[c80d1ce0] [c0280108] pcpu_alloc+0x508/0xa50 +[c80d1d40] [c02fd7bc] __kmem_cache_create+0xfc/0x570 +[c80d1d70] [c0283d64] kmem_cache_create_usercopy+0x274/0x3e0 +[c80d1db0] [c2036580] init_sd+0xc4/0x1d0 +[c80d1de0] [c00044a0] do_one_initcall+0xc0/0x33c +[c80d1eb0] [c2001624] kernel_init_freeable+0x2c8/0x384 +[c80d1ef0] [c0004b14] kernel_init+0x24/0x170 +[c80d1f10] [c001b26c] ret_from_kernel_thread+0x5c/0x64 + +Memory state around the buggy address: + f57f3a80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 + f57f3b00: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 +>f57f3b80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 + ^ + f57f3c00: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 + f57f3c80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 +================================================================== + +2. False Negative (with KASAN tests): +================================================================== +Before fix: + ok 45 - kmalloc_double_kzfree + # vmalloc_oob: EXPECTATION FAILED at lib/test_kasan.c:1039 + KASAN failure expected in "((volatile char *)area)[3100]", but none occurred + not ok 46 - vmalloc_oob + not ok 1 - kasan + +================================================================== +After fix: + ok 1 - kasan + +Fixes: cbd18991e24fe ("powerpc/mm: Fix an Oops in kasan_mmu_init()") +Cc: stable@vger.kernel.org # 5.4.x +Signed-off-by: Chen Jingwen +Reviewed-by: Christophe Leroy +Signed-off-by: Michael Ellerman +Link: https://lore.kernel.org/r/20211229035226.59159-1-chenjingwen6@huawei.com +Signed-off-by: Greg Kroah-Hartman +--- + arch/powerpc/mm/kasan/kasan_init_32.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/arch/powerpc/mm/kasan/kasan_init_32.c ++++ b/arch/powerpc/mm/kasan/kasan_init_32.c +@@ -83,13 +83,12 @@ void __init + kasan_update_early_region(unsigned long k_start, unsigned long k_end, pte_t pte) + { + unsigned long k_cur; +- phys_addr_t pa = __pa(kasan_early_shadow_page); + + for (k_cur = k_start; k_cur != k_end; k_cur += PAGE_SIZE) { + pmd_t *pmd = pmd_off_k(k_cur); + pte_t *ptep = pte_offset_kernel(pmd, k_cur); + +- if ((pte_val(*ptep) & PTE_RPN_MASK) != pa) ++ if (pte_page(*ptep) != virt_to_page(lm_alias(kasan_early_shadow_page))) + continue; + + __set_pte_at(&init_mm, k_cur, ptep, pte, 0); diff --git a/queue-5.10/powerpc-lib-sstep-fix-build-errors-with-newer-binutils.patch b/queue-5.10/powerpc-lib-sstep-fix-build-errors-with-newer-binutils.patch new file mode 100644 index 00000000000..f0ae244c445 --- /dev/null +++ b/queue-5.10/powerpc-lib-sstep-fix-build-errors-with-newer-binutils.patch @@ -0,0 +1,61 @@ +From 8219d31effa7be5dbc7ff915d7970672e028c701 Mon Sep 17 00:00:00 2001 +From: Anders Roxell +Date: Thu, 24 Feb 2022 17:22:15 +0100 +Subject: powerpc/lib/sstep: Fix build errors with newer binutils + +From: Anders Roxell + +commit 8219d31effa7be5dbc7ff915d7970672e028c701 upstream. + +Building tinyconfig with gcc (Debian 11.2.0-16) and assembler (Debian +2.37.90.20220207) the following build error shows up: + + {standard input}: Assembler messages: + {standard input}:10576: Error: unrecognized opcode: `stbcx.' + {standard input}:10680: Error: unrecognized opcode: `lharx' + {standard input}:10694: Error: unrecognized opcode: `lbarx' + +Rework to add assembler directives [1] around the instruction. The +problem with this might be that we can trick a power6 into +single-stepping through an stbcx. for instance, and it will execute that +in kernel mode. + +[1] https://sourceware.org/binutils/docs/as/PowerPC_002dPseudo.html#PowerPC_002dPseudo + +Fixes: 350779a29f11 ("powerpc: Handle most loads and stores in instruction emulation code") +Cc: stable@vger.kernel.org # v4.14+ +Co-developed-by: Arnd Bergmann +Signed-off-by: Arnd Bergmann +Signed-off-by: Anders Roxell +Reviewed-by: Segher Boessenkool +Signed-off-by: Michael Ellerman +Link: https://lore.kernel.org/r/20220224162215.3406642-3-anders.roxell@linaro.org +Signed-off-by: Greg Kroah-Hartman +--- + arch/powerpc/lib/sstep.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/arch/powerpc/lib/sstep.c ++++ b/arch/powerpc/lib/sstep.c +@@ -949,7 +949,10 @@ NOKPROBE_SYMBOL(emulate_dcbz); + + #define __put_user_asmx(x, addr, err, op, cr) \ + __asm__ __volatile__( \ ++ ".machine push\n" \ ++ ".machine power8\n" \ + "1: " op " %2,0,%3\n" \ ++ ".machine pop\n" \ + " mfcr %1\n" \ + "2:\n" \ + ".section .fixup,\"ax\"\n" \ +@@ -962,7 +965,10 @@ NOKPROBE_SYMBOL(emulate_dcbz); + + #define __get_user_asmx(x, addr, err, op) \ + __asm__ __volatile__( \ ++ ".machine push\n" \ ++ ".machine power8\n" \ + "1: "op" %1,0,%2\n" \ ++ ".machine pop\n" \ + "2:\n" \ + ".section .fixup,\"ax\"\n" \ + "3: li %0,%3\n" \ diff --git a/queue-5.10/powerpc-lib-sstep-fix-sthcx-instruction.patch b/queue-5.10/powerpc-lib-sstep-fix-sthcx-instruction.patch new file mode 100644 index 00000000000..b0910475116 --- /dev/null +++ b/queue-5.10/powerpc-lib-sstep-fix-sthcx-instruction.patch @@ -0,0 +1,35 @@ +From a633cb1edddaa643fadc70abc88f89a408fa834a Mon Sep 17 00:00:00 2001 +From: Anders Roxell +Date: Thu, 24 Feb 2022 17:22:13 +0100 +Subject: powerpc/lib/sstep: Fix 'sthcx' instruction + +From: Anders Roxell + +commit a633cb1edddaa643fadc70abc88f89a408fa834a upstream. + +Looks like there been a copy paste mistake when added the instruction +'stbcx' twice and one was probably meant to be 'sthcx'. Changing to +'sthcx' from 'stbcx'. + +Fixes: 350779a29f11 ("powerpc: Handle most loads and stores in instruction emulation code") +Cc: stable@vger.kernel.org # v4.14+ +Reported-by: Arnd Bergmann +Signed-off-by: Anders Roxell +Signed-off-by: Michael Ellerman +Link: https://lore.kernel.org/r/20220224162215.3406642-1-anders.roxell@linaro.org +Signed-off-by: Greg Kroah-Hartman +--- + arch/powerpc/lib/sstep.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/powerpc/lib/sstep.c ++++ b/arch/powerpc/lib/sstep.c +@@ -3187,7 +3187,7 @@ int emulate_loadstore(struct pt_regs *re + __put_user_asmx(op->val, ea, err, "stbcx.", cr); + break; + case 2: +- __put_user_asmx(op->val, ea, err, "stbcx.", cr); ++ __put_user_asmx(op->val, ea, err, "sthcx.", cr); + break; + #endif + case 4: diff --git a/queue-5.10/scsi-qla2xxx-add-devids-and-conditionals-for-28xx.patch b/queue-5.10/scsi-qla2xxx-add-devids-and-conditionals-for-28xx.patch new file mode 100644 index 00000000000..358dd1a6ca2 --- /dev/null +++ b/queue-5.10/scsi-qla2xxx-add-devids-and-conditionals-for-28xx.patch @@ -0,0 +1,177 @@ +From 0d6a536cb1fcabb6c3e9c94871c8d0b29bb5813b Mon Sep 17 00:00:00 2001 +From: Joe Carnuccio +Date: Sun, 9 Jan 2022 21:02:16 -0800 +Subject: scsi: qla2xxx: Add devids and conditionals for 28xx + +From: Joe Carnuccio + +commit 0d6a536cb1fcabb6c3e9c94871c8d0b29bb5813b upstream. + +This is an update to the original 28xx adapter enablement. Add a bunch of +conditionals that are applicable for 28xx. + +Link: https://lore.kernel.org/r/20220110050218.3958-16-njavali@marvell.com +Fixes: ecc89f25e225 ("scsi: qla2xxx: Add Device ID for ISP28XX") +Cc: stable@vger.kernel.org +Signed-off-by: Joe Carnuccio +Signed-off-by: Nilesh Javali +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/qla2xxx/qla_attr.c | 7 ++----- + drivers/scsi/qla2xxx/qla_init.c | 8 +++----- + drivers/scsi/qla2xxx/qla_mbx.c | 14 +++++++++++--- + drivers/scsi/qla2xxx/qla_os.c | 3 +-- + drivers/scsi/qla2xxx/qla_sup.c | 4 ++-- + drivers/scsi/qla2xxx/qla_target.c | 3 +-- + 6 files changed, 20 insertions(+), 19 deletions(-) + +--- a/drivers/scsi/qla2xxx/qla_attr.c ++++ b/drivers/scsi/qla2xxx/qla_attr.c +@@ -555,7 +555,7 @@ qla2x00_sysfs_read_vpd(struct file *filp + if (!capable(CAP_SYS_ADMIN)) + return -EINVAL; + +- if (IS_NOCACHE_VPD_TYPE(ha)) ++ if (!IS_NOCACHE_VPD_TYPE(ha)) + goto skip; + + faddr = ha->flt_region_vpd << 2; +@@ -739,7 +739,7 @@ qla2x00_sysfs_write_reset(struct file *f + ql_log(ql_log_info, vha, 0x706f, + "Issuing MPI reset.\n"); + +- if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) { ++ if (IS_QLA83XX(ha)) { + uint32_t idc_control; + + qla83xx_idc_lock(vha, 0); +@@ -1050,9 +1050,6 @@ qla2x00_free_sysfs_attr(scsi_qla_host_t + continue; + if (iter->type == 3 && !(IS_CNA_CAPABLE(ha))) + continue; +- if (iter->type == 0x27 && +- (!IS_QLA27XX(ha) || !IS_QLA28XX(ha))) +- continue; + + sysfs_remove_bin_file(&host->shost_gendev.kobj, + iter->attr); +--- a/drivers/scsi/qla2xxx/qla_init.c ++++ b/drivers/scsi/qla2xxx/qla_init.c +@@ -3322,7 +3322,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *v + mem_size = (ha->fw_memory_size - 0x11000 + 1) * + sizeof(uint16_t); + } else if (IS_FWI2_CAPABLE(ha)) { +- if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) ++ if (IS_QLA83XX(ha)) + fixed_size = offsetof(struct qla83xx_fw_dump, ext_mem); + else if (IS_QLA81XX(ha)) + fixed_size = offsetof(struct qla81xx_fw_dump, ext_mem); +@@ -3334,8 +3334,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *v + mem_size = (ha->fw_memory_size - 0x100000 + 1) * + sizeof(uint32_t); + if (ha->mqenable) { +- if (!IS_QLA83XX(ha) && !IS_QLA27XX(ha) && +- !IS_QLA28XX(ha)) ++ if (!IS_QLA83XX(ha)) + mq_size = sizeof(struct qla2xxx_mq_chain); + /* + * Allocate maximum buffer size for all queues - Q0. +@@ -3896,8 +3895,7 @@ enable_82xx_npiv: + ha->fw_major_version, ha->fw_minor_version, + ha->fw_subminor_version); + +- if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || +- IS_QLA28XX(ha)) { ++ if (IS_QLA83XX(ha)) { + ha->flags.fac_supported = 0; + rval = QLA_SUCCESS; + } +--- a/drivers/scsi/qla2xxx/qla_mbx.c ++++ b/drivers/scsi/qla2xxx/qla_mbx.c +@@ -9,6 +9,12 @@ + #include + #include + ++#ifdef CONFIG_PPC ++#define IS_PPCARCH true ++#else ++#define IS_PPCARCH false ++#endif ++ + static struct mb_cmd_name { + uint16_t cmd; + const char *str; +@@ -698,6 +704,9 @@ again: + vha->min_supported_speed = + nv->min_supported_speed; + } ++ ++ if (IS_PPCARCH) ++ mcp->mb[11] |= BIT_4; + } + + if (ha->flags.exlogins_enabled) +@@ -2984,8 +2993,7 @@ qla2x00_get_resource_cnts(scsi_qla_host_ + ha->orig_fw_iocb_count = mcp->mb[10]; + if (ha->flags.npiv_supported) + ha->max_npiv_vports = mcp->mb[11]; +- if (IS_QLA81XX(ha) || IS_QLA83XX(ha) || IS_QLA27XX(ha) || +- IS_QLA28XX(ha)) ++ if (IS_QLA81XX(ha) || IS_QLA83XX(ha)) + ha->fw_max_fcf_count = mcp->mb[12]; + } + +@@ -5546,7 +5554,7 @@ qla2x00_get_data_rate(scsi_qla_host_t *v + mcp->out_mb = MBX_1|MBX_0; + mcp->in_mb = MBX_2|MBX_1|MBX_0; + if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) +- mcp->in_mb |= MBX_3; ++ mcp->in_mb |= MBX_4|MBX_3; + mcp->tov = MBX_TOV_SECONDS; + mcp->flags = 0; + rval = qla2x00_mailbox_command(vha, mcp); +--- a/drivers/scsi/qla2xxx/qla_os.c ++++ b/drivers/scsi/qla2xxx/qla_os.c +@@ -3673,8 +3673,7 @@ qla2x00_unmap_iobases(struct qla_hw_data + if (ha->mqiobase) + iounmap(ha->mqiobase); + +- if ((IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) && +- ha->msixbase) ++ if (ha->msixbase) + iounmap(ha->msixbase); + } + } +--- a/drivers/scsi/qla2xxx/qla_sup.c ++++ b/drivers/scsi/qla2xxx/qla_sup.c +@@ -844,7 +844,7 @@ qla2xxx_get_flt_info(scsi_qla_host_t *vh + ha->flt_region_nvram = start; + break; + case FLT_REG_IMG_PRI_27XX: +- if (IS_QLA27XX(ha) && !IS_QLA28XX(ha)) ++ if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) + ha->flt_region_img_status_pri = start; + break; + case FLT_REG_IMG_SEC_27XX: +@@ -1356,7 +1356,7 @@ next: + flash_data_addr(ha, faddr), le32_to_cpu(*dwptr)); + if (ret) { + ql_dbg(ql_dbg_user, vha, 0x7006, +- "Failed slopw write %x (%x)\n", faddr, *dwptr); ++ "Failed slow write %x (%x)\n", faddr, *dwptr); + break; + } + } +--- a/drivers/scsi/qla2xxx/qla_target.c ++++ b/drivers/scsi/qla2xxx/qla_target.c +@@ -7077,8 +7077,7 @@ qlt_probe_one_stage1(struct scsi_qla_hos + if (!QLA_TGT_MODE_ENABLED()) + return; + +- if ((ql2xenablemsix == 0) || IS_QLA83XX(ha) || IS_QLA27XX(ha) || +- IS_QLA28XX(ha)) { ++ if (ha->mqenable || IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) { + ISP_ATIO_Q_IN(base_vha) = &ha->mqiobase->isp25mq.atio_q_in; + ISP_ATIO_Q_OUT(base_vha) = &ha->mqiobase->isp25mq.atio_q_out; + } else { diff --git a/queue-5.10/scsi-qla2xxx-check-for-firmware-dump-already-collected.patch b/queue-5.10/scsi-qla2xxx-check-for-firmware-dump-already-collected.patch new file mode 100644 index 00000000000..d4bbb704d25 --- /dev/null +++ b/queue-5.10/scsi-qla2xxx-check-for-firmware-dump-already-collected.patch @@ -0,0 +1,39 @@ +From cfbafad7c6032d449a5a07f2d273acd2437bbc6a Mon Sep 17 00:00:00 2001 +From: Joe Carnuccio +Date: Sun, 9 Jan 2022 21:02:17 -0800 +Subject: scsi: qla2xxx: Check for firmware dump already collected + +From: Joe Carnuccio + +commit cfbafad7c6032d449a5a07f2d273acd2437bbc6a upstream. + +While allocating firmware dump, check if dump is already collected and do +not re-allocate the buffer. + +Link: https://lore.kernel.org/r/20220110050218.3958-17-njavali@marvell.com +Cc: stable@vger.kernel.org +Signed-off-by: Joe Carnuccio +Signed-off-by: Nilesh Javali +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/qla2xxx/qla_init.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/drivers/scsi/qla2xxx/qla_init.c ++++ b/drivers/scsi/qla2xxx/qla_init.c +@@ -3312,6 +3312,14 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *v + struct rsp_que *rsp = ha->rsp_q_map[0]; + struct qla2xxx_fw_dump *fw_dump; + ++ if (ha->fw_dump) { ++ ql_dbg(ql_dbg_init, vha, 0x00bd, ++ "Firmware dump already allocated.\n"); ++ return; ++ } ++ ++ ha->fw_dumped = 0; ++ ha->fw_dump_cap_flags = 0; + dump_size = fixed_size = mem_size = eft_size = fce_size = mq_size = 0; + req_q_size = rsp_q_size = 0; + diff --git a/queue-5.10/scsi-qla2xxx-fix-device-reconnect-in-loop-topology.patch b/queue-5.10/scsi-qla2xxx-fix-device-reconnect-in-loop-topology.patch new file mode 100644 index 00000000000..f89a07daf41 --- /dev/null +++ b/queue-5.10/scsi-qla2xxx-fix-device-reconnect-in-loop-topology.patch @@ -0,0 +1,78 @@ +From 8ad4be3d15cf144b5834bdb00d5bbe4050938dc7 Mon Sep 17 00:00:00 2001 +From: Arun Easi +Date: Sun, 9 Jan 2022 21:02:11 -0800 +Subject: scsi: qla2xxx: Fix device reconnect in loop topology + +From: Arun Easi + +commit 8ad4be3d15cf144b5834bdb00d5bbe4050938dc7 upstream. + +A device logout in loop topology initiates a device connection teardown +which loses the FW device handle. In loop topo, the device handle is not +regrabbed leading to device login failures and eventually to loss of the +device. Fix this by taking the main login path that does it. + +Link: https://lore.kernel.org/r/20220110050218.3958-11-njavali@marvell.com +Cc: stable@vger.kernel.org +Reviewed-by: Himanshu Madhani +Signed-off-by: Arun Easi +Signed-off-by: Nilesh Javali +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/qla2xxx/qla_init.c | 15 +++++++++++++++ + drivers/scsi/qla2xxx/qla_os.c | 5 +++++ + 2 files changed, 20 insertions(+) + +--- a/drivers/scsi/qla2xxx/qla_init.c ++++ b/drivers/scsi/qla2xxx/qla_init.c +@@ -953,6 +953,9 @@ static void qla24xx_handle_gnl_done_even + set_bit(RELOGIN_NEEDED, &vha->dpc_flags); + } + break; ++ case ISP_CFG_NL: ++ qla24xx_fcport_handle_login(vha, fcport); ++ break; + default: + break; + } +@@ -1480,6 +1483,11 @@ static void qla_chk_n2n_b4_login(struct + u8 login = 0; + int rc; + ++ ql_dbg(ql_dbg_disc, vha, 0x307b, ++ "%s %8phC DS %d LS %d lid %d retries=%d\n", ++ __func__, fcport->port_name, fcport->disc_state, ++ fcport->fw_login_state, fcport->loop_id, fcport->login_retry); ++ + if (qla_tgt_mode_enabled(vha)) + return; + +@@ -5377,6 +5385,13 @@ qla2x00_configure_local_loop(scsi_qla_ho + memcpy(fcport->node_name, new_fcport->node_name, + WWN_SIZE); + fcport->scan_state = QLA_FCPORT_FOUND; ++ if (fcport->login_retry == 0) { ++ fcport->login_retry = vha->hw->login_retry_count; ++ ql_dbg(ql_dbg_disc, vha, 0x2135, ++ "Port login retry %8phN, lid 0x%04x retry cnt=%d.\n", ++ fcport->port_name, fcport->loop_id, ++ fcport->login_retry); ++ } + found++; + break; + } +--- a/drivers/scsi/qla2xxx/qla_os.c ++++ b/drivers/scsi/qla2xxx/qla_os.c +@@ -5391,6 +5391,11 @@ void qla2x00_relogin(struct scsi_qla_hos + ea.fcport = fcport; + qla24xx_handle_relogin_event(vha, &ea); + } else if (vha->hw->current_topology == ++ ISP_CFG_NL && ++ IS_QLA2XXX_MIDTYPE(vha->hw)) { ++ (void)qla24xx_fcport_handle_login(vha, ++ fcport); ++ } else if (vha->hw->current_topology == + ISP_CFG_NL) { + fcport->login_retry--; + status = diff --git a/queue-5.10/scsi-qla2xxx-fix-disk-failure-to-rediscover.patch b/queue-5.10/scsi-qla2xxx-fix-disk-failure-to-rediscover.patch new file mode 100644 index 00000000000..dadca9a8c80 --- /dev/null +++ b/queue-5.10/scsi-qla2xxx-fix-disk-failure-to-rediscover.patch @@ -0,0 +1,74 @@ +From 6a45c8e137d4e2c72eecf1ac7cf64f2fdfcead99 Mon Sep 17 00:00:00 2001 +From: Quinn Tran +Date: Thu, 10 Mar 2022 01:25:53 -0800 +Subject: scsi: qla2xxx: Fix disk failure to rediscover + +From: Quinn Tran + +commit 6a45c8e137d4e2c72eecf1ac7cf64f2fdfcead99 upstream. + +User experienced some of the LUN failed to get rediscovered after long +cable pull test. The issue is triggered by a race condition between driver +setting session online state vs starting the LUN scan process at the same +time. Current code set the online state after notifying the session is +available. In this case, trigger to start the LUN scan process happened +before driver could set the session in online state. LUN scan ends up with +failure due to the session online check was failing. + +Set the online state before reporting of the availability of the session. + +Link: https://lore.kernel.org/r/20220310092604.22950-3-njavali@marvell.com +Fixes: aecf043443d3 ("scsi: qla2xxx: Fix Remote port registration") +Cc: stable@vger.kernel.org +Reviewed-by: Himanshu Madhani +Signed-off-by: Quinn Tran +Signed-off-by: Nilesh Javali +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/qla2xxx/qla_init.c | 5 +++-- + drivers/scsi/qla2xxx/qla_nvme.c | 5 +++++ + 2 files changed, 8 insertions(+), 2 deletions(-) + +--- a/drivers/scsi/qla2xxx/qla_init.c ++++ b/drivers/scsi/qla2xxx/qla_init.c +@@ -5531,6 +5531,8 @@ qla2x00_reg_remote_port(scsi_qla_host_t + if (atomic_read(&fcport->state) == FCS_ONLINE) + return; + ++ qla2x00_set_fcport_state(fcport, FCS_ONLINE); ++ + rport_ids.node_name = wwn_to_u64(fcport->node_name); + rport_ids.port_name = wwn_to_u64(fcport->port_name); + rport_ids.port_id = fcport->d_id.b.domain << 16 | +@@ -5631,6 +5633,7 @@ qla2x00_update_fcport(scsi_qla_host_t *v + qla2x00_reg_remote_port(vha, fcport); + break; + case MODE_TARGET: ++ qla2x00_set_fcport_state(fcport, FCS_ONLINE); + if (!vha->vha_tgt.qla_tgt->tgt_stop && + !vha->vha_tgt.qla_tgt->tgt_stopped) + qlt_fc_port_added(vha, fcport); +@@ -5645,8 +5648,6 @@ qla2x00_update_fcport(scsi_qla_host_t *v + break; + } + +- qla2x00_set_fcport_state(fcport, FCS_ONLINE); +- + if (IS_IIDMA_CAPABLE(vha->hw) && vha->hw->flags.gpsc_supported) { + if (fcport->id_changed) { + fcport->id_changed = 0; +--- a/drivers/scsi/qla2xxx/qla_nvme.c ++++ b/drivers/scsi/qla2xxx/qla_nvme.c +@@ -35,6 +35,11 @@ int qla_nvme_register_remote(struct scsi + (fcport->nvme_flag & NVME_FLAG_REGISTERED)) + return 0; + ++ if (atomic_read(&fcport->state) == FCS_ONLINE) ++ return 0; ++ ++ qla2x00_set_fcport_state(fcport, FCS_ONLINE); ++ + fcport->nvme_flag &= ~NVME_FLAG_RESETTING; + + memset(&req, 0, sizeof(struct nvme_fc_port_info)); diff --git a/queue-5.10/scsi-qla2xxx-fix-hang-due-to-session-stuck.patch b/queue-5.10/scsi-qla2xxx-fix-hang-due-to-session-stuck.patch new file mode 100644 index 00000000000..2cc9d99da00 --- /dev/null +++ b/queue-5.10/scsi-qla2xxx-fix-hang-due-to-session-stuck.patch @@ -0,0 +1,78 @@ +From c02aada06d19a215c8291bd968a99a270e96f734 Mon Sep 17 00:00:00 2001 +From: Quinn Tran +Date: Thu, 10 Mar 2022 01:25:58 -0800 +Subject: scsi: qla2xxx: Fix hang due to session stuck + +From: Quinn Tran + +commit c02aada06d19a215c8291bd968a99a270e96f734 upstream. + +User experienced device lost. The log shows Get port data base command was +queued up, failed, and requeued again. Every time it is requeued, it set +the FCF_ASYNC_ACTIVE. This prevents any recovery code from occurring +because driver thinks a recovery is in progress for this session. In +essence, this session is hung. The reason it gets into this place is the +session deletion got in front of this call due to link perturbation. + +Break the requeue cycle and exit. The session deletion code will trigger a +session relogin. + +Link: https://lore.kernel.org/r/20220310092604.22950-8-njavali@marvell.com +Fixes: 726b85487067 ("qla2xxx: Add framework for async fabric discovery") +Cc: stable@vger.kernel.org +Reviewed-by: Himanshu Madhani +Signed-off-by: Quinn Tran +Signed-off-by: Nilesh Javali +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/qla2xxx/qla_def.h | 4 ++++ + drivers/scsi/qla2xxx/qla_init.c | 19 +++++++++++++++++-- + 2 files changed, 21 insertions(+), 2 deletions(-) + +--- a/drivers/scsi/qla2xxx/qla_def.h ++++ b/drivers/scsi/qla2xxx/qla_def.h +@@ -5175,4 +5175,8 @@ struct sff_8247_a0 { + #include "qla_gbl.h" + #include "qla_dbg.h" + #include "qla_inline.h" ++ ++#define IS_SESSION_DELETED(_fcport) (_fcport->disc_state == DSC_DELETE_PEND || \ ++ _fcport->disc_state == DSC_DELETED) ++ + #endif +--- a/drivers/scsi/qla2xxx/qla_init.c ++++ b/drivers/scsi/qla2xxx/qla_init.c +@@ -570,6 +570,14 @@ qla2x00_async_adisc(struct scsi_qla_host + struct srb_iocb *lio; + int rval = QLA_FUNCTION_FAILED; + ++ if (IS_SESSION_DELETED(fcport)) { ++ ql_log(ql_log_warn, vha, 0xffff, ++ "%s: %8phC is being delete - not sending command.\n", ++ __func__, fcport->port_name); ++ fcport->flags &= ~FCF_ASYNC_ACTIVE; ++ return rval; ++ } ++ + if (!vha->flags.online || (fcport->flags & FCF_ASYNC_SENT)) + return rval; + +@@ -1316,8 +1324,15 @@ int qla24xx_async_gpdb(struct scsi_qla_h + struct port_database_24xx *pd; + struct qla_hw_data *ha = vha->hw; + +- if (!vha->flags.online || (fcport->flags & FCF_ASYNC_SENT) || +- fcport->loop_id == FC_NO_LOOP_ID) { ++ if (IS_SESSION_DELETED(fcport)) { ++ ql_log(ql_log_warn, vha, 0xffff, ++ "%s: %8phC is being delete - not sending command.\n", ++ __func__, fcport->port_name); ++ fcport->flags &= ~FCF_ASYNC_ACTIVE; ++ return rval; ++ } ++ ++ if (!vha->flags.online || fcport->flags & FCF_ASYNC_SENT) { + ql_log(ql_log_warn, vha, 0xffff, + "%s: %8phC online %d flags %x - not sending command.\n", + __func__, fcport->port_name, vha->flags.online, fcport->flags); diff --git a/queue-5.10/scsi-qla2xxx-fix-incorrect-reporting-of-task-management-failure.patch b/queue-5.10/scsi-qla2xxx-fix-incorrect-reporting-of-task-management-failure.patch new file mode 100644 index 00000000000..8859f9f8af0 --- /dev/null +++ b/queue-5.10/scsi-qla2xxx-fix-incorrect-reporting-of-task-management-failure.patch @@ -0,0 +1,37 @@ +From 58ca5999e0367d131de82a75257fbfd5aed0195d Mon Sep 17 00:00:00 2001 +From: Quinn Tran +Date: Thu, 10 Mar 2022 01:25:52 -0800 +Subject: scsi: qla2xxx: Fix incorrect reporting of task management failure + +From: Quinn Tran + +commit 58ca5999e0367d131de82a75257fbfd5aed0195d upstream. + +User experienced no task management error while target device is responding +with error. The RSP_CODE field in the status IOCB is in little endian. +Driver assumes it's big endian and it picked up erroneous data. + +Convert the data back to big endian as is on the wire. + +Link: https://lore.kernel.org/r/20220310092604.22950-2-njavali@marvell.com +Fixes: faef62d13463 ("[SCSI] qla2xxx: Fix Task Management command asynchronous handling") +Cc: stable@vger.kernel.org +Reviewed-by: Himanshu Madhani +Signed-off-by: Quinn Tran +Signed-off-by: Nilesh Javali +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/qla2xxx/qla_isr.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/scsi/qla2xxx/qla_isr.c ++++ b/drivers/scsi/qla2xxx/qla_isr.c +@@ -2248,6 +2248,7 @@ qla24xx_tm_iocb_entry(scsi_qla_host_t *v + iocb->u.tmf.data = QLA_FUNCTION_FAILED; + } else if ((le16_to_cpu(sts->scsi_status) & + SS_RESPONSE_INFO_LEN_VALID)) { ++ host_to_fcp_swap(sts->data, sizeof(sts->data)); + if (le32_to_cpu(sts->rsp_data_len) < 4) { + ql_log(ql_log_warn, fcport->vha, 0x503b, + "Async-%s error - hdl=%x not enough response(%d).\n", diff --git a/queue-5.10/scsi-qla2xxx-fix-missed-dma-unmap-for-nvme-ls-requests.patch b/queue-5.10/scsi-qla2xxx-fix-missed-dma-unmap-for-nvme-ls-requests.patch new file mode 100644 index 00000000000..a6cbab1c72f --- /dev/null +++ b/queue-5.10/scsi-qla2xxx-fix-missed-dma-unmap-for-nvme-ls-requests.patch @@ -0,0 +1,71 @@ +From c85ab7d9e27a80e48d5b7d7fb2fe2b0fdb2de523 Mon Sep 17 00:00:00 2001 +From: Arun Easi +Date: Thu, 10 Mar 2022 01:25:55 -0800 +Subject: scsi: qla2xxx: Fix missed DMA unmap for NVMe ls requests + +From: Arun Easi + +commit c85ab7d9e27a80e48d5b7d7fb2fe2b0fdb2de523 upstream. + +At NVMe ELS request time, request structure is DMA mapped and never +unmapped. Fix this by calling the unmap on ELS completion. + +Link: https://lore.kernel.org/r/20220310092604.22950-5-njavali@marvell.com +Fixes: e84067d74301 ("scsi: qla2xxx: Add FC-NVMe F/W initialization and transport registration") +Cc: stable@vger.kernel.org +Reviewed-by: Himanshu Madhani +Signed-off-by: Arun Easi +Signed-off-by: Nilesh Javali +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/qla2xxx/qla_nvme.c | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +--- a/drivers/scsi/qla2xxx/qla_nvme.c ++++ b/drivers/scsi/qla2xxx/qla_nvme.c +@@ -170,6 +170,18 @@ out: + qla2xxx_rel_qpair_sp(sp->qpair, sp); + } + ++static void qla_nvme_ls_unmap(struct srb *sp, struct nvmefc_ls_req *fd) ++{ ++ if (sp->flags & SRB_DMA_VALID) { ++ struct srb_iocb *nvme = &sp->u.iocb_cmd; ++ struct qla_hw_data *ha = sp->fcport->vha->hw; ++ ++ dma_unmap_single(&ha->pdev->dev, nvme->u.nvme.cmd_dma, ++ fd->rqstlen, DMA_TO_DEVICE); ++ sp->flags &= ~SRB_DMA_VALID; ++ } ++} ++ + static void qla_nvme_release_ls_cmd_kref(struct kref *kref) + { + struct srb *sp = container_of(kref, struct srb, cmd_kref); +@@ -186,6 +198,8 @@ static void qla_nvme_release_ls_cmd_kref + spin_unlock_irqrestore(&priv->cmd_lock, flags); + + fd = priv->fd; ++ ++ qla_nvme_ls_unmap(sp, fd); + fd->done(fd, priv->comp_status); + out: + qla2x00_rel_sp(sp); +@@ -332,6 +346,8 @@ static int qla_nvme_ls_req(struct nvme_f + dma_sync_single_for_device(&ha->pdev->dev, nvme->u.nvme.cmd_dma, + fd->rqstlen, DMA_TO_DEVICE); + ++ sp->flags |= SRB_DMA_VALID; ++ + rval = qla2x00_start_sp(sp); + if (rval != QLA_SUCCESS) { + ql_log(ql_log_warn, vha, 0x700e, +@@ -339,6 +355,7 @@ static int qla_nvme_ls_req(struct nvme_f + wake_up(&sp->nvme_ls_waitq); + sp->priv = NULL; + priv->sp = NULL; ++ qla_nvme_ls_unmap(sp, fd); + qla2x00_rel_sp(sp); + return rval; + } diff --git a/queue-5.10/scsi-qla2xxx-fix-n2n-inconsistent-plogi.patch b/queue-5.10/scsi-qla2xxx-fix-n2n-inconsistent-plogi.patch new file mode 100644 index 00000000000..6985170b93f --- /dev/null +++ b/queue-5.10/scsi-qla2xxx-fix-n2n-inconsistent-plogi.patch @@ -0,0 +1,57 @@ +From c13ce47c64ea8f14e77eecb40d1e7c2ac667f898 Mon Sep 17 00:00:00 2001 +From: Quinn Tran +Date: Thu, 10 Mar 2022 01:25:57 -0800 +Subject: scsi: qla2xxx: Fix N2N inconsistent PLOGI + +From: Quinn Tran + +commit c13ce47c64ea8f14e77eecb40d1e7c2ac667f898 upstream. + +For N2N topology, ELS Passthrough is used to send PLOGI. On failure of ELS +pass through PLOGI, driver flipped over to using LLIOCB PLOGI for N2N. This +is not consistent. Delete the session to restart the connection where ELS +pass through PLOGI would be used consistently. + +Link: https://lore.kernel.org/r/20220310092604.22950-7-njavali@marvell.com +Fixes: c76ae845ea83 ("scsi: qla2xxx: Add error handling for PLOGI ELS passthrough") +Cc: stable@vger.kernel.org +Reviewed-by: Himanshu Madhani +Signed-off-by: Quinn Tran +Signed-off-by: Nilesh Javali +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/qla2xxx/qla_iocb.c | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +--- a/drivers/scsi/qla2xxx/qla_iocb.c ++++ b/drivers/scsi/qla2xxx/qla_iocb.c +@@ -2910,6 +2910,7 @@ static void qla2x00_els_dcmd2_sp_done(sr + set_bit(ISP_ABORT_NEEDED, + &vha->dpc_flags); + qla2xxx_wake_dpc(vha); ++ break; + } + fallthrough; + default: +@@ -2919,9 +2920,7 @@ static void qla2x00_els_dcmd2_sp_done(sr + fw_status[0], fw_status[1], fw_status[2]); + + fcport->flags &= ~FCF_ASYNC_SENT; +- qla2x00_set_fcport_disc_state(fcport, +- DSC_LOGIN_FAILED); +- set_bit(RELOGIN_NEEDED, &vha->dpc_flags); ++ qlt_schedule_sess_for_deletion(fcport); + break; + } + break; +@@ -2933,8 +2932,7 @@ static void qla2x00_els_dcmd2_sp_done(sr + fw_status[0], fw_status[1], fw_status[2]); + + sp->fcport->flags &= ~FCF_ASYNC_SENT; +- qla2x00_set_fcport_disc_state(fcport, DSC_LOGIN_FAILED); +- set_bit(RELOGIN_NEEDED, &vha->dpc_flags); ++ qlt_schedule_sess_for_deletion(fcport); + break; + } + diff --git a/queue-5.10/scsi-qla2xxx-fix-scheduling-while-atomic.patch b/queue-5.10/scsi-qla2xxx-fix-scheduling-while-atomic.patch new file mode 100644 index 00000000000..4d88e570109 --- /dev/null +++ b/queue-5.10/scsi-qla2xxx-fix-scheduling-while-atomic.patch @@ -0,0 +1,73 @@ +From afd438ff874ca40b74321b3fa19bd61adfd7ca0c Mon Sep 17 00:00:00 2001 +From: Quinn Tran +Date: Sun, 9 Jan 2022 21:02:07 -0800 +Subject: scsi: qla2xxx: Fix scheduling while atomic + +From: Quinn Tran + +commit afd438ff874ca40b74321b3fa19bd61adfd7ca0c upstream. + +The driver makes a call into midlayer (fc_remote_port_delete) which can put +the thread to sleep. The thread that originates the call is in interrupt +context. The combination of the two trigger a crash. Schedule the call in +non-interrupt context where it is more safe. + +kernel: BUG: scheduling while atomic: swapper/7/0/0x00010000 +kernel: Call Trace: +kernel: +kernel: dump_stack+0x66/0x81 +kernel: __schedule_bug.cold.90+0x5/0x1d +kernel: __schedule+0x7af/0x960 +kernel: schedule+0x28/0x80 +kernel: schedule_timeout+0x26d/0x3b0 +kernel: wait_for_completion+0xb4/0x140 +kernel: ? wake_up_q+0x70/0x70 +kernel: __wait_rcu_gp+0x12c/0x160 +kernel: ? sdev_evt_alloc+0xc0/0x180 [scsi_mod] +kernel: synchronize_sched+0x6c/0x80 +kernel: ? call_rcu_bh+0x20/0x20 +kernel: ? __bpf_trace_rcu_invoke_callback+0x10/0x10 +kernel: sdev_evt_alloc+0xfd/0x180 [scsi_mod] +kernel: starget_for_each_device+0x85/0xb0 [scsi_mod] +kernel: ? scsi_init_io+0x360/0x3d0 [scsi_mod] +kernel: scsi_init_io+0x388/0x3d0 [scsi_mod] +kernel: device_for_each_child+0x54/0x90 +kernel: fc_remote_port_delete+0x70/0xe0 [scsi_transport_fc] +kernel: qla2x00_schedule_rport_del+0x62/0xf0 [qla2xxx] +kernel: qla2x00_mark_device_lost+0x9c/0xd0 [qla2xxx] +kernel: qla24xx_handle_plogi_done_event+0x55f/0x570 [qla2xxx] +kernel: qla2x00_async_login_sp_done+0xd2/0x100 [qla2xxx] +kernel: qla24xx_logio_entry+0x13a/0x3c0 [qla2xxx] +kernel: qla24xx_process_response_queue+0x306/0x400 [qla2xxx] +kernel: qla24xx_msix_rsp_q+0x3f/0xb0 [qla2xxx] +kernel: __handle_irq_event_percpu+0x40/0x180 +kernel: handle_irq_event_percpu+0x30/0x80 +kernel: handle_irq_event+0x36/0x60 + +Link: https://lore.kernel.org/r/20220110050218.3958-7-njavali@marvell.com +Cc: stable@vger.kernel.org +Reviewed-by: Himanshu Madhani +Signed-off-by: Quinn Tran +Signed-off-by: Nilesh Javali +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/qla2xxx/qla_init.c | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +--- a/drivers/scsi/qla2xxx/qla_init.c ++++ b/drivers/scsi/qla2xxx/qla_init.c +@@ -2114,12 +2114,7 @@ qla24xx_handle_plogi_done_event(struct s + ql_dbg(ql_dbg_disc, vha, 0x20eb, "%s %d %8phC cmd error %x\n", + __func__, __LINE__, ea->fcport->port_name, ea->data[1]); + +- ea->fcport->flags &= ~FCF_ASYNC_SENT; +- qla2x00_set_fcport_disc_state(ea->fcport, DSC_LOGIN_FAILED); +- if (ea->data[1] & QLA_LOGIO_LOGIN_RETRIED) +- set_bit(RELOGIN_NEEDED, &vha->dpc_flags); +- else +- qla2x00_mark_device_lost(vha, ea->fcport, 1); ++ qlt_schedule_sess_for_deletion(ea->fcport); + break; + case MBS_LOOP_ID_USED: + /* data[1] = IO PARAM 1 = nport ID */ diff --git a/queue-5.10/scsi-qla2xxx-fix-stuck-session-in-gpdb.patch b/queue-5.10/scsi-qla2xxx-fix-stuck-session-in-gpdb.patch new file mode 100644 index 00000000000..0dbe922f9a3 --- /dev/null +++ b/queue-5.10/scsi-qla2xxx-fix-stuck-session-in-gpdb.patch @@ -0,0 +1,40 @@ +From 725d3a0d31a51c0debf970011e05f585e805165b Mon Sep 17 00:00:00 2001 +From: Quinn Tran +Date: Sun, 9 Jan 2022 21:02:04 -0800 +Subject: scsi: qla2xxx: Fix stuck session in gpdb + +From: Quinn Tran + +commit 725d3a0d31a51c0debf970011e05f585e805165b upstream. + +Fix stuck sessions in get port database. When a thread is in the process of +re-establishing a session, a flag is set to prevent multiple threads / +triggers from doing the same task. This flag was left on, where any attempt +to relogin was locked out. Clear this flag, if the attempt has failed. + +Link: https://lore.kernel.org/r/20220110050218.3958-4-njavali@marvell.com +Cc: stable@vger.kernel.org +Reviewed-by: Himanshu Madhani +Signed-off-by: Quinn Tran +Signed-off-by: Nilesh Javali +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/qla2xxx/qla_init.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/scsi/qla2xxx/qla_init.c ++++ b/drivers/scsi/qla2xxx/qla_init.c +@@ -1316,9 +1316,9 @@ int qla24xx_async_gpdb(struct scsi_qla_h + if (!vha->flags.online || (fcport->flags & FCF_ASYNC_SENT) || + fcport->loop_id == FC_NO_LOOP_ID) { + ql_log(ql_log_warn, vha, 0xffff, +- "%s: %8phC - not sending command.\n", +- __func__, fcport->port_name); +- return rval; ++ "%s: %8phC online %d flags %x - not sending command.\n", ++ __func__, fcport->port_name, vha->flags.online, fcport->flags); ++ goto done; + } + + sp = qla2x00_get_sp(vha, fcport, GFP_KERNEL); diff --git a/queue-5.10/scsi-qla2xxx-fix-warning-for-missing-error-code.patch b/queue-5.10/scsi-qla2xxx-fix-warning-for-missing-error-code.patch new file mode 100644 index 00000000000..d5f8fbd6a89 --- /dev/null +++ b/queue-5.10/scsi-qla2xxx-fix-warning-for-missing-error-code.patch @@ -0,0 +1,35 @@ +From 14cb838d245ae0d523b2f7804af5a02c22e79f5a Mon Sep 17 00:00:00 2001 +From: Nilesh Javali +Date: Sun, 9 Jan 2022 21:02:12 -0800 +Subject: scsi: qla2xxx: Fix warning for missing error code + +From: Nilesh Javali + +commit 14cb838d245ae0d523b2f7804af5a02c22e79f5a upstream. + +Fix smatch-reported warning message: + +drivers/scsi/qla2xxx/qla_target.c:3324 qlt_xmit_response() warn: missing error +code 'res' + +Link: https://lore.kernel.org/r/20220110050218.3958-12-njavali@marvell.com +Fixes: 4a8f71014b4d ("scsi: qla2xxx: Fix unmap of already freed sgl") +Cc: stable@vger.kernel.org +Reviewed-by: Himanshu Madhani +Signed-off-by: Nilesh Javali +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/qla2xxx/qla_target.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/scsi/qla2xxx/qla_target.c ++++ b/drivers/scsi/qla2xxx/qla_target.c +@@ -3256,6 +3256,7 @@ int qlt_xmit_response(struct qla_tgt_cmd + "RESET-RSP online/active/old-count/new-count = %d/%d/%d/%d.\n", + vha->flags.online, qla2x00_reset_active(vha), + cmd->reset_count, qpair->chip_reset); ++ res = 0; + goto out_unmap_unlock; + } + diff --git a/queue-5.10/scsi-qla2xxx-fix-wrong-fdmi-data-for-64g-adapter.patch b/queue-5.10/scsi-qla2xxx-fix-wrong-fdmi-data-for-64g-adapter.patch new file mode 100644 index 00000000000..319fa14ca6a --- /dev/null +++ b/queue-5.10/scsi-qla2xxx-fix-wrong-fdmi-data-for-64g-adapter.patch @@ -0,0 +1,40 @@ +From 1cfbbacbee2d6ea3816386a483e3c7a96e5bd657 Mon Sep 17 00:00:00 2001 +From: Bikash Hazarika +Date: Sun, 9 Jan 2022 21:02:09 -0800 +Subject: scsi: qla2xxx: Fix wrong FDMI data for 64G adapter + +From: Bikash Hazarika + +commit 1cfbbacbee2d6ea3816386a483e3c7a96e5bd657 upstream. + +Corrected transmission speed mask values for FC. + +Supported Speed: 16 32 20 Gb/s ===> Should be 64 instead of 20 +Supported Speed: 16G 32G 48G ===> Should be 64G instead of 48G + +Link: https://lore.kernel.org/r/20220110050218.3958-9-njavali@marvell.com +Cc: stable@vger.kernel.org +Reviewed-by: Himanshu Madhani +Signed-off-by: Bikash Hazarika +Signed-off-by: Nilesh Javali +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/qla2xxx/qla_def.h | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/drivers/scsi/qla2xxx/qla_def.h ++++ b/drivers/scsi/qla2xxx/qla_def.h +@@ -2796,7 +2796,11 @@ struct ct_fdmi2_hba_attributes { + #define FDMI_PORT_SPEED_8GB 0x10 + #define FDMI_PORT_SPEED_16GB 0x20 + #define FDMI_PORT_SPEED_32GB 0x40 +-#define FDMI_PORT_SPEED_64GB 0x80 ++#define FDMI_PORT_SPEED_20GB 0x80 ++#define FDMI_PORT_SPEED_40GB 0x100 ++#define FDMI_PORT_SPEED_128GB 0x200 ++#define FDMI_PORT_SPEED_64GB 0x400 ++#define FDMI_PORT_SPEED_256GB 0x800 + #define FDMI_PORT_SPEED_UNKNOWN 0x8000 + + #define FC_CLASS_2 0x04 diff --git a/queue-5.10/scsi-qla2xxx-reduce-false-trigger-to-login.patch b/queue-5.10/scsi-qla2xxx-reduce-false-trigger-to-login.patch new file mode 100644 index 00000000000..dbc517a80b3 --- /dev/null +++ b/queue-5.10/scsi-qla2xxx-reduce-false-trigger-to-login.patch @@ -0,0 +1,47 @@ +From d2646eed7b19a206912f49101178cbbaa507256c Mon Sep 17 00:00:00 2001 +From: Quinn Tran +Date: Thu, 10 Mar 2022 01:26:00 -0800 +Subject: scsi: qla2xxx: Reduce false trigger to login + +From: Quinn Tran + +commit d2646eed7b19a206912f49101178cbbaa507256c upstream. + +While a session is in the middle of a relogin, a late RSCN can be delivered +from switch. RSCN trigger fabric scan where the scan logic can trigger +another session login while a login is in progress. Reduce the extra +trigger to prevent multiple logins to the same session. + +Link: https://lore.kernel.org/r/20220310092604.22950-10-njavali@marvell.com +Fixes: bee8b84686c4 ("scsi: qla2xxx: Reduce redundant ADISC command for RSCNs") +Cc: stable@vger.kernel.org +Reviewed-by: Himanshu Madhani +Signed-off-by: Quinn Tran +Signed-off-by: Nilesh Javali +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/qla2xxx/qla_init.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/drivers/scsi/qla2xxx/qla_init.c ++++ b/drivers/scsi/qla2xxx/qla_init.c +@@ -1560,7 +1560,8 @@ int qla24xx_fcport_handle_login(struct s + fcport->conflict, fcport->last_rscn_gen, fcport->rscn_gen, + fcport->login_gen, fcport->loop_id, fcport->scan_state); + +- if (fcport->scan_state != QLA_FCPORT_FOUND) ++ if (fcport->scan_state != QLA_FCPORT_FOUND || ++ fcport->disc_state == DSC_DELETE_PEND) + return 0; + + if ((fcport->loop_id != FC_NO_LOOP_ID) && +@@ -1581,7 +1582,7 @@ int qla24xx_fcport_handle_login(struct s + if (vha->host->active_mode == MODE_TARGET && !N2N_TOPO(vha->hw)) + return 0; + +- if (fcport->flags & FCF_ASYNC_SENT) { ++ if (fcport->flags & (FCF_ASYNC_SENT | FCF_ASYNC_ACTIVE)) { + set_bit(RELOGIN_NEEDED, &vha->dpc_flags); + return 0; + } diff --git a/queue-5.10/scsi-qla2xxx-suppress-a-kernel-complaint-in-qla_create_qpair.patch b/queue-5.10/scsi-qla2xxx-suppress-a-kernel-complaint-in-qla_create_qpair.patch new file mode 100644 index 00000000000..6d7273bca39 --- /dev/null +++ b/queue-5.10/scsi-qla2xxx-suppress-a-kernel-complaint-in-qla_create_qpair.patch @@ -0,0 +1,64 @@ +From a60447e7d451df42c7bde43af53b34f10f34f469 Mon Sep 17 00:00:00 2001 +From: Saurav Kashyap +Date: Sun, 9 Jan 2022 21:02:15 -0800 +Subject: scsi: qla2xxx: Suppress a kernel complaint in qla_create_qpair() + +From: Saurav Kashyap + +commit a60447e7d451df42c7bde43af53b34f10f34f469 upstream. + +[ 12.323788] BUG: using smp_processor_id() in preemptible [00000000] code: systemd-udevd/1020 +[ 12.332297] caller is qla2xxx_create_qpair+0x32a/0x5d0 [qla2xxx] +[ 12.338417] CPU: 7 PID: 1020 Comm: systemd-udevd Tainted: G I --------- --- 5.14.0-29.el9.x86_64 #1 +[ 12.348827] Hardware name: Dell Inc. PowerEdge R610/0F0XJ6, BIOS 6.6.0 05/22/2018 +[ 12.356356] Call Trace: +[ 12.358821] dump_stack_lvl+0x34/0x44 +[ 12.362514] check_preemption_disabled+0xd9/0xe0 +[ 12.367164] qla2xxx_create_qpair+0x32a/0x5d0 [qla2xxx] +[ 12.372481] qla2x00_probe_one+0xa3a/0x1b80 [qla2xxx] +[ 12.377617] ? _raw_spin_lock_irqsave+0x19/0x40 +[ 12.384284] local_pci_probe+0x42/0x80 +[ 12.390162] ? pci_match_device+0xd7/0x110 +[ 12.396366] pci_device_probe+0xfd/0x1b0 +[ 12.402372] really_probe+0x1e7/0x3e0 +[ 12.408114] __driver_probe_device+0xfe/0x180 +[ 12.414544] driver_probe_device+0x1e/0x90 +[ 12.420685] __driver_attach+0xc0/0x1c0 +[ 12.426536] ? __device_attach_driver+0xe0/0xe0 +[ 12.433061] ? __device_attach_driver+0xe0/0xe0 +[ 12.439538] bus_for_each_dev+0x78/0xc0 +[ 12.445294] bus_add_driver+0x12b/0x1e0 +[ 12.451021] driver_register+0x8f/0xe0 +[ 12.456631] ? 0xffffffffc07bc000 +[ 12.461773] qla2x00_module_init+0x1be/0x229 [qla2xxx] +[ 12.468776] do_one_initcall+0x44/0x200 +[ 12.474401] ? load_module+0xad3/0xba0 +[ 12.479908] ? kmem_cache_alloc_trace+0x45/0x410 +[ 12.486268] do_init_module+0x5c/0x280 +[ 12.491730] __do_sys_init_module+0x12e/0x1b0 +[ 12.497785] do_syscall_64+0x3b/0x90 +[ 12.503029] entry_SYSCALL_64_after_hwframe+0x44/0xae +[ 12.509764] RIP: 0033:0x7f554f73ab2e + +Link: https://lore.kernel.org/r/20220110050218.3958-15-njavali@marvell.com +Cc: stable@vger.kernel.org +Reviewed-by: Himanshu Madhani +Signed-off-by: Saurav Kashyap +Signed-off-by: Nilesh Javali +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/qla2xxx/qla_init.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/scsi/qla2xxx/qla_init.c ++++ b/drivers/scsi/qla2xxx/qla_init.c +@@ -9143,7 +9143,7 @@ struct qla_qpair *qla2xxx_create_qpair(s + qpair->rsp->req = qpair->req; + qpair->rsp->qpair = qpair; + /* init qpair to this cpu. Will adjust at run time. */ +- qla_cpu_update(qpair, smp_processor_id()); ++ qla_cpu_update(qpair, raw_smp_processor_id()); + + if (IS_T10_PI_CAPABLE(ha) && ql2xenabledif) { + if (ha->fw_attributes & BIT_4) diff --git a/queue-5.10/scsi-qla2xxx-use-correct-feature-type-field-during-rff_id-processing.patch b/queue-5.10/scsi-qla2xxx-use-correct-feature-type-field-during-rff_id-processing.patch new file mode 100644 index 00000000000..c47fb741f5b --- /dev/null +++ b/queue-5.10/scsi-qla2xxx-use-correct-feature-type-field-during-rff_id-processing.patch @@ -0,0 +1,46 @@ +From a7e05f7a1bcbe4ee055479242de46c5c16ab03b1 Mon Sep 17 00:00:00 2001 +From: Manish Rangankar +Date: Thu, 10 Mar 2022 01:26:02 -0800 +Subject: scsi: qla2xxx: Use correct feature type field during RFF_ID processing + +From: Manish Rangankar + +commit a7e05f7a1bcbe4ee055479242de46c5c16ab03b1 upstream. + +During SNS Register FC-4 Features (RFF_ID) the initiator driver was sending +incorrect type field for NVMe supported device. Use correct feature type +field. + +Link: https://lore.kernel.org/r/20220310092604.22950-12-njavali@marvell.com +Fixes: e374f9f59281 ("scsi: qla2xxx: Migrate switch registration commands away from mailbox interface") +Cc: stable@vger.kernel.org +Reviewed-by: Himanshu Madhani +Signed-off-by: Manish Rangankar +Signed-off-by: Nilesh Javali +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/qla2xxx/qla_gs.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +--- a/drivers/scsi/qla2xxx/qla_gs.c ++++ b/drivers/scsi/qla2xxx/qla_gs.c +@@ -676,8 +676,7 @@ qla2x00_rff_id(scsi_qla_host_t *vha, u8 + return (QLA_SUCCESS); + } + +- return qla_async_rffid(vha, &vha->d_id, qlt_rff_id(vha), +- FC4_TYPE_FCP_SCSI); ++ return qla_async_rffid(vha, &vha->d_id, qlt_rff_id(vha), type); + } + + static int qla_async_rffid(scsi_qla_host_t *vha, port_id_t *d_id, +@@ -727,7 +726,7 @@ static int qla_async_rffid(scsi_qla_host + /* Prepare CT arguments -- port_id, FC-4 feature, FC-4 type */ + ct_req->req.rff_id.port_id = port_id_to_be_id(*d_id); + ct_req->req.rff_id.fc4_feature = fc4feature; +- ct_req->req.rff_id.fc4_type = fc4type; /* SCSI - FCP */ ++ ct_req->req.rff_id.fc4_type = fc4type; /* SCSI-FCP or FC-NVMe */ + + sp->u.iocb_cmd.u.ctarg.req_size = RFF_ID_REQ_SIZE; + sp->u.iocb_cmd.u.ctarg.rsp_size = RFF_ID_RSP_SIZE; diff --git a/queue-5.10/series b/queue-5.10/series index e222852cf19..ff9ae6c5b92 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -513,3 +513,23 @@ tracing-have-trace_define_enum-affect-trace-event-ty.patch mmc-host-return-an-error-when-enable_sdio_irq-ops-is.patch media-atomisp-fix-bad-usage-at-error-handling-logic.patch alsa-hda-realtek-add-alc256-samsung-headphone-fixup.patch +kvm-x86-mmu-check-for-present-spte-when-clearing-dirty-bit-in-tdp-mmu.patch +powerpc-kasan-fix-early-region-not-updated-correctly.patch +powerpc-lib-sstep-fix-sthcx-instruction.patch +powerpc-lib-sstep-fix-build-errors-with-newer-binutils.patch +powerpc-fix-build-errors-with-newer-binutils.patch +scsi-qla2xxx-fix-stuck-session-in-gpdb.patch +scsi-qla2xxx-fix-scheduling-while-atomic.patch +scsi-qla2xxx-fix-wrong-fdmi-data-for-64g-adapter.patch +scsi-qla2xxx-fix-warning-for-missing-error-code.patch +scsi-qla2xxx-fix-device-reconnect-in-loop-topology.patch +scsi-qla2xxx-add-devids-and-conditionals-for-28xx.patch +scsi-qla2xxx-check-for-firmware-dump-already-collected.patch +scsi-qla2xxx-suppress-a-kernel-complaint-in-qla_create_qpair.patch +scsi-qla2xxx-fix-disk-failure-to-rediscover.patch +scsi-qla2xxx-fix-incorrect-reporting-of-task-management-failure.patch +scsi-qla2xxx-fix-hang-due-to-session-stuck.patch +scsi-qla2xxx-fix-missed-dma-unmap-for-nvme-ls-requests.patch +scsi-qla2xxx-fix-n2n-inconsistent-plogi.patch +scsi-qla2xxx-reduce-false-trigger-to-login.patch +scsi-qla2xxx-use-correct-feature-type-field-during-rff_id-processing.patch