From: Bjorn Helgaas <helgaas@kernel.org>
To: Maik Broemme <mbroemme@libmpq.org>
Cc: linux-pci <linux-pci@vger.kernel.org>,
vfio-users <vfio-users@redhat.com>,
Alex Williamson <alex.williamson@redhat.com>
Subject: Re: [PATCH] PCI: Mark Intel bridge on SuperMicro Atom C3xxx motherboards to avoid bus reset
Date: Wed, 29 May 2019 17:03:07 -0500 [thread overview]
Message-ID: <20190529220307.GD28250@google.com> (raw)
In-Reply-To: <20190524153118.GA12862@libmpq.org>
[+cc Alex]
On Fri, May 24, 2019 at 05:31:18PM +0200, Maik Broemme wrote:
> The Intel PCI bridge on SuperMicro Atom C3xxx motherboards do not
> successfully complete a bus reset when used with certain child devices.
> After the reset, config accesses to the child may fail. If assigning
> such device via VFIO it will immediately fail with:
>
> vfio-pci 0000:01:00.0: Failed to return from FLR
> vfio-pci 0000:01:00.0: timed out waiting for pending transaction;
> performing function level reset anyway
I guess these messages are from v4.13 or earlier, since the "Failed to
return from FLR" text was removed by 821cdad5c46c ("PCI: Wait up to 60
seconds for device to become ready after FLR"), which appeared in
v4.14.
I suppose a current kernel would fail similarly, but could you try it?
I think a current kernel would give more informative messages like:
not ready XXms after FLR, giving up
not ready XXms after bus reset, giving up
I don't understand the connection here: the messages you quote are
related to FLR, but the quirk isn't related to FLR. The quirk
prevents a secondary bus reset. So is it the case that we try FLR
first, it fails, then we try a secondary bus reset (does this succeed?
you don't mention an error from it), and the device remains
unresponsive and VFIO assignment fails?
And with the quirk, I assume we still try FLR, and it still fails.
But we *don't* try a secondary bus reset, and the device magically
works? That's confusing to me.
> Device will disappear from PCI device list:
>
> !!! Unknown header type 7f
> Kernel driver in use: vfio-pci
> Kernel modules: ddbridge
>
> The attached patch will mark the root port as incapable of doing a
> bus level reset. After that all my tested devices survive a VFIO
> assignment and several VM reboot cycles.
>
> Signed-off-by: Maik Broemme <mbroemme@libmpq.org>
> ---
> drivers/pci/quirks.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index 0f16acc323c6..86cd42872708 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -3433,6 +3433,13 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0034, quirk_no_bus_reset);
> */
> DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CAVIUM, 0xa100, quirk_no_bus_reset);
>
> +/*
> + * Root port on some SuperMicro Atom C3xxx motherboards do not successfully
> + * complete a bus reset when used with certain child devices. After the
> + * reset, config accesses to the child may fail.
> + */
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x19a4, quirk_no_bus_reset);
> +
> static void quirk_no_pm_reset(struct pci_dev *dev)
> {
> /*
> --
> 2.21.0
next prev parent reply other threads:[~2019-05-29 22:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-24 15:31 [PATCH] PCI: Mark Intel bridge on SuperMicro Atom C3xxx motherboards to avoid bus reset Maik Broemme
2019-05-24 16:40 ` Alex Williamson
2019-05-24 18:41 ` Maik Broemme
2019-05-29 22:03 ` Bjorn Helgaas [this message]
2019-05-30 1:49 ` Alex Williamson
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=20190529220307.GD28250@google.com \
--to=helgaas@kernel.org \
--cc=alex.williamson@redhat.com \
--cc=linux-pci@vger.kernel.org \
--cc=mbroemme@libmpq.org \
--cc=vfio-users@redhat.com \
/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 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.