From: Bjorn Helgaas <helgaas@kernel.org>
To: "Munoz Ruiz, Francisco" <francisco.munoz.ruiz@linux.intel.com>
Cc: lorenzo.pieralisi@arm.com, linux-pci@vger.kernel.org,
Nirmal Patel <nirmal.patel@linux.intel.com>,
Jonathan Derrick <jonathan.derrick@linux.dev>
Subject: Re: [PATCH] PCI: vmd: Fix secondary bus reset for Intel bridges
Date: Thu, 6 Oct 2022 14:21:45 -0500 [thread overview]
Message-ID: <20221006192145.GA2559324@bhelgaas> (raw)
In-Reply-To: <1b1e5bc3-78ab-2ad6-58b8-103bc974a833@linux.intel.com>
On Thu, Oct 06, 2022 at 11:26:08AM -0700, Munoz Ruiz, Francisco wrote:
> Hi,
>
> Please let me know if something else is needed.
We're in the merge window now, so it's too late for v6.1, but we'll
start merging v6.2 changes about Oct 17.
> On 9/26/2022 2:07 PM, Jonathan Derrick wrote:
> > On 9/23/2022 2:37 PM, francisco.munoz.ruiz@linux.intel.com wrote:
> > > From: Francisco Munoz <francisco.munoz.ruiz@linux.intel.com>
> > >
> > > The reset was never applied in the current implementation because Intel
> > > Bridges owned by VMD are parentless. Internally, the reset API applies
> > > a reset to the parent of the pci device supplied as argument, but in this
> > > case it failed because there wasn't a parent. This change feeds a child
> > > device of an Intel Bridge to the reset API and internally the reset is
> > > applied to its parent.
> > >
> > > Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@linux.intel.com>
> > > Reviewed-by: Nirmal Patel <nirmal.patel@linux.intel.com>
> > Reviewed-by: Jonathan Derrick <jonathan.derrick@linux.dev>
> >
> > > ---
> > > drivers/pci/controller/vmd.c | 12 ++++++++++--
> > > 1 file changed, 10 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
> > > index e06e9f4fc50f..34d6ba675440 100644
> > > --- a/drivers/pci/controller/vmd.c
> > > +++ b/drivers/pci/controller/vmd.c
> > > @@ -859,8 +859,16 @@ static int vmd_enable_domain(struct vmd_dev *vmd, unsigned long features)
> > > pci_scan_child_bus(vmd->bus);
> > > vmd_domain_reset(vmd);
> > > - list_for_each_entry(child, &vmd->bus->children, node)
> > > - pci_reset_bus(child->self);
> > > +
> > > + list_for_each_entry(child, &vmd->bus->children, node) {
> > > + if (!list_empty(&child->devices)) {
> > > + pci_reset_bus(list_first_entry(&child->devices,
> > > + struct pci_dev,
> > > + bus_list));
> > > + break;
> > > + }
> > > + }
> > > +
> > > pci_assign_unassigned_bus_resources(vmd->bus);
> > > /*
next prev parent reply other threads:[~2022-10-06 19:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-23 20:37 [PATCH] PCI: vmd: Fix secondary bus reset for Intel bridges francisco.munoz.ruiz
2022-09-26 21:07 ` Jonathan Derrick
2022-10-06 18:26 ` Munoz Ruiz, Francisco
2022-10-06 19:21 ` Bjorn Helgaas [this message]
2022-10-24 20:45 ` Bjorn Helgaas
2022-10-31 21:45 ` [PATCH V2] " francisco.munoz.ruiz
2022-11-02 23:42 ` Bjorn Helgaas
2022-11-03 3:58 ` Munoz Ruiz, Francisco
2022-11-03 17:15 ` 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=20221006192145.GA2559324@bhelgaas \
--to=helgaas@kernel.org \
--cc=francisco.munoz.ruiz@linux.intel.com \
--cc=jonathan.derrick@linux.dev \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=nirmal.patel@linux.intel.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 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).