From bcfe1972b095cc7d293774cc774a94a3bf4219c5 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 6 Jan 2025 14:30:13 +0100 Subject: [PATCH] 6.6-stable patches added patches: rdma-bnxt_re-fix-max-sges-for-the-work-request.patch scsi-hisi_sas-remove-redundant-checks-for-automatic-debugfs-dump.patch --- ...re-fix-max-sges-for-the-work-request.patch | 46 ++++++++++++++++++ ...nt-checks-for-automatic-debugfs-dump.patch | 47 +++++++++++++++++++ queue-6.6/series | 2 + 3 files changed, 95 insertions(+) create mode 100644 queue-6.6/rdma-bnxt_re-fix-max-sges-for-the-work-request.patch create mode 100644 queue-6.6/scsi-hisi_sas-remove-redundant-checks-for-automatic-debugfs-dump.patch diff --git a/queue-6.6/rdma-bnxt_re-fix-max-sges-for-the-work-request.patch b/queue-6.6/rdma-bnxt_re-fix-max-sges-for-the-work-request.patch new file mode 100644 index 00000000000..7f8e70a9272 --- /dev/null +++ b/queue-6.6/rdma-bnxt_re-fix-max-sges-for-the-work-request.patch @@ -0,0 +1,46 @@ +From 79d330fbdffd8cee06d8bdf38d82cb62d8363a27 Mon Sep 17 00:00:00 2001 +From: Kashyap Desai +Date: Wed, 4 Dec 2024 13:24:12 +0530 +Subject: RDMA/bnxt_re: Fix max SGEs for the Work Request + +From: Kashyap Desai + +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 +Signed-off-by: Selvin Xavier +Link: https://patch.msgid.link/20241204075416.478431-2-kalesh-anakkur.purayil@broadcom.com +Signed-off-by: Leon Romanovsky +Signed-off-by: Greg Kroah-Hartman +--- + 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; diff --git a/queue-6.6/scsi-hisi_sas-remove-redundant-checks-for-automatic-debugfs-dump.patch b/queue-6.6/scsi-hisi_sas-remove-redundant-checks-for-automatic-debugfs-dump.patch new file mode 100644 index 00000000000..ad2aaf94e33 --- /dev/null +++ b/queue-6.6/scsi-hisi_sas-remove-redundant-checks-for-automatic-debugfs-dump.patch @@ -0,0 +1,47 @@ +From 3f030550476566b12091687c70071d05ad433e0d Mon Sep 17 00:00:00 2001 +From: Yihang Li +Date: Mon, 22 Jan 2024 14:25:45 +0800 +Subject: scsi: hisi_sas: Remove redundant checks for automatic debugfs dump + +From: Yihang Li + +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 +Signed-off-by: Xiang Chen +Link: https://lore.kernel.org/r/1705904747-62186-3-git-send-email-chenxiang66@hisilicon.com +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman +--- + 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: diff --git a/queue-6.6/series b/queue-6.6/series index 2c539a8521b..cfacdd8db61 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -221,3 +221,5 @@ mptcp-fix-tcp-options-overflow.patch 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 -- 2.47.3