Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > muc.lists.freebsd.emulation > #13163
| Path | csiph.com!2.eu.feeder.erje.net!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mail |
|---|---|
| From | bugzilla-noreply@freebsd.org |
| Newsgroups | muc.lists.freebsd.emulation |
| Subject | [Bug 297155] LinuxKPI: swapped busdma sync operations in the DMA_TO_DEVICE / DMA_FROM_DEVICE PRE-sync path break streaming DMA when a mapping bounces (breaks ath10k QCA6174 on >4GB machines) |
| Date | Thu, 10 Sep 2026 09:49:13 +0000 |
| Organization | Newsgate at muc.de e.V. |
| Sender | owner-freebsd-emulation@FreeBSD.org |
| Approved | news-admin@muc.de |
| Distribution | world |
| Message-ID | <bug-297155-4077-a2yoCDgJor@https.bugs.freebsd.org/bugzilla/> (permalink) |
| References | <bug-297155-4077@https.bugs.freebsd.org/bugzilla/> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset="UTF-8" |
| Content-Transfer-Encoding | quoted-printable |
| Injection-Info | news.muc.de; posting-host="news.muc.de:193.149.48.2"; logging-data="79920"; mail-complaints-to="news-admin@muc.de" |
| X-Original-To | emulation@mlmmj.nyi.freebsd.org |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789033753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=s1Y6wEhobzzuyDyA9sH2Z1//Hl4tGRPQaWhAzRFDCKE=; b=j1F5qARI3yJ/QnQstwglGWd3783kqJUphYheyvZDHkM3CdaqbXNMQXdpw/7yd82FT5RVib 3hliIiKM41D2E+gxIBslmtPbW+56H8A/wkaUmRQ8nW15zv59XHrSS4xmw/p6G3oAHkvgf1 66RaCSTdf0C0l7IfJTUoQ1y0Ue6dtA1XsVYrNw4guSLd/mdv/iMg6g5fxdGZWdmGq+IaOM iUMTxTh9dFzpgl+19tItPMXgY8PMlHoxNdxQYe40q0rBY5tdF5fI0rC0NAdPsJfipEkCMB 4stBKSHpDilVlAoNKnKDtz0noQTKa8KaSFZJ5I1RhuHAmhBNUoeNhxGnu0AWgQ== |
| X-Authentication-Warning | kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f |
| In-Reply-To | <bug-297155-4077@https.bugs.freebsd.org/bugzilla/> |
| Auto-Submitted | auto-generated |
| Precedence | list |
| X-Newsgate-Id | f02c70b8849f+ |
| X-No-Archive | Yes |
| Xref | csiph.com muc.lists.freebsd.emulation:13163 |
Show key headers only | View raw
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297155
--- Comment #4 from commit-hook@FreeBSD.org ---
A commit in branch stable/15 references this bug:
URL:
https://cgit.FreeBSD.org/src/commit/?id=361c6a6b93fde0c112158b74611c9712ec8683b7
commit 361c6a6b93fde0c112158b74611c9712ec8683b7
Author: Zishun Yi <zishun.yi.dev@gmail.com>
AuthorDate: 2026-09-04 19:11:35 +0000
Commit: Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2026-09-10 09:46:54 +0000
LinuxKPI: Fix DMA_BIDIRECTIONAL and other mappings
In dma_sync_single_for_cpu(), the DMA_BIDIRECTIONAL direction currently
performs BUS_DMASYNC_POSTREAD followed by BUS_DMASYNC_PREREAD. This
patch corrects the mapping to use BUS_DMASYNC_POSTREAD |
BUS_DMASYNC_POSTWRITE.
When ownership of the DMA area is transferred to the CPU, we must assume
the previous device access was bidirectional. Both POST operations are
necessary to ensure the CPU sees a consistent view of memory after
potential device reads and writes. A PREREAD is unnecessary here because
the device will no longer access the memory since ownership has been
transferred to the CPU.
Conversely, for dma_sync_single_for_device(), ownership is being
transferred back to the hardware. The buffer must be prepared for
potential bidirectional access by the device, requiring
BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE.
PR: 293381, 297155
Reported by: Zishun Yi <zishun.yi.dev@gmail.com>
Reported by: Kim Shrier (fbsdbugs westryn.net)
Fixes: 95edb10b47fc ("LinuxKPI: implement dma_sync_single_for_*,
apply to (un)map single/sg")
Signed-off-by: Zishun Yi <zishun.yi.dev@gmail.com>
Reviewed by: aokblast, bz
Differential Revision: https://reviews.freebsd.org/D55497
(cherry picked from commit 6e1436d748273be52fb155914db3efae075a8619)
sys/compat/linuxkpi/common/include/linux/dma-mapping.h | 10 ++++------
sys/compat/linuxkpi/common/src/linux_pci.c | 15 ++++++++-------
2 files changed, 12 insertions(+), 13 deletions(-)
--
You are receiving this mail because:
You are the assignee for the bug.
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Back to muc.lists.freebsd.emulation | Previous | Next | Find similar | Unroll thread
[Bug 297155] LinuxKPI: swapped busdma sync operations in the DMA_TO_DEVICE / DMA_FROM_DEVICE PRE-sync path break streaming DMA when a mapping bounces (breaks ath10k QCA6174 on >4GB machines) bugzilla-noreply@freebsd.org - 2026-09-10 09:49 +0000
csiph-web