From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795913006; b=NKLkyNe6xJgzpeNDZrlSxW0jH/L+N31qX8/AdDzisIWSgw9uYKeVeuYRMmM945Mw/TB+ QJgtDU9Aaz8rErDFTKQSZnavjJ9YgHJljGxhdUEZUzcV2AAXVi54VyoMrbpgH+MdxoBaz cRT325sexl7Ym7jE25jDIyTXKDwaqeytr3vx0dnepDdG4E/ht1pq84kaN2W3UcxCi4u0h QXTsHTIHu6JD0d6hJYcg1H3mo/U/Zd30achiKSOdcsorhjYduXV5iTXQzuwnSBMDwO1k1 PUhvUXBDqiLOURgGE9uJl3aoRZ5m99AuwX0fhS0SFMYqfceqyZAwryncQrNa8HDzixw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795913006; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=KwGyaAorctlNpw6s/ccJLVJGBpR4ZfRxBzjXCzJ8E0M=; b=3YgeWzh35llKl/zvA7mKSKmhGg5p0gwAy8NhPBZYJ9YkNW3klcB0SrcmKDZk/aUeciDY aAvassb3sd60WOkjEZ9kZsDQL39SlwpYtNRYUKRGzheq1bPlpphvln/exU+nYDIvKhdbK ss2mGcS9EPLZTo26HlMI576KxiBnIJTi9Y3g4wS4FJesBh6Lm6lTzaPWKB5D470Q3htHK 1I85ghwwmD+XXs9rYy5Px4Emz4KHxFfHxHJ9yuKmqmke6FzR1MUn5Ocyz+No/4czFfwZg gCO62DcoppK4g+0l2a5BzWvMMUfmLIlUMYgcVoij2DOQd/Af+UjJspjuuEvGqFwM42g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Kboig8DP; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 936AD606A32F; Sun, 29 Nov 2026 00:43:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Kboig8DP Received: by smtp.kernel.org (Postfix) with ESMTPSA id 343471F008A0; Sun, 29 Nov 2026 00:43:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795913006; bh=KwGyaAorctlNpw6s/ccJLVJGBpR4ZfRxBzjXCzJ8E0M=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=Kboig8DP1kw1K+QZWF6fXqPVlLvuXCEDj6gXVCMU9PP6VZALjStEEx+SqYIFpgm4p M4cOduSflDbzudkpvT2PYWwTExuFZtpXH7vBdmm8mHdzMqDwPkltDlhYqmYBduP1z7 tXktNSkwxPQkExfqAH3GzzlQs5OX9ThkqrlVfeHRgl6pRAjnZASj5mRaY+dTWEsm60 r6ma2F5P8+q490cz0GTzYWes8RkZQ/z99IJI4YXfhdZDO7Mz5USwRCfk2JZ7L01GxL AO/5XtbNG8n0uwWBaJETxRS46Me7ArDv/VxSh6Btscg1CKIVcJZSh+9zC7jtgIaYtA Q5FQmQ4DXBcig== Subject: Re: [PATCH net-next 3/3] net: ipa: add SC8180X (IPA v4.1) configuration data From: netdev-bot+sashiko@kernel.org To: robertijtsma@gmail.com Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, elder@kernel.org, linux-arm-msm@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Date: Sun, 29 Nov 2026 00:43:24 +0000 Message-ID: <179591300475.3135.15176256386181966968@kernel.org> In-Reply-To: <20261125-qcom-ipa-sc8180x-v1-3-48a889acbe6b@gmail.com> References: <20261125-qcom-ipa-sc8180x-v1-3-48a889acbe6b@gmail.com> X-sashiko-severity: High Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Thank you for your contribution! Sashiko AI review found 5 potential issue(s) to consider. Critical: 0 · High: 1 · Medium: 1 · Low: 3 If you believe none of the issues are legitimate, please reply to each issue of Medium severity or higher and explain why the AI is wrong. If any of them are legitimate and you plan to respin, please let patchwork know by including "pw-bot: cr" as a separate line at the end of your reply (one such reply per series is enough). - [High] net: ipa: tre_count exceeds event_count on v4.1 AP_COMMAND_TX channel - [Medium] The copyright header in the new file drivers/net/ipa/data/ipa_data-v4.1.c (line 4) reads `Copyright (C)… - [Low] The commit message says "Register offsets and endpoint/resource limits are derived from the downstream Qualcomm msm-4.14 poipu/sm8150… - [Low] In the ipa_mem_local_data[] table in drivers/net/ipa/data/ipa_data-v4.1.c, the comment that explains the… - [Low] net: ipa: unused resource enums, raw BCR hex, and extra modem endpoints -- net: ipa: add SC8180X (IPA v4.1) configuration data This commit adds an IPA v4.1 configuration table (ipa_data_v4_1) for SC8180X. The table covers endpoints, resource groups, IPA-local memory regions, IMEM, interconnects and backward compatibility. It binds the table to the qcom,sc8180x-ipa compatible and adds 4.1 to IPA_DATA_VERSIONS in the Makefile. > Register offsets and endpoint/resource limits are derived from the > downstream Qualcomm msm-4.14 poipu/sm8150 IPA v4.1 driver and SC8180X > devicetree tables, adapted to the upstream ipa_mem_data layout. [Severity: Low] Is the mention of register offsets accurate here? The patch doesn't seem to add any register definitions. IPA_REG_VERSIONS in drivers/net/ipa/Makefile already contains 4.1, and ipa_reg_regs() in ipa_reg.c already handles this version: case IPA_VERSION_4_1: return &ipa_regs_v4_1; gsi_reg.c also already has a case IPA_VERSION_4_1 entry. The only Makefile change adds 4.1 to IPA_DATA_VERSIONS. So the patch seems to add only platform data and reuse the existing v4.1 register definitions. Does the phrase refer to the IPA-local memory region offsets? If so, could the commit message say that instead? > diff --git a/drivers/net/ipa/data/ipa_data-v4.1.c b/drivers/net/ipa/data/ipa_data-v4.1.c > new file mode 100644 > index 0000000000000..9b52c60b5cc7f > --- /dev/null > +++ b/drivers/net/ipa/data/ipa_data-v4.1.c > @@ -0,0 +1,319 @@ > +// SPDX-License-Identifier: GPL-2.0 > + > +/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. > + * Copyright (C) 2026 Robin Snyders > + */ [Severity: Medium] Who is Robin Snyders? The commit has one author and one Signed-off-by, both Robert Ijtsma . There is no Co-developed-by tag, and the commit message doesn't mention a second contributor. If Robin Snyders wrote part of this file, then Documentation/process/submitting-patches.rst requires a Co-developed-by tag and a Signed-off-by from that person. If it's the same person under another name, or a line left over from another tree, should the copyright line be corrected? [ ... ] > +/* IPA-resident memory region data for an SoC having IPA v4.1 */ > +static const struct ipa_mem ipa_mem_local_data[] = { [ ... ] > + { .id = IPA_MEM_MODEM_HEADER, .offset = 0x0688, .size = 0x0140, .canary_count = 2, }, > + /* No AP_HEADER: original size0, omitted for6.3.8 zero-region validation. */ [Severity: Low] This isn't a bug, but this comment looks garbled. It is missing spaces ("size0", "for6.3.8"). The "6.3.8" looks like a version from an out-of-tree development branch and means nothing upstream. Leaving the region out is fine. ipa_mem_valid_one() in ipa_mem.c rejects a region that has neither a size nor canaries: if (!mem->size && !mem->canary_count) { dev_err(dev, "empty memory region %u\n", mem_id); Could the comment just say that AP_HEADER has size zero on this platform and is left out for that reason? > + { .id = IPA_MEM_MODEM_PROC_CTX, .offset = 0x07d0, .size = 0x0200, .canary_count = 2, }, [ ... ] > @@ -0,0 +1,319 @@ > +// SPDX-License-Identifier: GPL-2.0 > + > +/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. > + * Copyright (C) 2026 Robin Snyders > + */ > + > +#include > +#include > + > +#include "../ipa_data.h" > +#include "../ipa_endpoint.h" > +#include "../ipa_mem.h" > +#include "../ipa_version.h" > + > +/** enum ipa_resource_type - IPA resource types for an SoC having IPA v4.1 */ > +enum ipa_resource_type { [Severity: Low] A few things in this file differ from the other ipa_data-v*.c files, and one of them changes behavior. enum ipa_resource_type is declared but never used. ipa_resource_src[] and ipa_resource_dst[] use positional entries with .limits[0] through .limits[3]. The other data files use [IPA_RESOURCE_TYPE_*] and .limits[IPA_RSRC_GROUP_*] designated initializers. The result is the same today, but a reordered or missing entry would silently move limits to the wrong resource type or group. Could these use the enums? backward_compat is the raw value 0x39. That decodes to BIT(BCR_CMDQ_L_LACK_ONE_ENTRY) | BIT(BCR_SUSPEND_L2_IRQ) | BIT(BCR_HOLB_DROP_L2_IRQ) | BIT(BCR_DUAL_TX), using enum ipa_bcr_compat in ipa_reg.h. Writing it that way would match the other data files and make it easier to check against the hardware docs. The one that changes behavior is IPA_ENDPOINT_MODEM_COMMAND_TX and IPA_ENDPOINT_MODEM_LAN_RX. Neither has filter_support, and nothing else in the table refers to them. As far as I can tell, only the v4.2 data defines these two. gsi_channel_init() has the AP allocate modem channels only for IPA v4.2, and that is why they are needed there. On v4.1 they still count as defined modem endpoints. So ipa_endpoint_modem_pause_all(), ipa_endpoint_modem_exception_reset_all() and ipa_endpoint_modem_hol_block_clear_all() will program delay, suspend, HOLB and the status register on them from the AP when the modem stops or crashes. Should the AP touch these modem-owned endpoints on SC8180X? If not, could the two entries be dropped? > + /* Source resource types; first must have value 0 */ > + IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS = 0, > + IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_LISTS, > + IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_BUFF, > + IPA_RESOURCE_TYPE_SRC_HPS_DMARS, > + IPA_RESOURCE_TYPE_SRC_ACK_ENTRIES, > + > + /* Destination resource types; first must have value 0 */ > + IPA_RESOURCE_TYPE_DST_DATA_SECTORS = 0, > + IPA_RESOURCE_TYPE_DST_DPS_DMARS, > +}; > + > +/* Resource groups used for an SoC having IPA v4.1 */ > +enum ipa_rsrc_group_id { > + /* Source resource group identifiers */ > + IPA_RSRC_GROUP_SRC_LWA_DL = 0, > + IPA_RSRC_GROUP_SRC_UL_DL, > + IPA_RSRC_GROUP_SRC_UNUSED_2, > + IPA_RSRC_GROUP_SRC_UC_RX_Q, > + IPA_RSRC_GROUP_SRC_COUNT, /* Last in set; not a source group */ > + > + /* Destination resource group identifiers */ > + IPA_RSRC_GROUP_DST_LWA_DL = 0, > + IPA_RSRC_GROUP_DST_UL_DL_DPL, > + IPA_RSRC_GROUP_DST_UNUSED_2, > + IPA_RSRC_GROUP_DST_UC_RX_Q, > + IPA_RSRC_GROUP_DST_COUNT, /* Last; not a destination group */ > +}; > + > +/* QSB configuration data for an SoC having IPA v4.1 */ > +static const struct ipa_qsb_data ipa_qsb_data[] = { > + [IPA_QSB_MASTER_DDR] = { > + .max_writes = 8, > + .max_reads = 12, > + }, > + [IPA_QSB_MASTER_PCIE] = { > + .max_writes = 4, > + .max_reads = 12, > + }, > +}; > + > +/* Endpoint data for an SoC having IPA v4.1 */ > +static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = { > + [IPA_ENDPOINT_AP_COMMAND_TX] = { > + .ee_id = GSI_EE_AP, > + .channel_id = 4, > + .endpoint_id = 5, > + .toward_ipa = true, > + .channel = { > + .tre_count = 512, > + .event_count = 256, > + .tlv_count = 20, > + }, > + .endpoint = { > + .config = { > + .resource_group = IPA_RSRC_GROUP_SRC_UL_DL, > + .dma_mode = true, > + .dma_endpoint = IPA_ENDPOINT_AP_LAN_RX, > + .tx = { > + .seq_type = IPA_SEQ_DMA, > + }, > + }, > + }, > + }, > + [IPA_ENDPOINT_AP_LAN_RX] = { > + .ee_id = GSI_EE_AP, > + .channel_id = 5, > + .endpoint_id = 10, > + .toward_ipa = false, > + .channel = { > + .tre_count = 256, > + .event_count = 256, > + .tlv_count = 9, > + }, > + .endpoint = { > + .config = { > + .resource_group = IPA_RSRC_GROUP_DST_UL_DL_DPL, > + .aggregation = true, > + .status_enable = true, > + .rx = { > + .buffer_size = 8192, > + .pad_align = ilog2(sizeof(u32)), > + .aggr_time_limit = 500, > + }, > + }, > + }, > + }, > + [IPA_ENDPOINT_AP_MODEM_TX] = { > + .ee_id = GSI_EE_AP, > + .channel_id = 3, > + .endpoint_id = 2, > + .toward_ipa = true, > + .channel = { > + .tre_count = 512, > + .event_count = 512, > + .tlv_count = 16, > + }, > + .endpoint = { > + .filter_support = true, > + .config = { > + .resource_group = IPA_RSRC_GROUP_SRC_UL_DL, > + .checksum = true, > + .qmap = true, > + .status_enable = true, > + .tx = { > + .seq_type = IPA_SEQ_2_PASS_SKIP_LAST_UC, > + .seq_rep_type = IPA_SEQ_REP_DMA_PARSER, > + .status_endpoint = > + IPA_ENDPOINT_MODEM_AP_RX, > + }, > + }, > + }, > + }, > + [IPA_ENDPOINT_AP_MODEM_RX] = { > + .ee_id = GSI_EE_AP, > + .channel_id = 6, > + .endpoint_id = 11, > + .toward_ipa = false, > + .channel = { > + .tre_count = 256, > + .event_count = 256, > + .tlv_count = 9, > + }, > + .endpoint = { > + .config = { > + .resource_group = IPA_RSRC_GROUP_DST_UL_DL_DPL, > + .checksum = true, > + .qmap = true, > + .aggregation = true, > + .rx = { > + .buffer_size = 8192, > + .aggr_time_limit = 500, > + .aggr_close_eof = true, > + }, > + }, > + }, > + }, > + [IPA_ENDPOINT_MODEM_COMMAND_TX] = { > + .ee_id = GSI_EE_MODEM, > + .channel_id = 1, > + .endpoint_id = 4, > + .toward_ipa = true, > + }, > + [IPA_ENDPOINT_MODEM_LAN_RX] = { > + .ee_id = GSI_EE_MODEM, > + .channel_id = 4, > + .endpoint_id = 14, > + .toward_ipa = false, > + }, > + [IPA_ENDPOINT_MODEM_AP_TX] = { > + .ee_id = GSI_EE_MODEM, > + .channel_id = 0, > + .endpoint_id = 3, > + .toward_ipa = true, > + .endpoint = { > + .filter_support = true, > + }, > + }, > + [IPA_ENDPOINT_MODEM_AP_RX] = { > + .ee_id = GSI_EE_MODEM, > + .channel_id = 3, > + .endpoint_id = 13, > + .toward_ipa = false, > + }, > +}; > + > +/* Source resource configuration data for an SoC having IPA v4.1 */ > +static const struct ipa_resource ipa_resource_src[] = { > + { > + .limits[0] = { .min = 1, .max = 63 }, > + .limits[1] = { .min = 1, .max = 63 }, > + .limits[2] = { .min = 0, .max = 0 }, > + .limits[3] = { .min = 1, .max = 63 }, > + }, > + { > + .limits[0] = { .min = 10, .max = 10 }, > + .limits[1] = { .min = 10, .max = 10 }, > + .limits[2] = { .min = 0, .max = 0 }, > + .limits[3] = { .min = 8, .max = 8 }, > + }, > + { > + .limits[0] = { .min = 12, .max = 12 }, > + .limits[1] = { .min = 14, .max = 14 }, > + .limits[2] = { .min = 0, .max = 0 }, > + .limits[3] = { .min = 8, .max = 8 }, > + }, > + { > + .limits[0] = { .min = 0, .max = 63 }, > + .limits[1] = { .min = 0, .max = 63 }, > + .limits[2] = { .min = 0, .max = 63 }, > + .limits[3] = { .min = 0, .max = 63 }, > + }, > + { > + .limits[0] = { .min = 14, .max = 14 }, > + .limits[1] = { .min = 20, .max = 20 }, > + .limits[2] = { .min = 0, .max = 0 }, > + .limits[3] = { .min = 14, .max = 14 }, > + }, > +}; > + > +/* Destination resource configuration data for an SoC having IPA v4.1 */ > +static const struct ipa_resource ipa_resource_dst[] = { > + { > + .limits[0] = { .min = 4, .max = 4 }, > + .limits[1] = { .min = 4, .max = 4 }, > + .limits[2] = { .min = 3, .max = 3 }, > + .limits[3] = { .min = 2, .max = 2 }, > + }, > + { > + .limits[0] = { .min = 2, .max = 63 }, > + .limits[1] = { .min = 1, .max = 63 }, > + .limits[2] = { .min = 1, .max = 2 }, > + .limits[3] = { .min = 0, .max = 2 }, > + }, > +}; > + > +/* Resource configuration data for an SoC having IPA v4.1 */ > +static const struct ipa_resource_data ipa_resource_data = { > + .rsrc_group_src_count = IPA_RSRC_GROUP_SRC_COUNT, > + .rsrc_group_dst_count = IPA_RSRC_GROUP_DST_COUNT, > + .resource_src_count = ARRAY_SIZE(ipa_resource_src), > + .resource_src = ipa_resource_src, > + .resource_dst_count = ARRAY_SIZE(ipa_resource_dst), > + .resource_dst = ipa_resource_dst, > +}; > + > +/* IPA-resident memory region data for an SoC having IPA v4.1 */ > +static const struct ipa_mem ipa_mem_local_data[] = { > + { .id = IPA_MEM_UC_SHARED, .offset = 0x0000, .size = 0x0080, .canary_count = 0, }, > + { .id = IPA_MEM_UC_INFO, .offset = 0x0080, .size = 0x0200, .canary_count = 0, }, > + { .id = IPA_MEM_V4_FILTER_HASHED, .offset = 0x0288, .size = 0x0078, .canary_count = 2, }, > + { .id = IPA_MEM_V4_FILTER, .offset = 0x0308, .size = 0x0078, .canary_count = 2, }, > + { .id = IPA_MEM_V6_FILTER_HASHED, .offset = 0x0388, .size = 0x0078, .canary_count = 2, }, > + { .id = IPA_MEM_V6_FILTER, .offset = 0x0408, .size = 0x0078, .canary_count = 2, }, > + { .id = IPA_MEM_V4_ROUTE_HASHED, .offset = 0x0488, .size = 0x0078, .canary_count = 2, }, > + { .id = IPA_MEM_V4_ROUTE, .offset = 0x0508, .size = 0x0078, .canary_count = 2, }, > + { .id = IPA_MEM_V6_ROUTE_HASHED, .offset = 0x0588, .size = 0x0078, .canary_count = 2, }, > + { .id = IPA_MEM_V6_ROUTE, .offset = 0x0608, .size = 0x0078, .canary_count = 2, }, > + { .id = IPA_MEM_MODEM_HEADER, .offset = 0x0688, .size = 0x0140, .canary_count = 2, }, > + /* No AP_HEADER: original size0, omitted for6.3.8 zero-region validation. */ > + { .id = IPA_MEM_MODEM_PROC_CTX, .offset = 0x07d0, .size = 0x0200, .canary_count = 2, }, > + { .id = IPA_MEM_AP_PROC_CTX, .offset = 0x09d0, .size = 0x0200, .canary_count = 0, }, > + { .id = IPA_MEM_PDN_CONFIG, .offset = 0x0bd8, .size = 0x0050, .canary_count = 2, }, > + { .id = IPA_MEM_STATS_QUOTA_MODEM, .offset = 0x0c30, .size = 0x0060, .canary_count = 2, }, > + { .id = IPA_MEM_STATS_TETHERING, .offset = 0x0c90, .size = 0x0140, .canary_count = 0, }, > + { .id = IPA_MEM_STATS_V4_FILTER, .offset = 0x0dd0, .size = 0x0180, .canary_count = 0, }, > + { .id = IPA_MEM_STATS_V6_FILTER, .offset = 0x0f50, .size = 0x0180, .canary_count = 0, }, > + { .id = IPA_MEM_STATS_V4_ROUTE, .offset = 0x10d0, .size = 0x0180, .canary_count = 0, }, > + { .id = IPA_MEM_STATS_V6_ROUTE, .offset = 0x1250, .size = 0x0180, .canary_count = 0, }, > + { .id = IPA_MEM_STATS_DROP, .offset = 0x13d0, .size = 0x0020, .canary_count = 0, }, > + { .id = IPA_MEM_MODEM, .offset = 0x13f0, .size = 0x100c, .canary_count = 0, }, > + { .id = IPA_MEM_UC_EVENT_RING, .offset = 0x2400, .size = 0x0400, .canary_count = 1, }, > +}; > + > +/* Memory configuration data for an SoC having IPA v4.1 */ > +static const struct ipa_mem_data ipa_mem_data = { > + .local_count = ARRAY_SIZE(ipa_mem_local_data), > + .local = ipa_mem_local_data, > + .imem_addr = 0x146bd000, > + .imem_size = 0x00002000, > + .smem_size = 0x00002000, > +}; > + > +/* Interconnect bandwidths are in 1000 byte/second units */ > +static const struct ipa_interconnect_data ipa_interconnect_data[] = { > + { > + .name = "memory", > + .peak_bandwidth = 600000, /* 600 MBps */ > + .average_bandwidth = 80000, /* 80 MBps */ > + }, > + /* Average bandwidth is unused for the next two interconnects */ > + { > + .name = "imem", > + .peak_bandwidth = 350000, /* 350 MBps */ > + .average_bandwidth = 0, /* unused */ > + }, > + { > + .name = "config", > + .peak_bandwidth = 40000, /* 40 MBps */ > + .average_bandwidth = 0, /* unused */ > + }, > +}; > + > +/* Clock and interconnect configuration data for an SoC having IPA v4.1 */ > +static const struct ipa_power_data ipa_power_data = { > + .core_clock_rate = 100 * 1000 * 1000, /* Hz */ > + .interconnect_count = ARRAY_SIZE(ipa_interconnect_data), > + .interconnect_data = ipa_interconnect_data, > +}; > + > +/* Configuration data for an SoC having IPA v4.1 */ > +const struct ipa_data ipa_data_v4_1 = { > + .version = IPA_VERSION_4_1, > + .backward_compat = 0x39, > + .qsb_count = ARRAY_SIZE(ipa_qsb_data), > + .qsb_data = ipa_qsb_data, > + .modem_route_count = 8, > + .endpoint_count = ARRAY_SIZE(ipa_gsi_endpoint_data), > + .endpoint_data = ipa_gsi_endpoint_data, > + .resource_data = &ipa_resource_data, > + .mem_data = &ipa_mem_data, > + .power_data = &ipa_power_data, > +}; [Severity: High] Does the AP_COMMAND_TX channel really need 512 TREs with only 256 events? As far as I can see, the other v4.x and v5.x data files use 256 for both on this channel. This value causes an out-of-bounds access, not just a warning. gsi_channel_init_one() sees data->channel.tre_count greater than data->channel.event_count. It warns on every probe that the channel is limited to 256 TREs and sets channel->tre_count to 256. It then calls gsi_ring_alloc() with the unclamped data->channel.tre_count. So channel->tre_ring.count becomes 512, and gsi_channel_program() sets up the hardware ring with 512 elements. gsi_channel_trans_init() sizes trans_info->map from channel->tre_count, so the map has only 256 slots. gsi_trans_map() and gsi_channel_trans_mapped() index it with index % channel->tre_ring.count, which is modulo 512. The command channel is never reset at runtime. Its tre_ring.index keeps growing through ipa_setup() and every modem stop or crash recovery. Once the index passes 256, those helpers read and write past the end of the map array. That needs enough command transactions, so short testing can easily miss it. Could tre_count be 256 here, as on the other platforms? If the downstream driver really needs 512 command TREs, event_count would have to be raised to match. -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261125-qcom-ipa-sc8180x-v1-0-48a889acbe6b%40gmail.com