Re: [PATCH] usb: xhci-pci: Disable 64-bit DMA for VIA VL805
From: David Laight
Date: Fri Jun 26 2026 - 04:06:46 EST
On Thu, 25 Jun 2026 19:18:52 +0200
Michal Pecio <michal.pecio@xxxxxxxxx> wrote:
...
> Right, your addresses barely exceed the 36 bit limit. And I found why
> my chip behaved differently - 40 bit DMA was a firmware upgrade.
>
> After downgrading my controller from 00013704 to 00013600 it truncates
> addresses to 36 bits and fails like yours. And it's a pretty nasty bug,
> because some of those accesses are writes to scratchpad buffers, so
> without IOMMU the chip corrupts unrelated memory below 64GB.
>
> You can check your FW version with this one-liner:
> lspci -d 1106:3483 -xxx | awk '/^50:/ { print "VL805 FW version: " $5 $4 $3 $2 }'
>
> More about VL805 firmwares:
> https://github.com/jpmorrison/VL805
>
> One could ask whether 36 bits is low enough for all VL805, but I think
> it is because the bug is hard not to notice and nobody ever reported it
> on systems with less than 64 GB of RAM, even though 16 or 32 GB without
> IOMMU was a common option in DDR3 generation PCs, which is also about
> the era when this controller was introduced.
36 bits is just enough to support 32bit x86 with PAE.
Seems very short sighted.
IIRC xhci has a quite restrictive limit on address boundaries so supporting
larger addresses is just latches - there is no need for a 64bit counter.
Can you do a read-back of one of the control registers that contains
an address - if you are lucky the high bits will return zero.
That might let the generic code enforce a limit.
-- David
>
> Regards,
> Michal
>