--- /dev/null
+From 8219d31effa7be5dbc7ff915d7970672e028c701 Mon Sep 17 00:00:00 2001
+From: Anders Roxell <anders.roxell@linaro.org>
+Date: Thu, 24 Feb 2022 17:22:15 +0100
+Subject: powerpc/lib/sstep: Fix build errors with newer binutils
+
+From: Anders Roxell <anders.roxell@linaro.org>
+
+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 <arnd@arndb.de>
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
+Reviewed-by: Segher Boessenkool <segher@kernel.crashing.org>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Link: https://lore.kernel.org/r/20220224162215.3406642-3-anders.roxell@linaro.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/powerpc/lib/sstep.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/arch/powerpc/lib/sstep.c
++++ b/arch/powerpc/lib/sstep.c
+@@ -908,7 +908,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" \
+@@ -921,7 +924,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" \
--- /dev/null
+From a633cb1edddaa643fadc70abc88f89a408fa834a Mon Sep 17 00:00:00 2001
+From: Anders Roxell <anders.roxell@linaro.org>
+Date: Thu, 24 Feb 2022 17:22:13 +0100
+Subject: powerpc/lib/sstep: Fix 'sthcx' instruction
+
+From: Anders Roxell <anders.roxell@linaro.org>
+
+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 <arnd@arndb.de>
+Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Link: https://lore.kernel.org/r/20220224162215.3406642-1-anders.roxell@linaro.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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
+@@ -2776,7 +2776,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:
--- /dev/null
+From 58ca5999e0367d131de82a75257fbfd5aed0195d Mon Sep 17 00:00:00 2001
+From: Quinn Tran <qutran@marvell.com>
+Date: Thu, 10 Mar 2022 01:25:52 -0800
+Subject: scsi: qla2xxx: Fix incorrect reporting of task management failure
+
+From: Quinn Tran <qutran@marvell.com>
+
+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 <himanshu.madhani@oracle.com>
+Signed-off-by: Quinn Tran <qutran@marvell.com>
+Signed-off-by: Nilesh Javali <njavali@marvell.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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
+@@ -1788,6 +1788,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",
--- /dev/null
+From 14cb838d245ae0d523b2f7804af5a02c22e79f5a Mon Sep 17 00:00:00 2001
+From: Nilesh Javali <njavali@marvell.com>
+Date: Sun, 9 Jan 2022 21:02:12 -0800
+Subject: scsi: qla2xxx: Fix warning for missing error code
+
+From: Nilesh Javali <njavali@marvell.com>
+
+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 <himanshu.madhani@oracle.com>
+Signed-off-by: Nilesh Javali <njavali@marvell.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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
+@@ -3095,6 +3095,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;
+ }
+
--- /dev/null
+From a60447e7d451df42c7bde43af53b34f10f34f469 Mon Sep 17 00:00:00 2001
+From: Saurav Kashyap <skashyap@marvell.com>
+Date: Sun, 9 Jan 2022 21:02:15 -0800
+Subject: scsi: qla2xxx: Suppress a kernel complaint in qla_create_qpair()
+
+From: Saurav Kashyap <skashyap@marvell.com>
+
+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 <himanshu.madhani@oracle.com>
+Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
+Signed-off-by: Nilesh Javali <njavali@marvell.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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
+@@ -8037,7 +8037,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)
media-hdpvr-initialize-dev-worker-at-hdpvr_register_.patch
tracing-have-trace_define_enum-affect-trace-event-ty.patch
mmc-host-return-an-error-when-enable_sdio_irq-ops-is.patch
+powerpc-lib-sstep-fix-sthcx-instruction.patch
+powerpc-lib-sstep-fix-build-errors-with-newer-binutils.patch
+scsi-qla2xxx-fix-warning-for-missing-error-code.patch
+scsi-qla2xxx-suppress-a-kernel-complaint-in-qla_create_qpair.patch
+scsi-qla2xxx-fix-incorrect-reporting-of-task-management-failure.patch