mbox series

[SRU,F/G/Unstable/OEM-5.6,0/2] Refresh ACPI wakeup power to make Thunderbolt hotplug detection work

Message ID 20201130081302.372240-1-kai.heng.feng@canonical.com
Headers show
Series Refresh ACPI wakeup power to make Thunderbolt hotplug detection work | expand

Message

Kai-Heng Feng Nov. 30, 2020, 8:13 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1906229

[Impact]
Dell Precision 5550 cannot detect Thunderbolt device hotplug.

[Fix]
Refresh ACPI wakeup power if it's already enabled to make GPE work.

[Test]
Make sure the root port of TBT hierachy is in D3cold.
Plug a Thunderbolt Dock or Thunderbolt Disk, the system cannot detect
anything.

With the patch applied, OS can always detect hotplugged Thunderbolt
devices.

[Where problems could occur]
Though we refresh the wakeup device power, we didn't disable/enable ACPI
GPEs, so we won't miss any GPE event from this fix.

Rafael J. Wysocki (2):
  PM: ACPI: PCI: Drop acpi_pm_set_bridge_wakeup()
  PM: ACPI: Refresh wakeup device power configuration every time

 drivers/acpi/device_pm.c | 62 +++++++++++++++++++---------------------
 drivers/pci/pci-acpi.c   |  4 +--
 include/acpi/acpi_bus.h  |  5 ----
 3 files changed, 31 insertions(+), 40 deletions(-)

Comments

Stefan Bader Dec. 2, 2020, 8:11 a.m. UTC | #1
On 30.11.20 09:13, Kai-Heng Feng wrote:
> BugLink: https://bugs.launchpad.net/bugs/1906229
> 
> [Impact]
> Dell Precision 5550 cannot detect Thunderbolt device hotplug.
> 
> [Fix]
> Refresh ACPI wakeup power if it's already enabled to make GPE work.
> 
> [Test]
> Make sure the root port of TBT hierachy is in D3cold.
> Plug a Thunderbolt Dock or Thunderbolt Disk, the system cannot detect
> anything.
> 
> With the patch applied, OS can always detect hotplugged Thunderbolt
> devices.
> 
> [Where problems could occur]
> Though we refresh the wakeup device power, we didn't disable/enable ACPI
> GPEs, so we won't miss any GPE event from this fix.
> 
> Rafael J. Wysocki (2):
>   PM: ACPI: PCI: Drop acpi_pm_set_bridge_wakeup()
>   PM: ACPI: Refresh wakeup device power configuration every time
> 
>  drivers/acpi/device_pm.c | 62 +++++++++++++++++++---------------------
>  drivers/pci/pci-acpi.c   |  4 +--
>  include/acpi/acpi_bus.h  |  5 ----
>  3 files changed, 31 insertions(+), 40 deletions(-)
> 
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Kleber Sacilotto de Souza Dec. 3, 2020, 9:51 a.m. UTC | #2
On 30.11.20 09:13, Kai-Heng Feng wrote:
> BugLink: https://bugs.launchpad.net/bugs/1906229
> 
> [Impact]
> Dell Precision 5550 cannot detect Thunderbolt device hotplug.
> 
> [Fix]
> Refresh ACPI wakeup power if it's already enabled to make GPE work.
> 
> [Test]
> Make sure the root port of TBT hierachy is in D3cold.
> Plug a Thunderbolt Dock or Thunderbolt Disk, the system cannot detect
> anything.
> 
> With the patch applied, OS can always detect hotplugged Thunderbolt
> devices.
> 
> [Where problems could occur]
> Though we refresh the wakeup device power, we didn't disable/enable ACPI
> GPEs, so we won't miss any GPE event from this fix.
> 
> Rafael J. Wysocki (2):
>    PM: ACPI: PCI: Drop acpi_pm_set_bridge_wakeup()
>    PM: ACPI: Refresh wakeup device power configuration every time
> 
>   drivers/acpi/device_pm.c | 62 +++++++++++++++++++---------------------
>   drivers/pci/pci-acpi.c   |  4 +--
>   include/acpi/acpi_bus.h  |  5 ----
>   3 files changed, 31 insertions(+), 40 deletions(-)
> 

Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Timo Aaltonen Dec. 3, 2020, 11:20 a.m. UTC | #3
On 30.11.2020 10.13, Kai-Heng Feng wrote:
> BugLink: https://bugs.launchpad.net/bugs/1906229
> 
> [Impact]
> Dell Precision 5550 cannot detect Thunderbolt device hotplug.
> 
> [Fix]
> Refresh ACPI wakeup power if it's already enabled to make GPE work.
> 
> [Test]
> Make sure the root port of TBT hierachy is in D3cold.
> Plug a Thunderbolt Dock or Thunderbolt Disk, the system cannot detect
> anything.
> 
> With the patch applied, OS can always detect hotplugged Thunderbolt
> devices.
> 
> [Where problems could occur]
> Though we refresh the wakeup device power, we didn't disable/enable ACPI
> GPEs, so we won't miss any GPE event from this fix.
> 
> Rafael J. Wysocki (2):
>    PM: ACPI: PCI: Drop acpi_pm_set_bridge_wakeup()
>    PM: ACPI: Refresh wakeup device power configuration every time
> 
>   drivers/acpi/device_pm.c | 62 +++++++++++++++++++---------------------
>   drivers/pci/pci-acpi.c   |  4 +--
>   include/acpi/acpi_bus.h  |  5 ----
>   3 files changed, 31 insertions(+), 40 deletions(-)
> 

applied to oem-5.6, thanks
Ian May Dec. 8, 2020, 4:05 p.m. UTC | #4
Applied to focal/linux
Applied to groovy/linux

Thanks,
Ian

On 2020-11-30 16:13:00 , Kai-Heng Feng wrote:
> BugLink: https://bugs.launchpad.net/bugs/1906229
> 
> [Impact]
> Dell Precision 5550 cannot detect Thunderbolt device hotplug.
> 
> [Fix]
> Refresh ACPI wakeup power if it's already enabled to make GPE work.
> 
> [Test]
> Make sure the root port of TBT hierachy is in D3cold.
> Plug a Thunderbolt Dock or Thunderbolt Disk, the system cannot detect
> anything.
> 
> With the patch applied, OS can always detect hotplugged Thunderbolt
> devices.
> 
> [Where problems could occur]
> Though we refresh the wakeup device power, we didn't disable/enable ACPI
> GPEs, so we won't miss any GPE event from this fix.
> 
> Rafael J. Wysocki (2):
>   PM: ACPI: PCI: Drop acpi_pm_set_bridge_wakeup()
>   PM: ACPI: Refresh wakeup device power configuration every time
> 
>  drivers/acpi/device_pm.c | 62 +++++++++++++++++++---------------------
>  drivers/pci/pci-acpi.c   |  4 +--
>  include/acpi/acpi_bus.h  |  5 ----
>  3 files changed, 31 insertions(+), 40 deletions(-)
> 
> -- 
> 2.29.2
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
Seth Forshee Dec. 18, 2020, 11:08 p.m. UTC | #5
On Mon, Nov 30, 2020 at 04:13:00PM +0800, Kai-Heng Feng wrote:
> BugLink: https://bugs.launchpad.net/bugs/1906229
> 
> [Impact]
> Dell Precision 5550 cannot detect Thunderbolt device hotplug.
> 
> [Fix]
> Refresh ACPI wakeup power if it's already enabled to make GPE work.
> 
> [Test]
> Make sure the root port of TBT hierachy is in D3cold.
> Plug a Thunderbolt Dock or Thunderbolt Disk, the system cannot detect
> anything.
> 
> With the patch applied, OS can always detect hotplugged Thunderbolt
> devices.
> 
> [Where problems could occur]
> Though we refresh the wakeup device power, we didn't disable/enable ACPI
> GPEs, so we won't miss any GPE event from this fix.

Applied to unstable/master, thanks!