stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Erhard Furtner <erhard_f@mailbox.org>
Cc: linux-usb@vger.kernel.org, Chris Snook <chris.snook@gmail.com>,
	stable@vger.kernel.org
Subject: Re: When VIA VL805/806 xHCI USB 3.0 Controller is present Atheros E2400 (alx) ethernet does not work: NETDEV WATCHDOG: enp5s0 (alx): transmit queue 2 timed out
Date: Wed, 29 Mar 2023 12:51:37 +0300	[thread overview]
Message-ID: <29514574-295a-3144-4779-396293d50964@linux.intel.com> (raw)
In-Reply-To: <20230326175851.6d1c7000@yea>

On 26.3.2023 18.58, Erhard Furtner wrote:
> On Mon, 20 Mar 2023 11:26:39 +0200
> Mathias Nyman <mathias.nyman@linux.intel.com> wrote:
> 
>> This could be related to another case with two xHC controllers, but different vendors.
>> Bus numbers were interleaved there as well. Removing the asynch probe helped:
>>
>> https://lore.kernel.org/linux-usb/d5ff9480-57bd-2c39-8b10-988ad0d14a7e@linux.intel.com/
>>
>> Does reverting:
>> 4c2604a9a689 usb: xhci-pci: Set PROBE_PREFER_ASYNCHRONOUS
>> help for you?
> 
> Ok, reverted 4c2604a9a689 usb: xhci-pci: Set PROBE_PREFER_ASYNCHRONOUS now but unfortunately didn't work out. New dmesg with the reverted commit attached.
> 
> Regards,
> Erhard

Closer look at dmesg shows we are stuck while trying to rest the VIA xHC during probe.
Driver times out after 10 seconds.

[    8.306783] xhci_hcd 0000:07:00.0: xHCI Host Controller
[    8.306791] xhci_hcd 0000:07:00.0: new USB bus registered, assigned bus number 10
[    8.311622] xhci_hcd 0000:07:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x000e address=0xce210880 flags=0x0000]
...
[   18.306812] xhci_hcd 0000:07:00.0: can't setup: -110
[   18.306830] xhci_hcd 0000:07:00.0: USB bus 10 deregistered
[   18.307005] xhci_hcd 0000:07:00.0: init 0000:07:00.0 fail, -110

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?

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
Mathias


  reply	other threads:[~2023-03-29  9:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-19  0:37 When VIA VL805/806 xHCI USB 3.0 Controller is present Atheros E2400 (alx) ethernet does not work: NETDEV WATCHDOG: enp5s0 (alx): transmit queue 2 timed out Erhard Furtner
2023-03-20  9:26 ` Mathias Nyman
2023-03-21 19:50   ` Erhard Furtner
2023-03-26 15:58   ` Erhard Furtner
2023-03-29  9:51     ` Mathias Nyman [this message]
2023-04-01 12:21       ` Erhard F.

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=29514574-295a-3144-4779-396293d50964@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=chris.snook@gmail.com \
    --cc=erhard_f@mailbox.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).