mbox series

[0/6,SRU,OEM-5.17/OEM-6.0] Fix Thunderbolt device hotplug fail when connect via thunderbolt dock

Message ID 20220930082428.142684-1-chris.chiu@canonical.com
Headers show
Series Fix Thunderbolt device hotplug fail when connect via thunderbolt dock | expand

Message

Chris Chiu Sept. 30, 2022, 8:24 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1991366

[Impact]
Some Dell laptops where booting with Thunderbolt/USB4 devices connected the BIOS leaves some of the PCIe devices unconfigured. The kernel message shows "No bus number available for hot-added bridge". The connected devices can't be found.

[Fix]
Current linux PCI distribute the "spare" resources between hotplug ports on hot-add but have not done that upon the initial scan. The patches make the initial root bus scan path to do the same. The additional patches are just a small cleanups that can be applied separately too.

[Test]
1. Power on the machine with Thunderbolt/USB4 devices connected.
2. Check the kernel message to see if "No bus number available for hot-added bridge" shows up or not.
3. Check if the Thunderbolt/USB4 devices works or not.

[Where problems could occur]
The patches only apply the same procedures on initial root bus scan which was not done. If the BIOS configures the PCI correctly, everything is OK. It only takes effect on the BIOS w/ unconfigured PCIe devices.

Mika Westerberg (6):
  PCI: Fix used_buses calculation in pci_scan_child_bus_extend()
  PCI: Pass available buses even if the bridge is already configured
  PCI: Move pci_assign_unassigned_root_bus_resources()
  PCI: Distribute available resources for root buses, too
  PCI: Fix whitespace and indentation
  PCI: Fix typo in pci_scan_child_bus_extend()

 drivers/pci/probe.c     |  13 +-
 drivers/pci/setup-bus.c | 290 ++++++++++++++++++++++++----------------
 2 files changed, 181 insertions(+), 122 deletions(-)

Comments

Timo Aaltonen Oct. 4, 2022, 8:06 a.m. UTC | #1
Chris Chiu kirjoitti 30.9.2022 klo 11.24:
> BugLink: https://bugs.launchpad.net/bugs/1991366
> 
> [Impact]
> Some Dell laptops where booting with Thunderbolt/USB4 devices connected the BIOS leaves some of the PCIe devices unconfigured. The kernel message shows "No bus number available for hot-added bridge". The connected devices can't be found.
> 
> [Fix]
> Current linux PCI distribute the "spare" resources between hotplug ports on hot-add but have not done that upon the initial scan. The patches make the initial root bus scan path to do the same. The additional patches are just a small cleanups that can be applied separately too.
> 
> [Test]
> 1. Power on the machine with Thunderbolt/USB4 devices connected.
> 2. Check the kernel message to see if "No bus number available for hot-added bridge" shows up or not.
> 3. Check if the Thunderbolt/USB4 devices works or not.
> 
> [Where problems could occur]
> The patches only apply the same procedures on initial root bus scan which was not done. If the BIOS configures the PCI correctly, everything is OK. It only takes effect on the BIOS w/ unconfigured PCIe devices.
> 
> Mika Westerberg (6):
>    PCI: Fix used_buses calculation in pci_scan_child_bus_extend()
>    PCI: Pass available buses even if the bridge is already configured
>    PCI: Move pci_assign_unassigned_root_bus_resources()
>    PCI: Distribute available resources for root buses, too
>    PCI: Fix whitespace and indentation
>    PCI: Fix typo in pci_scan_child_bus_extend()
> 
>   drivers/pci/probe.c     |  13 +-
>   drivers/pci/setup-bus.c | 290 ++++++++++++++++++++++++----------------
>   2 files changed, 181 insertions(+), 122 deletions(-)
> 

applied to oem-kernels, thanks

since this will land in 6.1, I guess it's not necessary to send for 
unstable at this point..