From: Michal Pecio <michal.pecio@gmail.com>
To: Xincheng Zhang <zhangxincheng@ultrarisc.com>
Cc: cyrozap@gmail.com, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
mathias.nyman@intel.com
Subject: Re: [PATCH] usb: xhci-pci: Disable 64-bit DMA for VIA VL805
Date: Thu, 25 Jun 2026 02:04:21 +0200 [thread overview]
Message-ID: <20260625020421.2e577a94.michal.pecio@gmail.com> (raw)
In-Reply-To: <20260624070612.337013-1-zhangxincheng@ultrarisc.com>
On Wed, 24 Jun 2026 15:06:12 +0800, Xincheng Zhang wrote:
> Hi Michal,
>
> On 2026-06-23 12:18 +0200, Michal Pecio wrote:
> > But I don't like this abuse of the quirk. Firstly, it causes
> > unnecessary bouncing on systems with >4GB RAM and no IOMMU.
> > I found other drivers that use DMA_BIT_MASK(36) or even weirder
> > numbers, so it seems that we too could request 64 gigs exactly
> > with a bit of driver refactoring.
>
> Thanks for the review. I totally agree that using `DMA_BIT_MASK(36)`
> is a much better approach to avoid bounce buffers and register width
> issues.
By the way, are you sure that 64GB is the magic number and not 1TB?
I booted a common AMD64 box with iommu.forcedac=1 and instantly got
IOMMU faults, but the addresses were truncated to 40 bits, not 36.
I applied 40 bit DMA mask and my VL805 seems to work. I looked into
debugfs and many things are mapped close to 1TB, so I wonder if some
chips are better than others or maybe there are particular workloads
where VL805 truncates something to 36 bits? I tried a few, including
bulk, interrupt, isochronous and USB3 bulk streams.
How was this problem found? Do you have >64GB RAM and no IOMMU?
Or with IOMMU whose driver allocates mappings above 4GB?
Regards,
Michal
next prev parent reply other threads:[~2026-06-25 0:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-23 7:32 [PATCH] usb: xhci-pci: Disable 64-bit DMA for VIA VL805 Xincheng Zhang
2026-06-23 10:18 ` Michal Pecio
2026-06-24 5:26 ` Xincheng Zhang
2026-06-24 7:06 ` Xincheng Zhang
2026-06-25 0:04 ` Michal Pecio [this message]
2026-06-25 2:16 ` Xincheng Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260625020421.2e577a94.michal.pecio@gmail.com \
--to=michal.pecio@gmail.com \
--cc=cyrozap@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=zhangxincheng@ultrarisc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.