--- /dev/null
+From 79d330fbdffd8cee06d8bdf38d82cb62d8363a27 Mon Sep 17 00:00:00 2001
+From: Kashyap Desai <kashyap.desai@broadcom.com>
+Date: Wed, 4 Dec 2024 13:24:12 +0530
+Subject: RDMA/bnxt_re: Fix max SGEs for the Work Request
+
+From: Kashyap Desai <kashyap.desai@broadcom.com>
+
+commit 79d330fbdffd8cee06d8bdf38d82cb62d8363a27 upstream.
+
+Gen P7 supports up to 13 SGEs for now. WQE software structure
+can hold only 6 now. Since the max send sge is reported as
+13, the stack can give requests up to 13 SGEs. This is causing
+traffic failures and system crashes.
+
+Use the define for max SGE supported for variable size. This
+will work for both static and variable WQEs.
+
+Fixes: 227f51743b61 ("RDMA/bnxt_re: Fix the max WQE size for static WQE support")
+Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
+Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
+Link: https://patch.msgid.link/20241204075416.478431-2-kalesh-anakkur.purayil@broadcom.com
+Signed-off-by: Leon Romanovsky <leon@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/infiniband/hw/bnxt_re/qplib_fp.h | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/infiniband/hw/bnxt_re/qplib_fp.h
++++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.h
+@@ -113,7 +113,6 @@ struct bnxt_qplib_sge {
+ u32 size;
+ };
+
+-#define BNXT_QPLIB_QP_MAX_SGL 6
+ struct bnxt_qplib_swq {
+ u64 wr_id;
+ int next_idx;
+@@ -153,7 +152,7 @@ struct bnxt_qplib_swqe {
+ #define BNXT_QPLIB_SWQE_FLAGS_UC_FENCE BIT(2)
+ #define BNXT_QPLIB_SWQE_FLAGS_SOLICIT_EVENT BIT(3)
+ #define BNXT_QPLIB_SWQE_FLAGS_INLINE BIT(4)
+- struct bnxt_qplib_sge sg_list[BNXT_QPLIB_QP_MAX_SGL];
++ struct bnxt_qplib_sge sg_list[BNXT_VAR_MAX_SGE];
+ int num_sge;
+ /* Max inline data is 96 bytes */
+ u32 inline_len;
--- /dev/null
+From 3f030550476566b12091687c70071d05ad433e0d Mon Sep 17 00:00:00 2001
+From: Yihang Li <liyihang9@huawei.com>
+Date: Mon, 22 Jan 2024 14:25:45 +0800
+Subject: scsi: hisi_sas: Remove redundant checks for automatic debugfs dump
+
+From: Yihang Li <liyihang9@huawei.com>
+
+commit 3f030550476566b12091687c70071d05ad433e0d upstream.
+
+In commit 63f0733d07ce ("scsi: hisi_sas: Allocate DFX memory during dump
+trigger"), the memory allocation time of the DFX is changed from device
+initialization to dump occurs, so .debugfs_itct is not a valid address and
+do not need to check.
+
+The parameter hisi_sas_debugfs_enable is enough to check whether automatic
+debugfs dump is triggered, so remove redunant checks.
+
+Fixes: 63f0733d07ce ("scsi: hisi_sas: Allocate DFX memory during dump trigger")
+Signed-off-by: Yihang Li <liyihang9@huawei.com>
+Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
+Link: https://lore.kernel.org/r/1705904747-62186-3-git-send-email-chenxiang66@hisilicon.com
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/scsi/hisi_sas/hisi_sas_main.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
++++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
+@@ -1579,7 +1579,7 @@ static int hisi_sas_controller_prereset(
+ return -EPERM;
+ }
+
+- if (hisi_sas_debugfs_enable && hisi_hba->debugfs_itct[0].itct)
++ if (hisi_sas_debugfs_enable)
+ hisi_hba->hw->debugfs_snapshot_regs(hisi_hba);
+
+ return 0;
+@@ -1967,7 +1967,7 @@ static bool hisi_sas_internal_abort_time
+ struct hisi_hba *hisi_hba = dev_to_hisi_hba(device);
+ struct hisi_sas_internal_abort_data *timeout = data;
+
+- if (hisi_sas_debugfs_enable && hisi_hba->debugfs_itct[0].itct) {
++ if (hisi_sas_debugfs_enable) {
+ /*
+ * If timeout occurs in device gone scenario, to avoid
+ * circular dependency like:
mptcp-fix-recvbuffer-adjust-on-sleeping-rcvmsg.patch
mptcp-don-t-always-assume-copied-data-in-mptcp_cleanup_rbuf.patch
mptcp-prevent-excessive-coalescing-on-receive.patch
+rdma-bnxt_re-fix-max-sges-for-the-work-request.patch
+scsi-hisi_sas-remove-redundant-checks-for-automatic-debugfs-dump.patch