On Wed, 29 Mar 2023 12:51:37 +0300 Mathias Nyman mathias.nyman@linux.intel.com wrote:
There is also a IOMMU entry in the log at the same time driver starts resetting the xHC. There have been some other hosts that triggered IOMMU issues when host tried to access a partial 64 bit DMA address immediately after driver wrote first 32 bits.
Did this VIA xHC work with any older kernel, if yes, any chance you could bisect this?
Not as long I got this machine about 3 yrs ago. But I did notice the issue at that time and my 'solution' was to put a different Renesas chipset based PCIe card in for USB 3 and disable the onboard VIA one. Now as I needed this PCIe USB-card on another machine I stumbled over this issue again...
But I can try to check out if it works on an older LTS kernel anyway and start a bisect from there on. This will take some time of course... Would there be a particularly good starting point for an older kernel? Please let me know if yes.
Also possible that this host would work with a 32 bit DMA mask, hack:
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 6183ce8574b1..e5b7700a807f 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -5408,7 +5408,7 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks) /* Set dma_mask and coherent_dma_mask to 64-bits, * if xHC supports 64-bit addressing */
if (HCC_64BIT_ADDR(xhci->hcc_params) &&
if (0 && HCC_64BIT_ADDR(xhci->hcc_params) && !dma_set_mask(dev, DMA_BIT_MASK(64))) { xhci_dbg(xhci, "Enabling 64-bit DMA addresses.\n"); dma_set_coherent_mask(dev, DMA_BIT_MASK(64));
Thanks for taking a look Mathias!
Unfortunately this 32 bit DMA mask hack does not work out either, the issue still persists. dmesg attached.
Regards, Erhard