Re: [PATCH] usb: xhci-pci: Disable 64-bit DMA for VIA VL805

From: Xincheng Zhang

Date: Thu Jun 25 2026 - 22:10:18 EST


Hi Michal,

On 2026-06-25 19:18 +0200, Michal Pecio 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.

Thanks a lot for checking this on your side.

> 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

I checked the controller firmware on this machine:

VL805 FW version: 00013600

So it matches the firmware version where you reproduced the 36-bit
truncation.

> 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.

I agree. The scratchpad write corruption risk makes the conservative
limit especially important for no-IOMMU systems.

For v2 I changed the patch to avoid XHCI_NO_64BIT_SUPPORT. It now uses a
separate xHCI quirk for VL805/806 which sets the DMA mask and coherent
DMA mask to DMA_BIT_MASK(36), while leaving HCCPARAMS1.AC64 visible.

Regards,
Xincheng