linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Ingmar Klein <ingmar_klein@web.de>
Cc: bhelgaas@google.com, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: QCA6174 pcie wifi: Add pci quirks
Date: Tue, 14 Sep 2021 16:11:23 -0500	[thread overview]
Message-ID: <20210914211123.GA1457901@bjorn-Precision-5520> (raw)
In-Reply-To: <08982e05-b6e8-5a8d-24ab-da1488ee50a8@web.de>

On Fri, Apr 09, 2021 at 11:26:33AM +0200, Ingmar Klein wrote:
> Edit: Retry, as I did not consider, that my mail-client would make this
> party html.
> 
> Dear maintainers,
> I recently encountered an issue on my Proxmox server system, that
> includes a Qualcomm QCA6174 m.2 PCIe wifi module.
> https://deviwiki.com/wiki/AIRETOS_AFX-QCA6174-NX
> 
> On system boot and subsequent virtual machine start (with passed-through
> QCA6174), the VM would just freeze/hang, at the point where the ath10k
> driver loads.
> Quick search in the proxmox related topics, brought me to the following
> discussion, which suggested a PCI quirk entry for the QCA6174 in the kernel:
> https://forum.proxmox.com/threads/pcie-passthrough-freezes-proxmox.27513/
> 
> I then went ahead, got the Proxmox kernel source (v5.4.106) and applied
> the attached patch.
> Effect was as hoped, that the VM hangs are now gone. System boots and
> runs as intended.
> 
> Judging by the existing quirk entries for Atheros, I would think, that
> my proposed "fix" could be included in the vanilla kernel.
> As far as I saw, there is no entry yet, even in the latest kernel sources.
> 
> Thank you very much!
> Best regards,
> Ingmar

I wrote a commit log and applied this to pci/virtualization for v5.16
with Pali's reviewed-by and your signed-off-by from
https://lore.kernel.org/r/408e5b45-3eaa-fa13-318d-48f7d1ecdacf@web.de

    PCI: Mark Atheros QCA6174 to avoid bus reset
    
    When passing the Atheros QCA6174 through to a virtual machine, the VM hangs
    at the point where the ath10k driver loads.
    
    Add a quirk to avoid bus resets on this device, which avoids the hang.
    
    [bhelgaas: commit log]
    Link: https://lore.kernel.org/r/08982e05-b6e8-5a8d-24ab-da1488ee50a8@web.de
    Signed-off-by: Ingmar Klein <ingmar_klein@web.de>
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
    Reviewed-by: Pali Rohár <pali@kernel.org>
    Cc: stable@vger.kernel.org

Thank you!

> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index 706f27a86a8e..ecfe80ec5b9c 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -3584,6 +3584,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0032, quirk_no_bus_reset);
>  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x003c, quirk_no_bus_reset);
>  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0033, quirk_no_bus_reset);
>  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0034, quirk_no_bus_reset);
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x003e, quirk_no_bus_reset);
>  
>  /*
>   * Root port on some Cavium CN8xxx chips do not successfully complete a bus


      parent reply	other threads:[~2021-09-14 21:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <d74205a4-8a69-c383-e265-1ed5b8508422@web.de>
2021-04-09  9:26 ` QCA6174 pcie wifi: Add pci quirks Ingmar Klein
2021-04-14 21:03   ` Bjorn Helgaas
2021-04-15  2:36     ` Alex Williamson
2021-04-15 18:02       ` Ingmar Klein
2021-04-15 19:01         ` Alex Williamson
2021-04-15 19:53           ` Pali Rohár
2021-05-25 22:12             ` Bjorn Helgaas
2021-05-28 18:08               ` Ingmar Klein
2021-05-28 18:21                 ` Pali Rohár
2021-05-28 18:47                   ` Ingmar Klein
2021-06-05 14:46                     ` Ingmar Klein
2021-06-08 18:34                       ` Pali Rohár
2021-06-09 17:07                         ` Ingmar Klein
2021-07-21  8:54               ` Pali Rohár
2021-08-20 23:22                 ` Pali Rohár
2021-09-08 19:18                   ` Ingmar Klein
2021-09-08 20:35                     ` Pali Rohár
2021-09-14 21:11   ` Bjorn Helgaas [this message]

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=20210914211123.GA1457901@bjorn-Precision-5520 \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=ingmar_klein@web.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@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).