lkml.org 
[lkml]   [2020]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 5.4 203/266] PCI: Avoid FLR for AMD Matisse HD Audio & USB 3.0
    Date
    From: Marcos Scriven <marcos@scriven.org>

    [ Upstream commit 0d14f06cd6657ba3446a5eb780672da487b068e7 ]

    The AMD Matisse HD Audio & USB 3.0 devices advertise Function Level Reset
    support, but hang when an FLR is triggered.

    To reproduce the problem, attach the device to a VM, then detach and try to
    attach again.

    Rename the existing quirk_intel_no_flr(), which was not Intel-specific, to
    quirk_no_flr(), and apply it to prevent the use of FLR on these AMD
    devices.

    Link: https://lore.kernel.org/r/CAAri2DpkcuQZYbT6XsALhx2e6vRqPHwtbjHYeiH7MNp4zmt1RA@mail.gmail.com
    Signed-off-by: Marcos Scriven <marcos@scriven.org>
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/pci/quirks.c | 18 ++++++++++++++----
    1 file changed, 14 insertions(+), 4 deletions(-)

    diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
    index 798e52051ecc..3f89ba7fe7fb 100644
    --- a/drivers/pci/quirks.c
    +++ b/drivers/pci/quirks.c
    @@ -5130,13 +5130,23 @@ static void quirk_intel_qat_vf_cap(struct pci_dev *pdev)
    }
    DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x443, quirk_intel_qat_vf_cap);

    -/* FLR may cause some 82579 devices to hang */
    -static void quirk_intel_no_flr(struct pci_dev *dev)
    +/*
    + * FLR may cause the following to devices to hang:
    + *
    + * AMD Starship/Matisse HD Audio Controller 0x1487
    + * AMD Matisse USB 3.0 Host Controller 0x149c
    + * Intel 82579LM Gigabit Ethernet Controller 0x1502
    + * Intel 82579V Gigabit Ethernet Controller 0x1503
    + *
    + */
    +static void quirk_no_flr(struct pci_dev *dev)
    {
    dev->dev_flags |= PCI_DEV_FLAGS_NO_FLR_RESET;
    }
    -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1502, quirk_intel_no_flr);
    -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1503, quirk_intel_no_flr);
    +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AMD, 0x1487, quirk_no_flr);
    +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AMD, 0x149c, quirk_no_flr);
    +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1502, quirk_no_flr);
    +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1503, quirk_no_flr);

    static void quirk_no_ext_tags(struct pci_dev *pdev)
    {
    --
    2.25.1
    \
     
     \ /
      Last update: 2020-06-18 04:27    [W:4.342 / U:0.532 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site