From: Alex Deucher <alexdeucher@gmail.com> To: Bjorn Helgaas <helgaas@kernel.org> Cc: Alex Deucher <alexander.deucher@amd.com>, Shyam-sundar.S-k@amd.com, Linux PCI <linux-pci@vger.kernel.org>, Prike Liang <Prike.Liang@amd.com>, amd-gfx list <amd-gfx@lists.freedesktop.org>, Marcin Bachry <hegel666@gmail.com>, Bjorn Helgaas <bhelgaas@google.com> Subject: Re: [PATCH] PCI: quirks: Quirk PCI d3hot delay for AMD xhci Date: Fri, 19 Mar 2021 14:11:38 -0400 [thread overview] Message-ID: <CADnq5_NN=Of+b4N6gUFsLiOuTkEznp8f5aVW4fuJX3sOZpHy5w@mail.gmail.com> (raw) In-Reply-To: <20210318183639.GA158657@bjorn-Precision-5520> On Thu, Mar 18, 2021 at 2:36 PM Bjorn Helgaas <helgaas@kernel.org> wrote: > > On Tue, Mar 16, 2021 at 03:28:51PM -0400, Alex Deucher wrote: > > From: Marcin Bachry <hegel666@gmail.com> > > > > Renoir needs a similar delay. > > See https://lore.kernel.org/linux-pci/20210311125322.GA2122226@bjorn-Precision-5520/ > > This is becoming a problem. We shouldn't have to merge a quirk for > every new device. Either the devices are defective, and AMD should > publish errata and have a plan for fixing them, or Linux is broken and > we should fix that. > > There are quite a few mechanisms for controlling delays like this > (Config Request Retry Status (PCIe r5.0, sec 2.3.1), Readiness > Notifications (sec 6.23), ACPI _DSM for power-on delays (PCI Firmware > Spec r3.3)), but most are for *reducing* delay, not for extending it. > > Linux supports CRS, but not all the others. Maybe we're missing > something we should support? > > How do you deal with these issues for Windows? If it works on Windows > without quirks, we should be able to make it work on Linux as well. It works fine in windows. Unfortunately, it's hard to tell what windows does exactly since MS supplies the USB driver in that case. Also, the extended delays are not necessary on our reference platforms, these seem to only be an issue on some OEM platforms. I did confirm with the windows team that we use d3hot for USB on our current platforms due to bios bugs, but this is fixed on upcoming platforms. Still digging for any more details. > > > Signed-off-by: Marcin Bachry <hegel666@gmail.com> > > Signed-off-by: Alex Deucher <alexander.deucher@amd.com> > > --- > > drivers/pci/quirks.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c > > index 653660e3ba9e..36e5ec670fae 100644 > > --- a/drivers/pci/quirks.c > > +++ b/drivers/pci/quirks.c > > @@ -1904,6 +1904,9 @@ static void quirk_ryzen_xhci_d3hot(struct pci_dev *dev) > > } > > DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x15e0, quirk_ryzen_xhci_d3hot); > > DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x15e1, quirk_ryzen_xhci_d3hot); > > +/* Renoir XHCI requires longer delay when transitioning from D0 to > > + * D3hot */ > > No need for "me too" comments that add no additional information. Will drop that. Alex > > > +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x1639, quirk_ryzen_xhci_d3hot); > > > > #ifdef CONFIG_X86_IO_APIC > > static int dmi_disable_ioapicreroute(const struct dmi_system_id *d) > > -- > > 2.30.2 > > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Alex Deucher <alexdeucher@gmail.com> To: Bjorn Helgaas <helgaas@kernel.org> Cc: Shyam-sundar.S-k@amd.com, Linux PCI <linux-pci@vger.kernel.org>, Marcin Bachry <hegel666@gmail.com>, amd-gfx list <amd-gfx@lists.freedesktop.org>, Bjorn Helgaas <bhelgaas@google.com>, Prike Liang <Prike.Liang@amd.com>, Alex Deucher <alexander.deucher@amd.com> Subject: Re: [PATCH] PCI: quirks: Quirk PCI d3hot delay for AMD xhci Date: Fri, 19 Mar 2021 14:11:38 -0400 [thread overview] Message-ID: <CADnq5_NN=Of+b4N6gUFsLiOuTkEznp8f5aVW4fuJX3sOZpHy5w@mail.gmail.com> (raw) In-Reply-To: <20210318183639.GA158657@bjorn-Precision-5520> On Thu, Mar 18, 2021 at 2:36 PM Bjorn Helgaas <helgaas@kernel.org> wrote: > > On Tue, Mar 16, 2021 at 03:28:51PM -0400, Alex Deucher wrote: > > From: Marcin Bachry <hegel666@gmail.com> > > > > Renoir needs a similar delay. > > See https://lore.kernel.org/linux-pci/20210311125322.GA2122226@bjorn-Precision-5520/ > > This is becoming a problem. We shouldn't have to merge a quirk for > every new device. Either the devices are defective, and AMD should > publish errata and have a plan for fixing them, or Linux is broken and > we should fix that. > > There are quite a few mechanisms for controlling delays like this > (Config Request Retry Status (PCIe r5.0, sec 2.3.1), Readiness > Notifications (sec 6.23), ACPI _DSM for power-on delays (PCI Firmware > Spec r3.3)), but most are for *reducing* delay, not for extending it. > > Linux supports CRS, but not all the others. Maybe we're missing > something we should support? > > How do you deal with these issues for Windows? If it works on Windows > without quirks, we should be able to make it work on Linux as well. It works fine in windows. Unfortunately, it's hard to tell what windows does exactly since MS supplies the USB driver in that case. Also, the extended delays are not necessary on our reference platforms, these seem to only be an issue on some OEM platforms. I did confirm with the windows team that we use d3hot for USB on our current platforms due to bios bugs, but this is fixed on upcoming platforms. Still digging for any more details. > > > Signed-off-by: Marcin Bachry <hegel666@gmail.com> > > Signed-off-by: Alex Deucher <alexander.deucher@amd.com> > > --- > > drivers/pci/quirks.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c > > index 653660e3ba9e..36e5ec670fae 100644 > > --- a/drivers/pci/quirks.c > > +++ b/drivers/pci/quirks.c > > @@ -1904,6 +1904,9 @@ static void quirk_ryzen_xhci_d3hot(struct pci_dev *dev) > > } > > DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x15e0, quirk_ryzen_xhci_d3hot); > > DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x15e1, quirk_ryzen_xhci_d3hot); > > +/* Renoir XHCI requires longer delay when transitioning from D0 to > > + * D3hot */ > > No need for "me too" comments that add no additional information. Will drop that. Alex > > > +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x1639, quirk_ryzen_xhci_d3hot); > > > > #ifdef CONFIG_X86_IO_APIC > > static int dmi_disable_ioapicreroute(const struct dmi_system_id *d) > > -- > > 2.30.2 > > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2021-03-19 18:12 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-16 19:28 [PATCH] PCI: quirks: Quirk PCI d3hot delay for AMD xhci Alex Deucher 2021-03-16 19:28 ` Alex Deucher 2021-03-18 18:36 ` Bjorn Helgaas 2021-03-18 18:36 ` Bjorn Helgaas 2021-03-19 18:11 ` Alex Deucher [this message] 2021-03-19 18:11 ` Alex Deucher 2021-07-22 2:58 Alex Deucher 2021-07-29 20:39 ` Bjorn Helgaas 2021-07-29 20:42 ` Limonciello, Mario 2021-07-29 21:06 ` Bjorn Helgaas 2021-07-29 21:09 ` Limonciello, Mario 2021-07-29 21:30 ` Bjorn Helgaas 2021-07-29 21:34 ` Bjorn Helgaas 2021-07-30 14:17 ` Deucher, Alexander
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='CADnq5_NN=Of+b4N6gUFsLiOuTkEznp8f5aVW4fuJX3sOZpHy5w@mail.gmail.com' \ --to=alexdeucher@gmail.com \ --cc=Prike.Liang@amd.com \ --cc=Shyam-sundar.S-k@amd.com \ --cc=alexander.deucher@amd.com \ --cc=amd-gfx@lists.freedesktop.org \ --cc=bhelgaas@google.com \ --cc=hegel666@gmail.com \ --cc=helgaas@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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.