Re: [PATCH v2 1/5] PCI: Make sure all bridges reserve at least one bus number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 23, 2018 at 12:52:18AM +0000, Mario.Limonciello@xxxxxxxx wrote:
> On Feb 22, 2018 18:27, Bjorn Helgaas <helgaas@xxxxxxxxxx> wrote:
> > On Thu, Feb 15, 2018 at 05:39:55PM +0300, Mika Westerberg wrote:
> > > When distributing extra buses between hotplug bridges we need to make
> > > sure each bridge reserve at least one bus number, even if there is
> > > currently nothing connected to it. For instance ACPI hotplug may bring
> > > in additional devices to non-hotplug bridges later on. To make sure we
> > > don't run out of bus numbers for non-hotplug bridges reserve one bus
> > > number for them upfront before distributing buses for hotplug bridges.
> > >
> > > Fixes: 1c02ea810065 ("PCI: Distribute available buses to hotplug-capable bridges")
> > > Reported-by: Mario Limonciello <mario.limonciello@xxxxxxxx>
> >
> > Is there a bugzilla or email URL we can include here?
> 
> Sorry it was private communication that I believe Mika is referring to in Reported-By here.
> 
> You can remove the tag if you think it's inappropriate for this commit.

I like to give credit whenever possible, so I wouldn't necessarily
remove the Reported-by.

But it would be very useful to also have a URL to something with more
details, e.g., what sort of failure the user would observe, dmesg
logs, PCI topology, etc.

This information can certainly be redacted to remove any proprietary
things that can't be made public.  Usually that isn't of interest to
structural issues like this anyway.

> > > Signed-off-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>
> > > Cc: stable@xxxxxxxxxxxxxxx
> > > ---
> > >  drivers/pci/probe.c | 11 ++++++++---
> > >  1 file changed, 8 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
> > > index ef5377438a1e..6cefd47556e3 100644
> > > --- a/drivers/pci/probe.c
> > > +++ b/drivers/pci/probe.c
> > > @@ -2561,7 +2561,10 @@ static unsigned int pci_scan_child_bus_extend(struct pci_bus *bus,
> > >  for_each_pci_bridge(dev, bus) {
> > >  cmax = max;
> > >  max = pci_scan_bridge_extend(bus, dev, max, 0, 0);
> > > - used_buses += cmax - max;
> > > + /* Reserve one bus for each bridge */
> > > + used_buses++;
> > > + if (cmax - max > 1)
> > > + used_buses += cmax - max - 1;
> > >  }
> > >
> > >  /* Scan bridges that need to be reconfigured */
> > > @@ -2584,12 +2587,14 @@ static unsigned int pci_scan_child_bus_extend(struct pci_bus *bus,
> > >  * bridges if any.
> > >  */
> > >  buses = available_buses / hotplug_bridges;
> > > - buses = min(buses, available_buses - used_buses);
> > > + buses = min(buses, available_buses - used_buses + 1);
> > >  }
> > >
> > >  cmax = max;
> > >  max = pci_scan_bridge_extend(bus, dev, cmax, buses, 1);
> > > - used_buses += max - cmax;
> > > + /* One bus is already accounted so don't add it again */
> > > + if (max - cmax > 1)
> > > + used_buses += max - cmax - 1;
> > >  }
> > >
> > >  /*
> > > --
> > > 2.15.1
> > >
> > > --
> > > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> > > the body of a message to majordomo@xxxxxxxxxxxxxxx
> > > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux