Path: csiph.com!fu-berlin.de!bofh.it!news.nic.it!robomod From: Matt Mower Newsgroups: linux.debian.bugs.dist,linux.debian.kernel Subject: Bug#1107521: ath12k_pci errors and loss of connectivity in 6.12.y branch Date: Wed, 02 Jul 2025 07:30:01 +0200 Message-ID: References: X-Original-To: Vasant Hegde X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Wed Jul 2 05:21:08 2025 Old-Return-Path: X-Spam-Flag: NO X-Spam-Score: -3.096 Reply-To: Matt Mower , 1107521@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: Debian Kernel Team X-Debian-Pr-Message: followup 1107521 X-Debian-Pr-Package: src:linux X-Debian-Pr-Source: linux X-Forwarded-Encrypted: i=1; AJvYcCVkg3a0xLwxy3zpIuGqeKxqA0ADzDSnjAXOT+1b2PSIPEwXczqOV3bIQYWu8TQqL/v2T/gtjtsC@bugs.debian.org X-Gm-Message-State: AOJu0YxdyS0PPr6x0V9lRSNLwbaPPCMk4ApTM2QZFGJqBH6ENqrogD04 ezP63apNw1O0CJthT69CfvguttEUDzPVqTs3nHpq/pdOyyyy6HNB2ITpm2dRRkQZEOJWgfmXOXr eSQseQihOsGOMBj1RVk5HOiyeVNkjhWc= X-Gm-Gg: ASbGncsZK5903EM82i+tmfDSCXCxIuzYlMETd+OJKyw1mRM6oEoQ3S/0PEKYEv/5wZ8 BLTjUO1NAZTQRw4BlKLjPo0CHm319j/ZzpL3k3u2yTBcni/Ep4OZjNoNJmI39Co44YQFb6z05tG 6x9/xVp4+xRPFZmatvAqpwdjbi42U/tZHhO8a9VLr/ZzzgYCB66nxDq5z0gbHGd2jOonR7ZyJ5I Q== X-Google-SMTP-Source: AGHT+IEMkmdwzlSGJeAQ8PPaXllLIAjtkJJZeH3b5OICmbQtX7VsVL5Q9yjPcEMmQTvGVa8fRMj8QxumFogFy9cFkSg= X-Received: by 2002:a17:907:1ca3:b0:ad8:8529:4f8f with SMTP id a640c23a62f3a-ae3c2da9cdfmr117080666b.45.1751433479523; Tue, 01 Jul 2025 22:17:59 -0700 (PDT) MIME-Version: 1.0 X-Gm-Features: Ac12FXwNkOaqmG2BtbfIHH58QXlArNNvzinDBRJOE7pKkFaCFWQUgB-Rk0U9dvU Content-Type: text/plain; charset="UTF-8" X-Debian-Message: from BTS X-Mailing-List: archive/latest/1912154 List-ID: List-URL: Approved: robomod@news.nic.it Lines: 42 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: Robin Murphy , Baochen Qiang , Jeff Johnson , will@kernel.org, joro@8bytes.org, linux-wireless@vger.kernel.org, ath12k@lists.infradead.org, 1107521@bugs.debian.org, iommu@lists.linux.dev X-Original-Date: Tue, 1 Jul 2025 22:17:48 -0700 X-Original-Message-ID: X-Original-References: <0ba2176e-3339-4a8b-850a-ca5643939c8b@oss.qualcomm.com> <4a13d862-1bbb-4a98-bc1d-219bf78f7c0d@amd.com> <174939484316.7705.5967923154709480099.reportbug@AI360> <4a13d862-1bbb-4a98-bc1d-219bf78f7c0d@amd.com> Xref: csiph.com linux.debian.bugs.dist:1251628 linux.debian.kernel:88217 > A couple more things I'd try on the ath12k side: firstly, boot with > "iommu.strict=1" and see if that makes the faults any more > frequent/reproducible; The issue is easy enough to reproduce in 6.12.27 onward and I may be mistaken about the rarity in 6.12.22; I reproduced it relatively quickly in .22 today, so if this was the primary purpose for setting iommu.strict=1, then testing with or without strict works. FWIW, I did test iommu.strict=1 with 6.15.3 and still have not reproduced this issue there. > if a fault is fairly easily reproducible, then > use the DMA API and/or IOMMU API tracepoints to compare the fault > address to prior DMA mapping activity - that can usually reveal the > nature of the bug enough to then know what to go looking for. This is unfamiliar territory for me, so I hope the following is at least close to what you requested. If not, happy to provide more test results based on a set of instructions. Here's what I did: 1. Set CONFIG_DMA_API_DEBUG=y 2. Set kernel command line to: iommu.strict=1 log_buf_len=100M dma_debug_driver=ath12k_pci trace_event=dma:*,iommu:* 3. Booted and waited for page fault, then cat'd /sys/kernel/tracing/trace to a file. Additionally, though I'm pretty sure this is irrelevant now, I added logging after each dma_map_single() in the ath12k driver to print the function name and resultant address to the kernel log. Comparing the addresses of several io_page_fault lines in the trace and in the kernel log, they line up. So, I'm hopeful this is on the right track. DMA/IOMMU trace: https://cmphys.com/ath12k/iommu_dma_trace-20250701.log Kernel log with additional logging: https://cmphys.com/ath12k/dmesg-6.12.35-20250701.log Diff showing extra logging added to v6.12.35: https://cmphys.com/ath12k/ath12k-extra-logging-6.12.35-20250701.diff Thanks, Matt